diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-10-04 08:40:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 08:40:39 -0400 |
commit | d7e3deba72703ad36c497f5becf6772ca00a0d6d (patch) | |
tree | eff3b2ec3dcc31126041529c8e00a714997f2d7b /CMakeLists.txt | |
parent | 9691ccf51b3efd8113e9620c4afa8b5382d7f161 (diff) | |
parent | f0ba8cd378a460f927644e41f49be95d0e956f81 (diff) | |
download | stasis-d7e3deba72703ad36c497f5becf6772ca00a0d6d.tar.gz |
Merge pull request #46 from jhunkeler/split-delivery-code
Add multiprocessing / Split delivery code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index abb700c..caed929 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15) project(STASIS C) include(GNUInstallDirs) -set(nix_cflags -Wall -Wextra -fPIC) +set(nix_cflags -Wall -Wextra -fPIC -D_GNU_SOURCE) set(win_cflags /Wall) set(CMAKE_C_STANDARD 99) find_package(LibXml2) @@ -11,13 +11,16 @@ link_libraries(CURL::libcurl) link_libraries(LibXml2::LibXml2) include_directories(${LIBXML2_INCLUDE_DIR}) +option(FORTIFY_SOURCE OFF) +if (FORTIFY_SOURCE) + set(nix_cflags ${nix_cflags} -O -D_FORTIFY_SOURCE=1) +endif () + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - message("gnu options") add_compile_options(${nix_cflags}) elseif (CMAKE_C_COMPILER_ID MATCHES "Clang") add_compile_options(${nix_cflags}) elseif (CMAKE_C_COMPILER_ID STREQUAL "MSVC") - message("microsoft visual c options") add_compile_options(${win_cflags}) endif() |