[CMake] BUG in TRY_COMPILE with multiple includes
Fernando Cacciola
fernando.cacciola at gmail.com
Mon Sep 8 09:58:39 EDT 2008
Fernando Cacciola wrote:
> try_compile( X_COMPILE_RES
> ${CMAKE_BINARY_DIR}
> ${CMAKE_SOURCE_DIR}/X.cpp
> CMAKE_FLAGS
> -DINCLUDE_DIRECTORIES:STRING="${CMAKE_SOURCE_DIR}/includeA;${CMAKE_SOURCE_DIR}/includeB"
>
OK.
By looking at the source code I realize that each "flag" must be passed
as a single string:
Like this:
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_SOURCE_DIR}/includeA;${CMAKE_SOURCE_DIR}/includeB"
(Notice the quotes encompass the -DINCLUDE.. )
Best
Fernando
More information about the CMake
mailing list