From 4c53238d011075f46c811825adccb3c40284fda9 Mon Sep 17 00:00:00 2001 From: tavo Date: Sun, 5 Oct 2025 21:26:33 -0600 Subject: [PATCH] fast --- CMakeLists.txt | 2 ++ Makefile | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5c05ec..128619b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,11 +160,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") target_compile_options(${BIN} PRIVATE $<$:-g3 -O0 -Wall -Wextra -DDEBUG -fno-omit-frame-pointer -fsanitize=address,undefined> $<$:-O3 -g0 -DNDEBUG -ffunction-sections -fdata-sections -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=> + $<$:-O1 -g0 -DNDEBUG -pipe -march=native> ) target_link_options(${BIN} PRIVATE $<$:-fno-omit-frame-pointer -fsanitize=address,undefined> $<$:-Wl,--gc-sections> + $<$:-pipe -march=native> ) # Enable LTO in Release if supported diff --git a/Makefile b/Makefile index 0059b77..1c561b4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -BUILD_DIR = build +BUILD_DIR = build -.PHONY: all debug release clean run/debug run/release +.PHONY: all debug release fast clean run/debug run/release run/fast all: debug @@ -12,11 +12,18 @@ release: cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release cmake --build $(BUILD_DIR) +fast: + cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Fast + cmake --build $(BUILD_DIR) + run/debug: debug ./$(BUILD_DIR)/proyecto run/release: release ./$(BUILD_DIR)/proyecto +run/fast: fast + ./$(BUILD_DIR)/proyecto + clean: rm -rf build