Skip to content

Commit 8daa200

Browse files
[build] test again with c++11 support
1 parent 284445e commit 8daa200

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

CMakeLists.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff 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")
1818
endif()
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

3135
ENABLE_TESTING()
3236
INCLUDE(CTest)

src/framework/System.Compiler.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
#include "System.h"
55
#include "OS.h"
66

7-
// when C++ 11 override this with 'override'
8-
#define OVERRIDE
9-
107
namespace System
118
{
129
namespace Compiler

0 commit comments

Comments
 (0)