mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-29 16:15:50 +00:00
@@ -9,10 +9,20 @@ target_compile_features(clio PUBLIC cxx_std_23)
|
||||
add_executable(clio_server)
|
||||
target_sources(clio_server PRIVATE Main.cpp)
|
||||
target_link_libraries(clio_server PRIVATE clio)
|
||||
target_link_options(
|
||||
# For now let's assume that we only using libstdc++ under gcc.
|
||||
#
|
||||
# TODO: libc++ static linkage in https://github.com/XRPLF/clio/issues/1300
|
||||
clio_server PRIVATE $<$<AND:$<BOOL:${is_gcc}>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++ -static-libgcc>
|
||||
)
|
||||
|
||||
if (static)
|
||||
target_link_options(clio_server PRIVATE -static)
|
||||
|
||||
if (is_gcc AND NOT san)
|
||||
target_link_options(
|
||||
# For now let's assume that we only using libstdc++ under gcc.
|
||||
clio_server PRIVATE -static-libstdc++ -static-libgcc
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (is_appleclang)
|
||||
message(FATAL_ERROR "Static linkage not supported on AppleClang")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
set_target_properties(clio_server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
Reference in New Issue
Block a user