fast
This commit is contained in:
parent
6b979b4a86
commit
4c53238d01
2 changed files with 11 additions and 2 deletions
|
|
@ -160,11 +160,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||||
target_compile_options(${BIN} PRIVATE
|
target_compile_options(${BIN} PRIVATE
|
||||||
$<$<CONFIG:Debug>:-g3 -O0 -Wall -Wextra -DDEBUG -fno-omit-frame-pointer -fsanitize=address,undefined>
|
$<$<CONFIG:Debug>:-g3 -O0 -Wall -Wextra -DDEBUG -fno-omit-frame-pointer -fsanitize=address,undefined>
|
||||||
$<$<CONFIG:Release>:-O3 -g0 -DNDEBUG -ffunction-sections -fdata-sections -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=>
|
$<$<CONFIG:Release>:-O3 -g0 -DNDEBUG -ffunction-sections -fdata-sections -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=>
|
||||||
|
$<$<CONFIG:Fast>:-O1 -g0 -DNDEBUG -pipe -march=native>
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_options(${BIN} PRIVATE
|
target_link_options(${BIN} PRIVATE
|
||||||
$<$<CONFIG:Debug>:-fno-omit-frame-pointer -fsanitize=address,undefined>
|
$<$<CONFIG:Debug>:-fno-omit-frame-pointer -fsanitize=address,undefined>
|
||||||
$<$<CONFIG:Release>:-Wl,--gc-sections>
|
$<$<CONFIG:Release>:-Wl,--gc-sections>
|
||||||
|
$<$<CONFIG:Fast>:-pipe -march=native>
|
||||||
)
|
)
|
||||||
|
|
||||||
# Enable LTO in Release if supported
|
# Enable LTO in Release if supported
|
||||||
|
|
|
||||||
11
Makefile
11
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
|
all: debug
|
||||||
|
|
||||||
|
|
@ -12,11 +12,18 @@ release:
|
||||||
cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release
|
cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build $(BUILD_DIR)
|
cmake --build $(BUILD_DIR)
|
||||||
|
|
||||||
|
fast:
|
||||||
|
cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Fast
|
||||||
|
cmake --build $(BUILD_DIR)
|
||||||
|
|
||||||
run/debug: debug
|
run/debug: debug
|
||||||
./$(BUILD_DIR)/proyecto
|
./$(BUILD_DIR)/proyecto
|
||||||
|
|
||||||
run/release: release
|
run/release: release
|
||||||
./$(BUILD_DIR)/proyecto
|
./$(BUILD_DIR)/proyecto
|
||||||
|
|
||||||
|
run/fast: fast
|
||||||
|
./$(BUILD_DIR)/proyecto
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue