diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-01-01 20:08:31 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-01-01 20:08:31 +0100 |
commit | 86d86462b420f098ee34a022cffd922e3192dabe (patch) | |
tree | 20770c3ba0d29ef920ada35ca8609a28e4d0294f /CMakeLists.txt | |
parent | e6451dae35a962fba59a450b2a22d80e64399fe4 (diff) | |
download | kit-86d86462b420f098ee34a022cffd922e3192dabe.zip |
Remove ANSI C option; add pedantic gcc flag
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 33b42fe..770e79d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,16 +7,10 @@ if(NOT DEFINED CMAKE_BUILD_PARALLEL_LEVEL) endif() option(KIT_ENABLE_TESTING "Enable testing" ON) -option(KIT_FORCE_ANSI_C "Force ANSI C" ${KIT_ENABLE_TESTING}) option(KIT_DISABLE_SYSTEM_MALLOC "Disable system memory allocator" OFF) option(KIT_DISABLE_SYSTEM_THREADS "Disable system threads" OFF) -if(KIT_FORCE_ANSI_C) - set(CMAKE_C_STANDARD 90) - set(CMAKE_C_EXTENSIONS OFF) -endif() - project( kit VERSION 0.1.1 @@ -32,6 +26,10 @@ if(WIN32) target_link_libraries(kit PUBLIC Shlwapi) endif() +if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") + target_compile_options(kit PUBLIC -pedantic -Wall -Werror) +endif() + include(CheckCSourceRuns) check_c_source_runs( |