summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-17 19:31:07 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-17 19:31:07 (GMT)
commit2b7d59f3109483bfa45dc41e2a2f6a2f82addfec (patch)
tree2bd889fd9381b925fc4609cabec402ac7f7cfac6 /Tests
parent0f6f7c8ab1979b89c4400ebab39532be4bc269fb (diff)
downloadCMake-2b7d59f3109483bfa45dc41e2a2f6a2f82addfec.zip
CMake-2b7d59f3109483bfa45dc41e2a2f6a2f82addfec.tar.gz
CMake-2b7d59f3109483bfa45dc41e2a2f6a2f82addfec.tar.bz2
Genex: Enable COMPILE_LANGUAGE for file(GENERATE) with Visual Studio
Issue: #17435
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt3
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt3
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt3
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake16
4 files changed, 13 insertions, 12 deletions
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt
index 73b66ac..830d5f3 100644
--- a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt
@@ -3,6 +3,7 @@ CMake Error at CompileDefinitions.cmake:5 \(target_compile_definitions\):
\$<COMPILE_LANGUAGE:CXX>
- \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+ \$<COMPILE_LANGUAGE:...> may only be used for file\(GENERATE\) with the Visual
+ Studio generator.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt
index e9e8e9f..66b45c0 100644
--- a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt
@@ -3,6 +3,7 @@ CMake Error at CompileOptions.cmake:5 \(target_compile_options\):
\$<COMPILE_LANGUAGE:CXX>
- \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+ \$<COMPILE_LANGUAGE:...> may only be used for file\(GENERATE\) with the Visual
+ Studio generator.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt
index ec15068..06900bc 100644
--- a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt
@@ -3,6 +3,7 @@ CMake Error at IncludeDirectories.cmake:5 \(target_include_directories\):
\$<COMPILE_LANGUAGE:CXX>
- \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+ \$<COMPILE_LANGUAGE:...> may only be used for file\(GENERATE\) with the Visual
+ Studio generator.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index b660463..616e210 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -21,15 +21,13 @@ if (NOT file_contents MATCHES "generated.cpp.rule")
message(SEND_ERROR "Rule file not in target sources! ${file_contents}")
endif()
-if (NOT RunCMake_GENERATOR MATCHES "Visual Studio")
- run_cmake(COMPILE_LANGUAGE-genex)
- foreach(l CXX C)
- file(READ "${RunCMake_BINARY_DIR}/COMPILE_LANGUAGE-genex-build/opts-${l}.txt" l_defs)
- if (NOT l_defs STREQUAL "LANG_IS_${l}\n")
- message(FATAL_ERROR "File content does not match: ${l_defs}")
- endif()
- endforeach()
-endif()
+run_cmake(COMPILE_LANGUAGE-genex)
+foreach(l CXX C)
+ file(READ "${RunCMake_BINARY_DIR}/COMPILE_LANGUAGE-genex-build/opts-${l}.txt" l_defs)
+ if (NOT l_defs STREQUAL "LANG_IS_${l}\n")
+ message(FATAL_ERROR "File content does not match: ${l_defs}")
+ endif()
+endforeach()
set(timeformat "%Y%j%H%M%S")