Use CMAKE_SHARED_LINKER_FLAGS with cmake < 3.13.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
8adbb9478e
commit
20d9c64161
|
@ -38,7 +38,12 @@ set(DEBUG_CXXFLAGS
|
||||||
set(DEBUG_LDFLAGS
|
set(DEBUG_LDFLAGS
|
||||||
"-fsanitize=undefined")
|
"-fsanitize=undefined")
|
||||||
add_compile_options("$<$<CONFIG:Debug>:${DEBUG_CXXFLAGS}>")
|
add_compile_options("$<$<CONFIG:Debug>:${DEBUG_CXXFLAGS}>")
|
||||||
|
# add_link_options was introduced in version 3.13.
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS 3.13)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "$<$<CONFIG:Debug>:${DEBUG_LDFLAGS}>")
|
||||||
|
else()
|
||||||
add_link_options("$<$<CONFIG:Debug>:${DEBUG_LDFLAGS}>")
|
add_link_options("$<$<CONFIG:Debug>:${DEBUG_LDFLAGS}>")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(include)
|
add_subdirectory(include)
|
||||||
|
|
Reference in New Issue
Block a user