Skip to content

Commit

Permalink
compie c++ use cpp11.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinLeeo committed May 29, 2024
1 parent 68ba54b commit e252940
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ set(TsFile_CPP_VERSION_MINOR 1)
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -Werror")
message("cmake using: USE_CPP11=${USE_CPP11}")

if (${USE_CPP11})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

if(DEFINED ENV{CXX})
set(CMAKE_CXX_COMPILER $ENV{CXX})
Expand Down

0 comments on commit e252940

Please sign in to comment.