]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix overridde CMAKE_C_STANDARD, CMAKE_C_STANDARD_REQUIRED, CMAKE_C_EXTENSIONS. False...
authorVladislav Shchapov <vladislav@shchapov.ru>
Tue, 17 Sep 2024 15:10:34 +0000 (20:10 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 18 Sep 2024 08:05:43 +0000 (10:05 +0200)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
CMakeLists.txt

index deb075d10691214f1a841e48fd3a54943cb82a65..dca75063a5c07747968b0ccc0ce2588df284c96a 100644 (file)
@@ -9,13 +9,13 @@ message(STATUS "Using CMake version ${CMAKE_VERSION}")
 # If not specified on the command line, enable C11 as the default
 # Configuration items that affect the global compiler environment standards
 # should be issued before the "project" command.
-if(NOT CMAKE_C_STANDARD)
+if(NOT DEFINED CMAKE_C_STANDARD)
     set(CMAKE_C_STANDARD 11)          # The C standard whose features are requested to build this target
 endif()
-if(NOT CMAKE_C_STANDARD_REQUIRED)
+if(NOT DEFINED CMAKE_C_STANDARD_REQUIRED)
     set(CMAKE_C_STANDARD_REQUIRED ON) # Boolean describing whether the value of C_STANDARD is a requirement
 endif()
-if(NOT CMAKE_C_EXTENSIONS)
+if(NOT DEFINED CMAKE_C_EXTENSIONS)
     set(CMAKE_C_EXTENSIONS OFF)       # Boolean specifying whether compiler specific extensions are requested
 endif()
 set(VALID_C_STANDARDS "99" "11")