File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,20 @@ if(${CMAKE_COMPILER_ID} MATCHES GNU AND $cpp-netframework)
1717 set_target_properties (StringTest PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -gp -fprofile-coverage -fprofile-args" LINK_FLAGS "-fprofile-arcs" )
1818endif ()
1919
20- #include(CheckCXXCompilerFlag)
21- #CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
22- #CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
23- #if(COMPILER_SUPPORTS_CXX11)
24- #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
25- #elseif(COMPILER_SUPPORTS_CXX0X)
26- # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
27- #else()
28- #message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
29- #endif()
20+ include (CheckCXXCompilerFlag)
21+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
22+ CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
23+ if (COMPILER_SUPPORTS_CXX11)
24+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
25+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11" )
26+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LANG_CXX11" )
27+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSUPPORTS_CXX_11" )
28+ elseif (COMPILER_SUPPORTS_CXX0X)
29+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
30+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LANG_CXX11" )
31+ else ()
32+ message (STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler." )
33+ endif ()
3034
3135ENABLE_TESTING ()
3236INCLUDE (CTest)
Original file line number Diff line number Diff line change 44#include " System.h"
55#include " OS.h"
66
7- // when C++ 11 override this with 'override'
8- #define OVERRIDE
9-
107namespace System
118{
129 namespace Compiler
You can’t perform that action at this time.
0 commit comments