summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-22 20:03:28 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-23 18:03:01 (GMT)
commit525402450a1ccde0e9187c9613752f728a96149b (patch)
tree5e93ef47805a0a3765bd4f19a7b2f7ad1f340e1f /Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
parentb1e1aa1e6a2aa4c0da9d39f2e9f2a80d093f1dc7 (diff)
downloadCMake-525402450a1ccde0e9187c9613752f728a96149b.zip
CMake-525402450a1ccde0e9187c9613752f728a96149b.tar.gz
CMake-525402450a1ccde0e9187c9613752f728a96149b.tar.bz2
Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variable
Diffstat (limited to 'Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake')
-rw-r--r--Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
new file mode 100644
index 0000000..add9aeb
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
@@ -0,0 +1,16 @@
+enable_language(C)
+get_filename_component(include_dir "${CMAKE_BINARY_DIR}" PATH)
+include_directories("${include_dir}")
+add_executable(MakeInProjectOnly MakeInProjectOnly.c)
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY 1)
+file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+if (check_step EQUAL 1)
+ set(check_pairs
+ \"$<TARGET_FILE:MakeInProjectOnly>|${include_dir}/MakeInProjectOnly.h\"
+ )
+else()
+ set(check_pairs
+ \"${include_dir}/MakeInProjectOnly.h|\$<TARGET_FILE:MakeInProjectOnly>\"
+ )
+endif()
+")