summaryrefslogtreecommitdiff
path: root/Tests/CMakeOnly
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2019-03-27 22:36:51 +0300
committerRuslan Baratov <ruslan_baratov@yahoo.com>2019-03-27 22:39:02 +0300
commitdda01904587627a3d2bda5b684f7bef1e62596bb (patch)
tree34b65ed71c604b1aaf6e46e92d15b7cebb66d1b8 /Tests/CMakeOnly
parent390f14a24416f23801f5644eb51590f8317d35c7 (diff)
downloadcmake-dda01904587627a3d2bda5b684f7bef1e62596bb.tar.gz
project: Add variable CMAKE_PROJECT_INCLUDE
Diffstat (limited to 'Tests/CMakeOnly')
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt6
-rw-r--r--Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt4
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index f40524faa8..57f0cf80dc 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/ProjectIncludeAny/CMakeLists.txt b/Tests/CMakeOnly/ProjectIncludeAny/CMakeLists.txt
new file mode 100644
index 0000000000..ffce488f41
--- /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()