Skip to content

Commit

Permalink
Configure GNU compilers for c++11. (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
esdevcr authored and Kjell Hedström committed Mar 31, 2018
1 parent 217f52f commit e988aad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ IF (${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang")
ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
message( STATUS "cmake for GCC " )
IF (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++14 -pthread -D_GLIBCXX_USE_NANOSLEEP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP")
ELSEIF (MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++14 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
set(PLATFORM_LINK_LIBRIES dbghelp)

# deal with ERROR level conflicts with windows.h
ADD_DEFINITIONS (-DNOGDI)
ELSE()
set(PLATFORM_LINK_LIBRIES rt)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++14 -pthread -lrt -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -lrt -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
ENDIF()
ELSEIF(MSVC)
set(PLATFORM_LINK_LIBRIES dbghelp)
Expand Down

0 comments on commit e988aad

Please sign in to comment.