diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-06 22:54:13 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-06 22:54:13 (GMT) |
commit | 96d561aabc7ca453396b8d419b3398dea6b13572 (patch) | |
tree | cfb721d465938dc9d7f5454854897414c8006bd7 /Tests/SystemInformation | |
parent | 7d6aaf23e9c3d1ffe81c85791191658b797271f2 (diff) | |
download | CMake-96d561aabc7ca453396b8d419b3398dea6b13572.zip CMake-96d561aabc7ca453396b8d419b3398dea6b13572.tar.gz CMake-96d561aabc7ca453396b8d419b3398dea6b13572.tar.bz2 |
ENH: Add option to retrieve list of macros. Close Bug #25 - Get_CMAKE_PROPERTIES
Diffstat (limited to 'Tests/SystemInformation')
-rw-r--r-- | Tests/SystemInformation/CMakeLists.txt | 13 | ||||
-rw-r--r-- | Tests/SystemInformation/DumpInformation.cxx | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Tests/SystemInformation/CMakeLists.txt b/Tests/SystemInformation/CMakeLists.txt index 93d93c6..c41f42b 100644 --- a/Tests/SystemInformation/CMakeLists.txt +++ b/Tests/SystemInformation/CMakeLists.txt @@ -6,6 +6,12 @@ CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in ${DumpInformation_BINARY_DIR}/DumpInformation.h) ADD_EXECUTABLE(DumpInformation DumpInformation.cxx) +MACRO(FOO args) + MESSAGE("Test macro") +ENDMACRO(FOO) + +FOO(lala) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "") GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) @@ -20,3 +26,10 @@ FOREACH(var ${res}) "${var}\n") ENDFOREACH(var ${res}) +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "") +GET_CMAKE_PROPERTY(res MACROS) +FOREACH(var ${res}) + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt + "${var}\n") +ENDFOREACH(var ${res}) + diff --git a/Tests/SystemInformation/DumpInformation.cxx b/Tests/SystemInformation/DumpInformation.cxx index 1c24721..9cf454a 100644 --- a/Tests/SystemInformation/DumpInformation.cxx +++ b/Tests/SystemInformation/DumpInformation.cxx @@ -54,6 +54,7 @@ int main(int,char *[]) DumpInformation_BINARY_DIR "/SystemInformation.out", DumpInformation_BINARY_DIR "/AllVariables.txt", DumpInformation_BINARY_DIR "/AllCommands.txt", + DumpInformation_BINARY_DIR "/AllMacros.txt", DumpInformation_BINARY_DIR "/../../Source/cmConfigure.h", DumpInformation_BINARY_DIR "/../../CMakeCache.txt", DumpInformation_BINARY_DIR "/../../CMakeOutput.log", |