Author: brane
Date: Tue Jul  1 00:24:53 2025
New Revision: 1926880

URL: http://svn.apache.org/viewvc?rev=1926880&view=rev
Log:
In the CMake build, disable C language extensions. Without this, CMake will
set the compiler flag to -std=gnu90 instead of -std=c90 (or 99, as the case
may be) and we don't want that.

* CMakeLists.txt
  (CMAKE_C_EXTENSIONS): Turn off.

* test/MockHTTPinC/CMakeLists.txt
  (CMAKE_C_STANDARD_REQUIRED): Remove. It's inherited.

Modified:
    serf/trunk/CMakeLists.txt
    serf/trunk/test/MockHTTPinC/CMakeLists.txt

Modified: serf/trunk/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/serf/trunk/CMakeLists.txt?rev=1926880&r1=1926879&r2=1926880&view=diff
==============================================================================
--- serf/trunk/CMakeLists.txt (original)
+++ serf/trunk/CMakeLists.txt Tue Jul  1 00:24:53 2025
@@ -351,6 +351,7 @@ endif()
 
 # Set common compiler flags
 set(CMAKE_C_STANDARD 90)        # Use C90. MockHTTP overrides this.
+set(CMAKE_C_EXTENSIONS OFF)
 set(CMAKE_C_STANDARD_REQUIRED TRUE)
 
 if(NOT MSVC)

Modified: serf/trunk/test/MockHTTPinC/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/CMakeLists.txt?rev=1926880&r1=1926879&r2=1926880&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/CMakeLists.txt (original)
+++ serf/trunk/test/MockHTTPinC/CMakeLists.txt Tue Jul  1 00:24:53 2025
@@ -24,7 +24,6 @@ set(MockHTTPinC_SOURCES
 
 # MockHTTP requires the C99 standard.
 set(CMAKE_C_STANDARD 99)
-set(CMAKE_C_STANDARD_REQUIRED TRUE)
 
 # Update compiler options for this library.
 if(NOT SHOW_MockHTTPinC_WARNINGS)


Reply via email to