cmake: set -O2 optimization level only if CMAKE_BUILD_TYPE is not specified
This commit is contained in:
@@ -496,7 +496,9 @@ else()
|
|||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(projects/Fdvm)
|
add_subdirectory(projects/Fdvm)
|
||||||
|
|||||||
Reference in New Issue
Block a user