Skip to content

Commit

Permalink
use std=gnu++11 compiler flag instead of std=c++11
Browse files Browse the repository at this point in the history
On g++ 4.9, std=c++11 would disable the “Q” __float128 literal suffix which is used by boost library and causes compiler errors.
  • Loading branch information
Huang-Ming Huang committed Sep 28, 2016
1 parent c236ea0 commit c9f9a15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions cmake/FastTypeGenTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,4 @@ function (FASTTYPEGEN_TARGET Name)
set("FASTTYPEGEN_${Name}_OUTPUTS" "${FASTTYPEGEN_${Name}_OUTPUTS}" PARENT_SCOPE)
set("FASTTYPEGEN_${Name}_DEFINED" TRUE PARENT_SCOPE)
set("FASTTYPEGEN_${Name}_INPUTS" "${ARGN}" PARENT_SCOPE)
endfunction (FASTTYPEGEN_TARGET)

get_target_property(mfast_cxx mfast_static CXX_STANDARD)
message("mfast CXX_STANDARD = ${mfast_cxx}")
endfunction (FASTTYPEGEN_TARGET)
4 changes: 2 additions & 2 deletions cmake/SetCXXStandard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set(CMAKE_CXX_STANDARD 11 CACHE INTERNAL "specifies the C++ standard whose featu
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
### Even though CMAKE_CXX_STANDARD_REQUIRED is supported since CMake 3.1, it doesn't work for Emscripten em++ together with
### Cmake 3.6.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}")
### Cmake 3.6.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++${CMAKE_CXX_STANDARD}")
endif()

0 comments on commit c9f9a15

Please sign in to comment.