mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 15:12:30 +02:00
Update C++ standard for tests from C++11 to C++14 (#293)
Since 1.13.0, gtest requires at least C++14. When it is automatically downloaded and compiled, gtest’s CMake scripts override the C++ standard, so the tests are compiled in C++14 mode already. Changing the C++ standard in cpu_features will make it easier for users such as Linux distribution packagers who are linking against an external or system-wide copy of gtest 1.13.0 or later.
This commit is contained in:
parent
c74a85d64a
commit
273af56a15
@ -179,9 +179,9 @@ if(BUILD_TESTING)
|
||||
# found.
|
||||
enable_language(CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # prefer use of -std11 instead of -gnustd11
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # prefer use of -std14 instead of -gnustd14
|
||||
|
||||
if(NOT TARGET gtest OR NOT TARGET gmock_main)
|
||||
# Download and unpack googletest at configure time.
|
||||
|
Loading…
x
Reference in New Issue
Block a user