Skip to content

Commit e6a94ea

Browse files
committed
[build] switch to -std=gnu++0x
This allows removal of M_PI hack while being supported by both gcc and clang.
1 parent 48e89ee commit e6a94ea

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/gmock" AND IS_DIRECTORY "${PROJECT_SOURCE_DI
6464

6565
include_directories(include ${Boost_INCLUDE_DIRS} ${LOG4CPP_INCLUDE_DIRS} ${SigC++_INCLUDE_DIRS} ${Freetype_INCLUDE_DIRS} ${Cairomm_INCLUDE_DIRS})
6666

67-
ADD_DEFINITIONS("-std=c++0x")
67+
ADD_DEFINITIONS("-std=gnu++0x") # gnu is required for e.g. M_PI to be defined
6868
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
6969
ADD_DEFINITIONS(${LOG4CPP_DEFINITIONS})
7070
ADD_DEFINITIONS(-DStatistic_Activated)

include/settings.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@
5757
#include <log4cpp/Priority.hh>
5858
#include <log4cpp/Category.hh>
5959

60-
// M_PI fix
61-
#ifndef M_PI
62-
#define M_PI 3.14159265358979323846
63-
#endif
64-
6560
#ifdef ALACARTE_TEST
6661
#define TESTABLE virtual
6762
#else

0 commit comments

Comments
 (0)