diff --git a/CMakeLists.txt b/CMakeLists.txt index 49e63c613e..5ec1c59b50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,14 +119,7 @@ set(NVIM_API_LEVEL 11) # Bump this after any API change. set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change. set(NVIM_API_PRERELEASE false) -# Default to -O2 on release builds. -if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3") - message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2") - string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") -endif() - # Build-type: RelWithDebInfo - # /Og means something different in MSVC if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -Og -g")