summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-27 13:33:58 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-28 14:34:57 (GMT)
commit9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851 (patch)
treebc92323c6a686db17683cb537e0697e564e9fbd9 /Tests/RunCMake
parent40c0482153b54f60cd2f2e573cc1183df56e8a76 (diff)
downloadCMake-9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851.zip
CMake-9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851.tar.gz
CMake-9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851.tar.bz2
project: Fix support for explicit RC language
The check added in commit v3.6.0-rc1~293^2 (Diagnose recursive project/enable_language without crashing, 2016-03-07) broke support for enabling `RC` explicitly along with other languages like `C`. The reason is that we enable all listed languages at once so the internal `enable_language(RC)` that we do while enabling `C` or `CXX` on some platforms triggers the recursion check if `RC` is explicitly listed. Ideally we should refactor things to only enable one language at a time, but for now it is simplest to just exclude `RC` from the explicit list until other languages are enabled, and then enable it. Closes: #16330
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/project/ExplicitRC.cmake1
-rw-r--r--Tests/RunCMake/project/RunCMakeTest.cmake3
3 files changed, 5 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 778982f..0eafbef 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -207,7 +207,7 @@ add_RunCMake_test(include)
add_RunCMake_test(include_directories)
add_RunCMake_test(list)
add_RunCMake_test(message)
-add_RunCMake_test(project)
+add_RunCMake_test(project -DCMake_TEST_RESOURCES=${CMake_TEST_RESOURCES})
add_RunCMake_test(return)
add_RunCMake_test(set_property)
add_RunCMake_test(string)
diff --git a/Tests/RunCMake/project/ExplicitRC.cmake b/Tests/RunCMake/project/ExplicitRC.cmake
new file mode 100644
index 0000000..b3feaa9
--- /dev/null
+++ b/Tests/RunCMake/project/ExplicitRC.cmake
@@ -0,0 +1 @@
+project(ExplicitRC C RC)
diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake
index 6ab0fc9..dba97d2 100644
--- a/Tests/RunCMake/project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/project/RunCMakeTest.cmake
@@ -1,5 +1,8 @@
include(RunCMake)
+if(CMake_TEST_RESOURCES)
+ run_cmake(ExplicitRC)
+endif()
run_cmake(LanguagesImplicit)
run_cmake(LanguagesEmpty)
run_cmake(LanguagesNONE)