Skip to content

Commit

Permalink
statically link libstdc++
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrSheldon committed Jan 30, 2025
1 parent d68293c commit 122d1bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ add_library(measureapi_static STATIC
target_compile_features(measureapi_static PUBLIC cxx_std_20)
target_include_directories(measureapi_static PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../include)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_options(measureapi PRIVATE -static-libgcc -static-libstdc++)
endif()


set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down

0 comments on commit 122d1bc

Please sign in to comment.