Commit 80650ecf authored by Luca Boccassi's avatar Luca Boccassi

Problem: need to check for C++ standard in cmake

Solution: use CheckCXXCompilerFlag to check for support for
-std=gnu++11
parent b9f1e3ed
......@@ -5,6 +5,17 @@ project (ZeroMQ)
list (INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("-std=gnu11" COMPILER_SUPPORTS_C11)
if(COMPILER_SUPPORTS_C11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
option (WITH_OPENPGM "Build with support for OpenPGM" OFF)
option (WITH_VMCI "Build with support for VMware VMCI socket" OFF)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment