summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-20 15:04:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-20 15:05:11 (GMT)
commit4549027a09756d7421651bc8312e4619707f076d (patch)
tree6c9b7ef3a46c7473dcf04ddb1fea147e8009319c /Tests
parent1d1d78bbe1ed7113927fd0dd078741de3c722b14 (diff)
parent30aa715fac06deba7eaa3e6167cf34eb4d2521d0 (diff)
downloadCMake-4549027a09756d7421651bc8312e4619707f076d.zip
CMake-4549027a09756d7421651bc8312e4619707f076d.tar.gz
CMake-4549027a09756d7421651bc8312e4619707f076d.tar.bz2
Merge topic 'revert-explicit-LANGUAGE-flag' into release-3.19
30aa715fac Revert "specify language flag when source LANGUAGE property is set" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5519
Diffstat (limited to 'Tests')
-rw-r--r--Tests/SetLang/CMakeLists.txt7
-rw-r--r--Tests/SetLang/bar.c14
-rw-r--r--Tests/SetLang/zoom.zzz7
3 files changed, 1 insertions, 27 deletions
diff --git a/Tests/SetLang/CMakeLists.txt b/Tests/SetLang/CMakeLists.txt
index 616421e..9de4fc6 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -15,10 +15,3 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio" AND "x${CMAKE_C_COMPILER_ID}" STREQU
add_library(stay stay_c.c stay_cxx.cxx)
set_property(TARGET stay PROPERTY COMPILE_OPTIONS "-TP")
endif()
-
-if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
- add_library(zoom zoom.zzz)
- set_source_files_properties(zoom.zzz PROPERTIES LANGUAGE CXX)
- target_link_libraries(SetLang zoom)
- target_compile_definitions(SetLang PRIVATE WITH_ZOOM)
-endif()
diff --git a/Tests/SetLang/bar.c b/Tests/SetLang/bar.c
index 515e8c2..b934356 100644
--- a/Tests/SetLang/bar.c
+++ b/Tests/SetLang/bar.c
@@ -1,22 +1,10 @@
#include <stdio.h>
int foo();
-
-#ifdef WITH_ZOOM
-int zoom();
-#endif
-
class A
{
public:
- A()
- {
- this->i = foo();
-#ifdef WITH_ZOOM
- i += zoom();
- i -= zoom();
-#endif
- }
+ A() { this->i = foo(); }
int i;
};
diff --git a/Tests/SetLang/zoom.zzz b/Tests/SetLang/zoom.zzz
deleted file mode 100644
index a0c8899..0000000
--- a/Tests/SetLang/zoom.zzz
+++ /dev/null
@@ -1,7 +0,0 @@
-int zoom()
-{
- int r = 10;
- r++;
- int ret = r + 10;
- return ret;
-}