Merge pull request 'cmake: set -O2 optimization level only if CMAKE_BUILD_TYPE is not specified' (#66) from cmake_linux_opt_level into master
This commit was merged in pull request #66.
This commit is contained in:
@@ -487,7 +487,7 @@ source_group (Predictor\\Library FILES ${LIBPREDICTOR})
|
||||
source_group (Parser FILES ${PARSER})
|
||||
source_group (PPPA\\PPPA FILES ${PPPA})
|
||||
source_group (PPPA\\ZLib FILES ${ZLIB})
|
||||
|
||||
|
||||
if (MSVC_IDE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Zc:__cplusplus")
|
||||
else()
|
||||
@@ -496,7 +496,9 @@ else()
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(projects/Fdvm)
|
||||
|
||||
Reference in New Issue
Block a user