aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-05-13 13:40:33 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-05-13 13:40:33 +0200
commit13a02a622c11df783ccf155d62f61dc0c6d6a5b2 (patch)
tree4371ea3bfbd522a51bba53829cb0f20d5e13b084 /src
parentuse -std=c17 -Wpedantic (diff)
downloadcimple-13a02a622c11df783ccf155d62f61dc0c6d6a5b2.tar.gz
cimple-13a02a622c11df783ccf155d62f61dc0c6d6a5b2.zip
cmake: document _GNU_SOURCE usage
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9758c2e..9174061 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,6 +4,9 @@ else()
add_compile_options(-std=c17 -Wpedantic -Wall -Wextra -Werror)
endif()
+# Even w/ _POSIX_C_SOURCE=200809L, we still need accept4, pipe2, execvpe, etc.,
+# which are all _GNU_SOURCE-only (at least for glibc). Try compiling without
+# any features macros defined at all, and prepare to be amazed!
add_compile_definitions(_GNU_SOURCE)
add_compile_definitions(VERSION="${PROJECT_VERSION}")