[CMake] GET_CMAKE_PROPERTY not working ?!?
Andy Cedilnik
andy.cedilnik at kitware.com
Fri Nov 26 08:28:41 EST 2004
Hi Kris,
This feature is tested nightly in SystemInformation test. Please verify
that you are looiking at the right file etc.
Andy
Dekeyser, Kris wrote:
> Hi,
>
> I have tried to use GET_CMAKE_PROPERTY to debug my CMakeLists.txt. I used
> exactly the example in the book and placed the code at the end of the main
> (root) CMakeLists.txt. I do get an output file, but it is always empty.
> GET_CMAKE_PROPERY Seems to return an empty list in all cases. I have tried
> the VARIABLES, CACHE_VARIABLES, COMMANDS and MACROS properties, but they are
> all empty.
>
> This is the code:
> FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
> GET_CMAKE_PROPERTY(VARS MACROS)
> FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "${VARS}\n")
> FOREACH(var ${VARS})
> FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "${var}
> \"${${var}}\"\n")
> ENDFOREACH(var)
> What did I do wrong?
More information about the CMake
mailing list