You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/04/02 15:31:38 UTC

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1090: DISPATCH-2025 Compile using C11 language version

jiridanek commented on a change in pull request #1090:
URL: https://github.com/apache/qpid-dispatch/pull/1090#discussion_r606289032



##########
File path: CMakeLists.txt
##########
@@ -20,11 +20,46 @@
 cmake_minimum_required(VERSION 2.8.12)
 project(qpid-dispatch C CXX)
 
+# This effectively checks for cmake version 3.1 or later
+if (DEFINED CMAKE_C_COMPILE_FEATURES)
+    set(CMAKE_C_STANDARD 11)
+    set(CMAKE_C_STANDARD_REQUIRED ON)
+    set(CMAKE_C_EXTENSIONS ON) # gnu11
+
+    set(CMAKE_CXX_STANDARD 11)
+    set(CMAKE_CXX_STANDARD_REQUIRED ON)
+    set(CMAKE_CXX_EXTENSIONS OFF)
+else()
+    set(C_STANDARD_GNU "-std=gnu11")
+    set(C_STANDARD_Clang "-std=gnu11")
+    set(C_STANDARD_SunPro "-xc11")

Review comment:
       My best guess is `-std=c11` for SunPro. I'll put it there and we will see when somebody who actually has SunOS tries to compile.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org