diff options
author | Ron Economos <w6rz@comcast.net> | 2019-04-20 18:04:34 -0700 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2019-04-21 07:52:32 +0200 |
commit | 92c823e90c4a2ec382446e77b7121f567dcc4d9a (patch) | |
tree | 86730b64097c72c70a4d57c3110e8ac0992ff9db /gr-utils/python | |
parent | 518634bf072886a93c711211d099650ced3bbcc0 (diff) |
modtool: Set C/C++ standard to 11 for OOT's.
Allows OOT's to compile with gcc 5.4 (Ubuntu 16.04).
Diffstat (limited to 'gr-utils/python')
-rw-r--r-- | gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt index 0cf7f462a0..ea8eb3fb8e 100644 --- a/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt +++ b/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt @@ -59,6 +59,26 @@ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR add_definitions(-fvisibility=hidden) endif() +IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_CXX_STANDARD 11) +ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(CMAKE_CXX_STANDARD 11) +ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + SET(CMAKE_CXX_STANDARD 11) +ELSE() + message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.") +ENDIF() + +IF(CMAKE_C_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_C_STANDARD 11) +ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang") + SET(CMAKE_C_STANDARD 11) +ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + SET(CMAKE_C_STANDARD 11) +ELSE() + message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.") +ENDIF() + ######################################################################## # Install directories ######################################################################## |