mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +08:00
Problem: need to check for C++ standard in cmake
Solution: use CheckCXXCompilerFlag to check for support for -std=gnu++11
This commit is contained in:
parent
b9f1e3ed61
commit
80650ecfe2
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user