summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorJean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>2018-08-10 16:30:48 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-09-06 13:02:24 (GMT)
commitdf1ddeec128d68cc636f2dde6c2acd87af5658b6 (patch)
tree49dd5bbe43601d06455e2254ad722dd80d1ece2f /Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
parenteba2b13a835000a614f21a1205a598462a4f8843 (diff)
downloadCMake-df1ddeec128d68cc636f2dde6c2acd87af5658b6.zip
CMake-df1ddeec128d68cc636f2dde6c2acd87af5658b6.tar.gz
CMake-df1ddeec128d68cc636f2dde6c2acd87af5658b6.tar.bz2
ExternalProject: Report error if local variables are not defined
Since in some situations, ExternalProject module may be included in a sub-directory, functions will be available in the global scope but local variables like "_ep_keywords_<keyword>" will not be defined, this commit checks and reports an error indicating that the ExternalProject module must be explicitly included before using any of the ExternalProject_* functions that require the module's inclusion within the current scope or above. Co-authored-by: Pablo Hernandez <pablo.hernandez@kitware.com> Co-authored-by: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Tests/RunCMake/ExternalProject/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 09607f6..bf11381 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -1,5 +1,7 @@
include(RunCMake)
+run_cmake(IncludeScope-Add)
+run_cmake(IncludeScope-Add_Step)
run_cmake(NoOptions)
run_cmake(SourceEmpty)
run_cmake(SourceMissing)