summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-29 12:09:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-29 12:09:36 (GMT)
commit7cea3479d647ecf1957a4ed1f127a25197ac519e (patch)
treeda041eda10c30960d96d579b86a8b487bb753057 /Tests
parent4f719f23041cef87003b03e5fe722da06091f07f (diff)
parent9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851 (diff)
downloadCMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.zip
CMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.tar.gz
CMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.tar.bz2
Merge topic 'fix-explicit-RC'
9c5238df project: Fix support for explicit RC language 40c04821 Tests: Decide earlier whether to test resources
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt23
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/project/ExplicitRC.cmake1
-rw-r--r--Tests/RunCMake/project/RunCMakeTest.cmake3
4 files changed, 17 insertions, 12 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 3681843..c056fb8 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -83,6 +83,17 @@ if(BUILD_TESTING)
set(MAKE_SUPPORTS_SPACES 0)
endif()
+ # assume no resources building to test
+ set(CMake_TEST_RESOURCES FALSE)
+ # for windows and cygwin assume we have resources
+ if(WIN32 OR CYGWIN)
+ set(CMake_TEST_RESOURCES TRUE)
+ endif()
+ # for borland and watcom there is no resource support
+ if(WATCOM OR BORLAND)
+ set(CMake_TEST_RESOURCES FALSE)
+ endif()
+
set(build_generator_args
--build-generator ${CMAKE_GENERATOR}
)
@@ -262,17 +273,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(CompileFeatures CompileFeatures)
ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features)
- # assume no resources building to test
- set(TEST_RESOURCES FALSE)
- # for windows and cygwin assume we have resources
- if(WIN32 OR CYGWIN)
- set(TEST_RESOURCES TRUE)
- endif()
- # for borland and watcom there is no resource support
- if(WATCOM OR BORLAND)
- set(TEST_RESOURCES FALSE)
- endif()
- if(TEST_RESOURCES)
+ if(CMake_TEST_RESOURCES)
ADD_TEST_MACRO(VSResource VSResource)
if (CMAKE_GENERATOR MATCHES "Ninja")
add_test_macro(VSResourceNinjaForceRSP VSResourceNinjaForceRSP)
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)