From 04e1768597ca2cd0b484f9436f956c493149bb61 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 9 Nov 2022 06:41:41 -0500 Subject: [PATCH] - use static runtimes on Linux and MinGW --- CMakeLists.txt | 6 ++++++ acc.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e52d2cf..e1424b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,12 @@ if(MSVC) endforeach() 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 acc.c error.c diff --git a/acc.c b/acc.c index 9d2b756..deaa028 100644 --- a/acc.c +++ b/acc.c @@ -22,8 +22,8 @@ // MACROS ------------------------------------------------------------------ -#define VERSION_TEXT "1.58" -#define COPYRIGHT_YEARS_TEXT "1995" +#define VERSION_TEXT "1.59" +#define COPYRIGHT_YEARS_TEXT "1995-2022" // TYPES -------------------------------------------------------------------