Make the builds optimalized

This commit is contained in:
:^) 2024-11-10 21:39:27 +01:00
parent 3c84735b46
commit c8f1e52587
No known key found for this signature in database
2 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,12 @@ project(nutri)
set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD 26)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1) set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_CXX_FLAGS -fdiagnostics-color=always) add_compile_options(-fdiagnostics-color=always)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
add_compile_options(-O3 -march=native)
endif()
include(FetchContent) include(FetchContent)

View File

@ -34,7 +34,7 @@ cd nutri
### Build with CMake ### Build with CMake
```bash ```bash
cmake -S . -B build cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build cmake --build build
``` ```