diff --git a/CMakeLists.txt b/CMakeLists.txt index b06162f9..fab064d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ set(RECASTNAVIGATION_EXAMPLES OFF CACHE BOOL "" FORCE) # Disabled no-register # Disabled unknown pragmas because Linux doesn't understand Windows pragmas. if(UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wuninitialized -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized -fPIC") add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0 _GLIBCXX_USE_CXX17_ABI=0) if(NOT APPLE) @@ -67,7 +67,7 @@ if(UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC") elseif(MSVC) # Skip warning for invalid conversion from size_t to uint32_t for all targets below for now set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") diff --git a/CMakePresets.json b/CMakePresets.json index f4b173af..433d77fa 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -17,7 +17,12 @@ "name": "ci-ubuntu-22.04", "displayName": "CI configure step for Ubuntu", "description": "Same as default, Used in GitHub actions workflow", - "inherits": "default" + "inherits": "default", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", + "CMAKE_CXX_FLAGS_INIT": "-O2" + } }, { "name": "ci-macos-13",