ENH:Add test for GET/SET_DIRECTORY_PROPERTY

This commit is contained in:
Andy Cedilnik 2004-04-26 13:42:08 -04:00
parent 34115a5989
commit e9b8a57c1f
2 changed files with 25 additions and 1 deletions

View File

@ -1,5 +1,10 @@
PROJECT(DumpInformation) 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 CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/SystemInformation.in
${DumpInformation_BINARY_DIR}/SystemInformation.out) ${DumpInformation_BINARY_DIR}/SystemInformation.out)
CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in
@ -33,3 +38,21 @@ FOREACH(var ${res})
"${var}\n") "${var}\n")
ENDFOREACH(var ${res}) 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")

View File

@ -55,6 +55,7 @@ int main(int,char *[])
DumpInformation_BINARY_DIR "/AllVariables.txt", DumpInformation_BINARY_DIR "/AllVariables.txt",
DumpInformation_BINARY_DIR "/AllCommands.txt", DumpInformation_BINARY_DIR "/AllCommands.txt",
DumpInformation_BINARY_DIR "/AllMacros.txt", DumpInformation_BINARY_DIR "/AllMacros.txt",
DumpInformation_BINARY_DIR "/OtherProperties.txt",
DumpInformation_BINARY_DIR "/../../Source/cmConfigure.h", DumpInformation_BINARY_DIR "/../../Source/cmConfigure.h",
DumpInformation_BINARY_DIR "/../../CMakeCache.txt", DumpInformation_BINARY_DIR "/../../CMakeCache.txt",
DumpInformation_BINARY_DIR "/../../CMakeOutput.log", DumpInformation_BINARY_DIR "/../../CMakeOutput.log",