cmake: set -O2 optimization level only if CMAKE_BUILD_TYPE is not specified

This commit is contained in:
2025-09-25 13:44:10 +03:00
parent 9900929349
commit c7a31c8bbb

View File

@@ -496,8 +496,10 @@ else()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()
endif()
add_subdirectory(projects/Fdvm)