summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2010-09-28 20:09:14 (GMT)
committerAlex Neundorf <neundorf@kde.org>2010-09-28 20:10:47 (GMT)
commit41e4f1a2109cc03008ef0d1db5cab1c9345866e3 (patch)
tree588fe929d70a87772f0cf48a3295cdef4bb5e489 /Tests/CMakeTests
parentf9fc79cac54b1d97afb65075b949bac264961439 (diff)
downloadCMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.zip
CMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.tar.gz
CMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.tar.bz2
Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
Comes with a simple test and docs. Alex
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/IncludeTest.cmake.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CMakeTests/IncludeTest.cmake.in b/Tests/CMakeTests/IncludeTest.cmake.in
index 01cec38..eca679b 100644
--- a/Tests/CMakeTests/IncludeTest.cmake.in
+++ b/Tests/CMakeTests/IncludeTest.cmake.in
@@ -35,3 +35,7 @@ if(NOT "${fileOne}" STREQUAL "${fileTwo}")
message(FATAL_ERROR "Wrong CMake.cmake was included: \"${fileOne}\" expected \"${fileTwo}\"")
endif(NOT "${fileOne}" STREQUAL "${fileTwo}")
+# Check that CMAKE_CURRENT_LIST_DIR is working:
+# Needs to be a file in the build tree, which is correct cmake script
+# but doesn't do a lot, if possible only set() commands:
+include(${CMAKE_CURRENT_LIST_DIR}/../../CTestCustom.cmake)