commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/02: cmake: Set C++ standard to C++11, C


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/02: cmake: Set C++ standard to C++11, C standard to C99
Date: Mon, 3 Apr 2017 14:08:47 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch next
in repository gnuradio.

commit 1d4dfb94b5d7464cddea27bab8ef3994a40df83f
Author: Martin Braun <address@hidden>
Date:   Sun Mar 26 23:23:21 2017 -0700

    cmake: Set C++ standard to C++11, C standard to C99
    
    This enables C++ features when using gcc and clang, which will still
    default to C++98 otherwise. C++11 is supported by all the compilers
    that are now the minimum.
---
 CMakeLists.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a33b06..b16ad0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,11 +134,11 @@ ENDIF()
 # Configure C++ and C standards
 IF(CMAKE_VERSION VERSION_LESS "3.1")
     IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     ELSE()
         MESSAGE(warning "C++ standard could not be set because compiler is not 
GNU, Clang or MSVC.")
     ENDIF()
@@ -153,8 +153,8 @@ IF(CMAKE_VERSION VERSION_LESS "3.1")
         MESSAGE(warning "C standard could not be set because compiler is not 
GNU, Clang or MSVC.")
     ENDIF()
 ELSE()
-    SET(CMAKE_C_STANDARD 90)
-    SET(CMAKE_CXX_STANDARD 98)
+    SET(CMAKE_C_STANDARD 99)
+    SET(CMAKE_CXX_STANDARD 11)
 ENDIF()
 
 ########################################################################



reply via email to

[Prev in Thread] Current Thread [Next in Thread]