Skip to content

Commit

Permalink
add static linking for windows release
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed Jan 1, 2024
1 parent f1e6995 commit c0682bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_FLAGS_DEBUG "-g -pg -O0 -fprofile-arcs -ftest-coverage -Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "-s -mavx -O3")

# static link on windows
if (WIN32)
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -static")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -static")
endif()

# declare libraries
FetchContent_Declare(argparse SYSTEM GIT_REPOSITORY https://github.com/p-ranav/argparse.git GIT_TAG ac4c578f6020d5164f66ccb26b4727dea657a12b)

Expand Down

0 comments on commit c0682bb

Please sign in to comment.