summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-01 14:48:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-04-01 14:49:02 (GMT)
commit3e129d71bc12a325c0548aaaea24470cd172470b (patch)
treed084c28fcf436d2529807f81ca31711b0384cbbe /Tests
parent29802ed27227fe91be1d531d6e894e4efbbb3d11 (diff)
parent7d19b3091d7d2982a0d6b2b4408011efbb56f167 (diff)
downloadCMake-3e129d71bc12a325c0548aaaea24470cd172470b.zip
CMake-3e129d71bc12a325c0548aaaea24470cd172470b.tar.gz
CMake-3e129d71bc12a325c0548aaaea24470cd172470b.tar.bz2
Merge topic 'project-include'
7d19b3091d Release note for CMAKE_PROJECT_INCLUDE variable dda0190458 project: Add variable CMAKE_PROJECT_INCLUDE 390f14a244 Test ProjectInclude: Add NONE to avoid enabling languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3155
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt6
-rw-r--r--Tests/CMakeOnly/ProjectInclude/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt4
3 files changed, 11 insertions, 1 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index f40524f..57f0cf8 100644
--- a/Tests/CMakeOnly/CMakeLists.txt
+++ b/Tests/CMakeOnly/CMakeLists.txt
@@ -56,6 +56,12 @@ add_test(CMakeOnly.ProjectInclude ${CMAKE_CMAKE_COMMAND}
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
)
+add_test(CMakeOnly.ProjectIncludeAny ${CMAKE_CMAKE_COMMAND}
+ -DTEST=ProjectIncludeAny
+ -DCMAKE_ARGS=-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/ProjectInclude/include.cmake
+ -P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
+ )
+
include(CMakeParseArguments)
function(add_major_test module)
diff --git a/Tests/CMakeOnly/ProjectInclude/CMakeLists.txt b/Tests/CMakeOnly/ProjectInclude/CMakeLists.txt
index a9abb4a..ffce488 100644
--- a/Tests/CMakeOnly/ProjectInclude/CMakeLists.txt
+++ b/Tests/CMakeOnly/ProjectInclude/CMakeLists.txt
@@ -1,4 +1,4 @@
-project(ProjectInclude)
+project(ProjectInclude LANGUAGES NONE)
if(NOT AUTO_INCLUDE)
message(FATAL_ERROR "include file not found")
endif()
diff --git a/Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt b/Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt
new file mode 100644
index 0000000..ffce488
--- /dev/null
+++ b/Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt
@@ -0,0 +1,4 @@
+project(ProjectInclude LANGUAGES NONE)
+if(NOT AUTO_INCLUDE)
+ message(FATAL_ERROR "include file not found")
+endif()