diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-03-22 20:01:22 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-03-22 20:01:22 (GMT) |
commit | eb773486f35791edbbb2305023fb81bb7c206e85 (patch) | |
tree | 50ddaff3579bcf6670ece83b148cc1648a01116c /Tests/ComplexRelativePaths/Executable/CMakeLists.txt | |
parent | a2d8447fb942fb67211bd91efb510592bc26bab7 (diff) | |
download | CMake-eb773486f35791edbbb2305023fb81bb7c206e85.zip CMake-eb773486f35791edbbb2305023fb81bb7c206e85.tar.gz CMake-eb773486f35791edbbb2305023fb81bb7c206e85.tar.bz2 |
ENH: added testing for new features
Diffstat (limited to 'Tests/ComplexRelativePaths/Executable/CMakeLists.txt')
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 768e0fa..78eb7a6 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -36,6 +36,25 @@ ELSE(UNIX) ENDIF(NOT BORLAND) ENDIF (UNIX) +# can we get the path to a source file +GET_SOURCE_FILE_PROPERTY(A_LOCATION A.cxx LOCATION) +IF ("${A_LOCATION}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/A.cxx") + ADD_DEFINITIONS(-DCMAKE_FOUND_ACXX) +ENDIF ("${A_LOCATION}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/A.cxx") + +# get the directory parent +GET_DIRECTORY_PROPERTY(P_VALUE PARENT_DIRECTORY) +IF ("${P_VALUE}" STREQUAL "${CMAKE_SOURCE_DIR}") + ADD_DEFINITIONS(-DCMAKE_FOUND_PARENT) +ENDIF ("${P_VALUE}" STREQUAL "${CMAKE_SOURCE_DIR}") + +# get the stack of listfiles +INCLUDE(Included.cmake) +IF ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_CURRENT_SOURCE_DIR}/Included.cmake") + ADD_DEFINITIONS(-DCMAKE_FOUND_LISTFILE_STACK) +ENDIF ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_CURRENT_SOURCE_DIR}/Included.cmake") + + # Test pre-build/pre-link/post-build rules for an executable. ADD_CUSTOM_COMMAND(TARGET complex PRE_BUILD COMMAND ${CREATE_FILE_EXE} |