Skip to content

Commit

Permalink
Set default CXXFLAGS if none are set
Browse files Browse the repository at this point in the history
  • Loading branch information
miek committed Oct 5, 2015
1 parent 4c00052 commit 6287ae4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ if (WIN32)
endif(NOT(MMAN))
ENDIF (WIN32)

if (NOT CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "-O2")
endif (NOT CMAKE_CXX_FLAGS)

# This only works in cmake >3.1
#set_property(TARGET inspectrum PROPERTY CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-O3 ${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

list(APPEND inspectrum_sources
main.cpp
Expand Down

0 comments on commit 6287ae4

Please sign in to comment.