effort to have no warnings once again
This commit is contained in:
@ -175,20 +175,19 @@ function(give_options_without_warnings target)
|
||||
target_compile_options(${target} PUBLIC
|
||||
${BUILD_FLAGS}
|
||||
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>
|
||||
$<$<BOOL:${LINUX}>:-Wl,-rpath,$ORIGIN/>)
|
||||
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>)
|
||||
|
||||
target_link_options(${target} PUBLIC
|
||||
${BUILD_FLAGS}
|
||||
# -Wl,--no-undefined # TODO: use later for implementing no-libc
|
||||
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>
|
||||
$<$<BOOL:${LINUX}>:-Wl,-rpath,$ORIGIN/>
|
||||
-Bsymbolic-functions
|
||||
-Wl,--hash-style=gnu)
|
||||
|
||||
target_compile_definitions(${target} PRIVATE
|
||||
$<$<BOOL:${TWN_FEATURE_DYNLIB_GAME}>:TWN_FEATURE_DYNLIB_GAME>)
|
||||
$<$<BOOL:${TWN_FEATURE_DYNLIB_GAME}>:TWN_FEATURE_DYNLIB_GAME>
|
||||
_GNU_SOURCE)
|
||||
endfunction()
|
||||
|
||||
|
||||
@ -200,7 +199,8 @@ function(give_options target)
|
||||
-Wno-padded
|
||||
-Wno-declaration-after-statement
|
||||
-Wno-unsafe-buffer-usage
|
||||
-Wno-unused-command-line-argument)
|
||||
-Wno-unused-command-line-argument
|
||||
-Wno-covered-switch-default)
|
||||
|
||||
set(WARNING_FLAGS
|
||||
-Wall
|
||||
@ -264,6 +264,8 @@ function(use_townengine target sources output_directory)
|
||||
# launcher binary, loads game and engine shared library
|
||||
add_executable(${target} ${TWN_ROOT_DIR}/src/twn_main.c)
|
||||
|
||||
target_compile_options(${target} PRIVATE $<$<BOOL:${LINUX}>:-Wl,-rpath,$ORIGIN/>)
|
||||
|
||||
# todo: copy instead?
|
||||
# put libtownengine.so alongside the binary
|
||||
set_target_properties(${TWN_TARGET} PROPERTIES
|
||||
|
Reference in New Issue
Block a user