- use static runtimes on Linux and MinGW

This commit is contained in:
Rachael Alexanderson 2022-11-09 06:41:41 -05:00
parent c1bcbd47bf
commit 04e1768597
2 changed files with 8 additions and 2 deletions

View file

@ -16,6 +16,12 @@ if(MSVC)
endforeach() endforeach()
endif() endif()
if (NOT APPLE AND NOT MSVC)
# use static runtimes on Linux and MinGW
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -static -static-libgcc -static-libstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++")
endif()
add_executable(acc add_executable(acc
acc.c acc.c
error.c error.c

4
acc.c
View file

@ -22,8 +22,8 @@
// MACROS ------------------------------------------------------------------ // MACROS ------------------------------------------------------------------
#define VERSION_TEXT "1.58" #define VERSION_TEXT "1.59"
#define COPYRIGHT_YEARS_TEXT "1995" #define COPYRIGHT_YEARS_TEXT "1995-2022"
// TYPES ------------------------------------------------------------------- // TYPES -------------------------------------------------------------------