From e9b8a57c1fa013dd8ecdf682119b856d8b7ae3fc Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 26 Apr 2004 13:42:08 -0400 Subject: [PATCH] ENH:Add test for GET/SET_DIRECTORY_PROPERTY --- Tests/SystemInformation/CMakeLists.txt | 25 ++++++++++++++++++++- Tests/SystemInformation/DumpInformation.cxx | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Tests/SystemInformation/CMakeLists.txt b/Tests/SystemInformation/CMakeLists.txt index c41f42b88..d75cb9ec4 100644 --- a/Tests/SystemInformation/CMakeLists.txt +++ b/Tests/SystemInformation/CMakeLists.txt @@ -1,5 +1,10 @@ PROJECT(DumpInformation) -INCLUDE_DIRECTORIES(${DumpInformation_BINARY_DIR}) + +INCLUDE_DIRECTORIES("This does not exists") +GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES) +SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}") + + CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/SystemInformation.in ${DumpInformation_BINARY_DIR}/SystemInformation.out) CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in @@ -33,3 +38,21 @@ FOREACH(var ${res}) "${var}\n") ENDFOREACH(var ${res}) +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt "") +GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES) +FOREACH(var ${res}) + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt + "INCLUDE_DIRECTORY: ${var}\n") +ENDFOREACH(var) + +GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES) +FOREACH(var ${res}) + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt + "LINK_DIRECTORIES: ${var}\n") +ENDFOREACH(var) + +GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION) +FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt + "INCLUDE_REGULAR_EXPRESSION: ${res}\n") + + diff --git a/Tests/SystemInformation/DumpInformation.cxx b/Tests/SystemInformation/DumpInformation.cxx index 74bd0ace4..ebf984bd9 100644 --- a/Tests/SystemInformation/DumpInformation.cxx +++ b/Tests/SystemInformation/DumpInformation.cxx @@ -55,6 +55,7 @@ int main(int,char *[]) DumpInformation_BINARY_DIR "/AllVariables.txt", DumpInformation_BINARY_DIR "/AllCommands.txt", DumpInformation_BINARY_DIR "/AllMacros.txt", + DumpInformation_BINARY_DIR "/OtherProperties.txt", DumpInformation_BINARY_DIR "/../../Source/cmConfigure.h", DumpInformation_BINARY_DIR "/../../CMakeCache.txt", DumpInformation_BINARY_DIR "/../../CMakeOutput.log",