Fix build on Linux 32bit.
This commit is contained in:
parent
af968dc8ea
commit
0340f72294
2 changed files with 11 additions and 10 deletions
|
|
@ -34,14 +34,6 @@ function(init_target target_name) # init_target(my_target folder_name)
|
||||||
XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $<IF:$<CONFIG:Debug>,0,fast>
|
XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $<IF:$<CONFIG:Debug>,0,fast>
|
||||||
XCODE_ATTRIBUTE_LLVM_LTO $<IF:$<CONFIG:Debug>,NO,YES>
|
XCODE_ATTRIBUTE_LLVM_LTO $<IF:$<CONFIG:Debug>,NO,YES>
|
||||||
)
|
)
|
||||||
if (LINUX)
|
|
||||||
target_compile_options(${target_name} PUBLIC $<IF:$<CONFIG:Debug>,,-g -Ofast -fno-strict-aliasing>)
|
|
||||||
target_link_options(${target_name} PUBLIC $<IF:$<CONFIG:Debug>,,-g -Ofast>)
|
|
||||||
if (NOT build_linux32)
|
|
||||||
target_compile_options(${target_name} PUBLIC $<IF:$<CONFIG:Debug>,,-flto>)
|
|
||||||
target_link_options(${target_name} PUBLIC $<IF:$<CONFIG:Debug>,,-flto -fuse-linker-plugin>)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_target_properties(${target_name} PROPERTIES
|
set_target_properties(${target_name} PROPERTIES
|
||||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE True
|
INTERPROCEDURAL_OPTIMIZATION_RELEASE True
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
target_compile_options(common_options
|
target_compile_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
-g
|
$<IF:$<CONFIG:Debug>,,-Ofast -fno-strict-aliasing>
|
||||||
-pipe
|
-pipe
|
||||||
-Wall
|
-Wall
|
||||||
-Werror
|
-Werror
|
||||||
|
|
@ -23,9 +23,18 @@ INTERFACE
|
||||||
-Wno-attributes
|
-Wno-attributes
|
||||||
-Wno-parentheses
|
-Wno-parentheses
|
||||||
-Wno-stringop-overflow
|
-Wno-stringop-overflow
|
||||||
|
-Wno-maybe-uninitialized
|
||||||
-Wno-error=class-memaccess
|
-Wno-error=class-memaccess
|
||||||
)
|
)
|
||||||
target_link_options(common_options
|
target_link_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
-g
|
$<IF:$<CONFIG:Debug>,,-Ofast>
|
||||||
)
|
)
|
||||||
|
if (build_linux32)
|
||||||
|
target_compile_options(common_options INTERFACE -g0)
|
||||||
|
target_link_options(common_options INTERFACE -g0)
|
||||||
|
else()
|
||||||
|
target_compile_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto>)
|
||||||
|
target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue