File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,16 @@ message("-- Version: ${VERSION}")
18
18
set (GENERIC_LIB_VERSION ${VERSION} )
19
19
string (SUBSTRING ${VERSION} 0 1 GENERIC_LIB_SOVERSION)
20
20
21
- # Try and enable C++11. Don't use C++14 because it doesn't work in some
22
- # configurations.
21
+ # Import our CMake modules
23
22
include (CheckCXXCompilerFlag)
24
23
include (AddCXXCompilerFlag)
25
24
include (CXXFeatureCheck)
26
25
27
- check_cxx_compiler_flag(-std=c++11 HAVE_FLAG_CXX_11)
28
- check_cxx_compiler_flag(-std=c++0x HAVE_FLAG_CXX_0X)
29
- if (HAVE_FLAG_CXX_11)
30
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
31
- elseif (HAVE_FLAG_CXX_0X)
32
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
26
+ # Try and enable C++11. Don't use C++14 because it doesn't work in some
27
+ # configurations.
28
+ add_cxx_compiler_flag(-std=c++11)
29
+ if (NOT HAVE_CXX_FLAG_STD_CXX11)
30
+ add_cxx_compiler_flag(-std=c++0x)
33
31
endif ()
34
32
35
33
# Turn compiler warnings up to 11
You can’t perform that action at this time.
0 commit comments