Skip to content

Commit b095d43

Browse files
committed
Enable c++11 (needed for structure {}-initialization)
Also use CMAKE_CXX_FLAGS for passing extra compiler flags instead of ADD_DEFINITIONS
1 parent 9f8855b commit b095d43

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,12 @@ INCLUDE_DIRECTORIES(SYSTEM
8484
/usr/local/include
8585
)
8686

87-
ADD_DEFINITIONS(-Wall -Wextra )
88-
#ADD_DEFINITIONS(-Weffc++) #Extra debug
89-
ADD_DEFINITIONS(-g)
90-
ADD_DEFINITIONS(-O2)
87+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
88+
9189
IF (NOT MINGW)
92-
ADD_DEFINITIONS(-ftree-vectorize)
93-
ADD_DEFINITIONS(-ffast-math)
90+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize -ffast-math")
9491
ENDIF (NOT MINGW)
95-
ADD_DEFINITIONS(-msse2)
92+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
9693

9794

9895

0 commit comments

Comments
 (0)