From 804c7139c2bb2cbc3053008703c86f9bf9f01aa6 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 1 Jan 2023 17:35:34 +0100 Subject: [cmake] Add ANSI C option --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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() -- cgit v1.2.3