summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/Executable/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ComplexOneConfig/Executable/CMakeLists.txt')
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 768e0fa..78eb7a6 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/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}