summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-01-01 17:35:34 +0100
committerMitya Selivanov <automainint@guattari.tech>2023-01-01 17:35:34 +0100
commit804c7139c2bb2cbc3053008703c86f9bf9f01aa6 (patch)
treecdb5f3dcb40afc7544f8d3db88379414172c70f5
parentee93be501e479668b27c416522ca9282c11f0ef2 (diff)
downloadkit-804c7139c2bb2cbc3053008703c86f9bf9f01aa6.zip
[cmake] Add ANSI C option
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07b2738..6dacbc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,12 @@ 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_ENABLE_TESTING)
+if(KIT_FORCE_ANSI_C)
set(CMAKE_C_STANDARD 90)
set(CMAKE_C_EXTENSIONS OFF)
endif()