[CMake] Tricky question once more
Andreas Pakulat
apaku at gmx.de
Tue May 5 08:03:12 EDT 2009
On 05.05.09 03:22:16, Denis Scherbakov wrote:
>
> Once more: I have 3 projects.
>
> projectA depends on projectB
> projectB depends on SOMEAPP_INCLUDES and SOMEAPP_LIBRARIES
> projectC does not depend on anything
>
> I have FindSomeApp script that sets SOMEAPP_FOUND
>
> 1. I want to be able to complete cmake configuration, and build projectC, even if projectB
> and projectA cannot be built. Currently I get an error "The following variables are used in
> this project, but they are set to NOTFOUND."
>
> 2. My project is very big, so putting everywhere IF-ENDIF is not an option, I need some
> automatic way. I can rewrite ADD_SUBDIRECTORY, though, but how?
The only way to get that is to create a macro which takes a subdir and a
variable name and hides the if/endif ugliness. Then use this macro
everywhere instead of add_subdirectory.
Andreas
--
You are the only person to ever get this message.
More information about the CMake
mailing list