Skip to content

Commit

Permalink
Modified CMakeLists.txt to add support for standard C++11
Browse files Browse the repository at this point in the history
  • Loading branch information
Víctor González Barbone committed Oct 19, 2018
1 parent 73bb86b commit 8806b5f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Expand Up @@ -42,6 +42,21 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
add_definitions(-fvisibility=hidden)
endif()


#C11++
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
endmacro(use_cxx11)

use_cxx11()


########################################################################
# Find boost
########################################################################
Expand Down

0 comments on commit 8806b5f

Please sign in to comment.