summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-27 12:46:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-27 12:47:04 (GMT)
commit95a39dab5454d4f8c0f5e79f464845a35d29a040 (patch)
treeeeec2c2de1347f4a5c2b2788565d4ed8648bd9c1
parent4df6e2b78aede4ac472bc8afb7f7a748b65d5abe (diff)
parent61bea8f3c88581f4e0c8723fc88161795c54f092 (diff)
downloadCMake-95a39dab5454d4f8c0f5e79f464845a35d29a040.zip
CMake-95a39dab5454d4f8c0f5e79f464845a35d29a040.tar.gz
CMake-95a39dab5454d4f8c0f5e79f464845a35d29a040.tar.bz2
Merge topic 'tests-no-c++98'
61bea8f3c8 Tests: Remove incidental use of C++98 compiler modes 02ec5c4ad2 Tests: Add missing include in sleep sources Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !7206
-rw-r--r--Tests/AliasTarget/CMakeLists.txt8
-rw-r--r--Tests/CTestTestScheduler/sleep.c2
-rw-r--r--Tests/CTestTestStopTime/sleep.c2
-rw-r--r--Tests/Complex/CMakeLists.txt15
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt15
-rw-r--r--Tests/Plugin/CMakeLists.txt9
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH.cmake8
7 files changed, 4 insertions, 55 deletions
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index fc70135..aa4abc4 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -2,14 +2,6 @@ cmake_minimum_required(VERSION 2.8.11)
cmake_policy(SET CMP0054 NEW)
project(AliasTarget)
-set(CMAKE_CXX_STANDARD 98)
-
-# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
- set(CMAKE_CXX_STANDARD 11)
-endif()
-
add_library(foo SHARED empty.cpp)
add_library(PREFIX::Foo ALIAS foo)
add_library(Another::Alias ALIAS foo)
diff --git a/Tests/CTestTestScheduler/sleep.c b/Tests/CTestTestScheduler/sleep.c
index 327bff5..69a5797 100644
--- a/Tests/CTestTestScheduler/sleep.c
+++ b/Tests/CTestTestScheduler/sleep.c
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
#if defined(_WIN32)
# include <windows.h>
#else
diff --git a/Tests/CTestTestStopTime/sleep.c b/Tests/CTestTestStopTime/sleep.c
index b9b6e89..2d69f7f 100644
--- a/Tests/CTestTestStopTime/sleep.c
+++ b/Tests/CTestTestStopTime/sleep.c
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
#if defined(_WIN32)
# include <windows.h>
#else
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 9fd85be..5df22d2 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -432,21 +432,6 @@ if(NOT RESULT STREQUAL "a[b]c[d]e")
endif()
#
-# This tests needs Ansi C++98
-#
-set(CMAKE_CXX_STANDARD 98)
-#
-# GNU extensions are needed for stricmp() on Windows.
-#
-set(CMAKE_CXX_EXTENSIONS TRUE)
-
-# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
- set(CMAKE_CXX_STANDARD 11)
-endif()
-
-#
# Create the libs and the main exe
#
add_subdirectory(Library)
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 28b73af..5a4134d 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -389,21 +389,6 @@ if(NOT RESULT STREQUAL "a[b]c[d]e")
endif()
#
-# This tests needs Ansi C++98
-#
-set(CMAKE_CXX_STANDARD 98)
-#
-# GNU extensions are needed for stricmp() on Windows.
-#
-set(CMAKE_CXX_EXTENSIONS TRUE)
-
-# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
- set(CMAKE_CXX_STANDARD 11)
-endif()
-
-#
# Create the libs and the main exe
#
add_subdirectory(Library)
diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt
index ec22bf4..c2f43cd 100644
--- a/Tests/Plugin/CMakeLists.txt
+++ b/Tests/Plugin/CMakeLists.txt
@@ -2,9 +2,6 @@ cmake_minimum_required (VERSION 2.8.12)
cmake_policy(SET CMP0054 NEW)
project(Plugin)
-# We need proper C++98 support from the compiler
-set(CMAKE_CXX_STANDARD 98)
-
# Test per-target output directory properties.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin)
@@ -21,12 +18,6 @@ include_directories(
${Plugin_SOURCE_DIR}/include
)
-# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
- set(CMAKE_CXX_STANDARD 11)
-endif()
-
# Create an executable that exports an API for use by plugins.
add_executable(example_exe src/example_exe.cxx src/DynamicLoader.cxx)
set_target_properties(example_exe PROPERTIES
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
index 431d1ce..bf9c302 100644
--- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
@@ -43,14 +43,6 @@ endif()
include(GenerateExportHeader)
-set(CMAKE_CXX_STANDARD 98)
-
-# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
- set(CMAKE_CXX_STANDARD 11)
-endif()
-
add_subdirectory(lib_shared_and_static)
if(CMAKE_SYSTEM_NAME MATCHES "AIX" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU"