diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b368d5..9f9224c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)