File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ if (MSVC)
1313 add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE )
1414else ()
1515 add_compile_options (-Wall -Wextra -Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter )
16- # Aggressive optimizations for GCC/Clang
17- add_compile_options ($<$<CONFIG :Release >:-O3 ;-march =native ;-flto >)
18- if (NOT APPLE )
19- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto" )
20- endif ()
2116endif ()
2217
2318# --- Build Configuration ---
@@ -217,6 +212,14 @@ if (LIBFFI_FOUND)
217212 target_link_libraries (prox_core PUBLIC ${LIBFFI_LIBRARIES} )
218213endif ()
219214
215+ # Aggressive optimizations for GCC/Clang in Release mode
216+ if (NOT MSVC )
217+ target_compile_options (prox_core PRIVATE $<$<CONFIG :Release >:-O3 -march =native -flto >)
218+ if (NOT APPLE )
219+ target_link_options (prox_core PUBLIC $<$<CONFIG :Release >:-flto >)
220+ endif ()
221+ endif ()
222+
220223# Main executable
221224add_executable (proxpl src/main.c )
222225target_link_libraries (proxpl PRIVATE prox_core )
You can’t perform that action at this time.
0 commit comments