summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_directories
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-15 08:27:42 (GMT)
committerBrad King <brad.king@kitware.com>2012-10-17 20:23:32 (GMT)
commit79edd00235091475d5b3f1305bcf991cad3e45f4 (patch)
treeb5fdf3e6f79f0ffe275b404a66c9780c6d2800a4 /Tests/RunCMake/include_directories
parentf7ef32b00b8d4fe74bfdcee3e690309e9a89e251 (diff)
downloadCMake-79edd00235091475d5b3f1305bcf991cad3e45f4.zip
CMake-79edd00235091475d5b3f1305bcf991cad3e45f4.tar.gz
CMake-79edd00235091475d5b3f1305bcf991cad3e45f4.tar.bz2
GenEx: Fix reporting about not-found include directories and libraries.
This fixes a regression introduced in commit 290e92ad (Move GetIncludeDirectories to cmGeneratorTarget, 2012-09-16) which loops over cmGeneratorTargets before they get created, so the container is empty.
Diffstat (limited to 'Tests/RunCMake/include_directories')
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/include_directories/NotFoundContent-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/NotFoundContent-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/NotFoundContent.cmake9
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake3
5 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/NotFoundContent-result.txt b/Tests/RunCMake/include_directories/NotFoundContent-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/NotFoundContent-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/NotFoundContent-stderr.txt b/Tests/RunCMake/include_directories/NotFoundContent-stderr.txt
new file mode 100644
index 0000000..f608d63
--- /dev/null
+++ b/Tests/RunCMake/include_directories/NotFoundContent-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
+Please set them or make sure they are set and tested correctly in the CMake files:
+NotThere1
+ used as include directory in directory .*
+NotThere2
+ used as include directory in directory .*
diff --git a/Tests/RunCMake/include_directories/NotFoundContent.cmake b/Tests/RunCMake/include_directories/NotFoundContent.cmake
new file mode 100644
index 0000000..9677e0c
--- /dev/null
+++ b/Tests/RunCMake/include_directories/NotFoundContent.cmake
@@ -0,0 +1,9 @@
+
+include_directories(NotThere1-NOTFOUND)
+
+include_directories($<1:There1-NOTFOUND>)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" "int main(int,char**) { return 0; }\n")
+add_executable(dummy "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
+set_property(TARGET dummy APPEND PROPERTY INCLUDE_DIRECTORIES "NotThere2-NOTFOUND")
+set_property(TARGET dummy APPEND PROPERTY INCLUDE_DIRECTORIES "$<1:There2-NOTFOUND>")
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
new file mode 100644
index 0000000..aee3f79
--- /dev/null
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+include(RunCMake)
+
+run_cmake(NotFoundContent)