mirror of
				https://github.com/XRPLF/clio.git
				synced 2025-11-04 11:55:51 +00:00 
			
		
		
		
	Link libstd++ and gcc lib statically (#830)
This commit is contained in:
		@@ -4,7 +4,7 @@ project(clio)
 | 
			
		||||
# ========================================================================== #
 | 
			
		||||
#                                   Options                                  #
 | 
			
		||||
# ========================================================================== #
 | 
			
		||||
option (verbose   "Verbose build"                                     FALSE) 
 | 
			
		||||
option (verbose   "Verbose build"                                     FALSE)
 | 
			
		||||
option (tests     "Build tests"                                       FALSE)
 | 
			
		||||
option (docs      "Generate doxygen docs"                             FALSE)
 | 
			
		||||
option (coverage  "Build test coverage report"                        FALSE)
 | 
			
		||||
@@ -135,7 +135,11 @@ target_sources (clio PRIVATE
 | 
			
		||||
 | 
			
		||||
# Clio server
 | 
			
		||||
add_executable (clio_server src/main/Main.cpp)
 | 
			
		||||
target_link_libraries (clio_server PUBLIC clio)
 | 
			
		||||
target_link_libraries (clio_server PRIVATE clio)
 | 
			
		||||
target_link_options(clio_server
 | 
			
		||||
  PRIVATE
 | 
			
		||||
    $<$<AND:$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++ -static-libgcc>
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Unittesting
 | 
			
		||||
if (tests)
 | 
			
		||||
@@ -219,7 +223,7 @@ if (tests)
 | 
			
		||||
  # See https://github.com/google/googletest/issues/3475
 | 
			
		||||
  gtest_discover_tests (clio_tests DISCOVERY_TIMEOUT 10)
 | 
			
		||||
 | 
			
		||||
  # Fix for dwarf5 bug on ci 
 | 
			
		||||
  # Fix for dwarf5 bug on ci
 | 
			
		||||
  target_compile_options (clio PUBLIC -gdwarf-4)
 | 
			
		||||
 | 
			
		||||
  target_compile_definitions (${TEST_TARGET} PUBLIC UNITTEST_BUILD)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user