OPTION(ENABLE_ANALYSIS "Build with static analysis (make take very long)" OFF)
option(ENABLE_ANALYSIS "Build with static analysis(make take very long)" OFF)
if(MSVC)
if(ENABLE_ANALYSIS)
zmq_check_cxx_flag_prepend("/W4")
if(MSVC)
if(ENABLE_ANALYSIS)
zmq_check_cxx_flag_prepend("/W4")
zmq_check_cxx_flag_prepend("/analyze")
zmq_check_cxx_flag_prepend("/analyze")
# C++11/14/17-specific, but maybe possible via conditional defines
zmq_check_cxx_flag_prepend("/wd26440")# Function '...' can be declared 'noexcept'
zmq_check_cxx_flag_prepend("/wd26432")# If you define or delete any default operation in the type '...', define or delete them all
zmq_check_cxx_flag_prepend("/wd26439")# This kind of function may not throw. Declare it 'noexcept'
zmq_check_cxx_flag_prepend("/wd26447")# The function is declared 'noexcept' but calls function '...' which may throw exceptions
zmq_check_cxx_flag_prepend("/wd26433")# Function '...' should be marked with 'override'
zmq_check_cxx_flag_prepend("/wd26409")# Avoid calling new and delete explicitly, use std::make_unique<T> instead
zmq_check_cxx_flag_prepend("/wd26440")# Function '...' can be declared 'noexcept'
zmq_check_cxx_flag_prepend("/wd26432")# If you define or delete any default operation in the type '...', define or delete them all
zmq_check_cxx_flag_prepend("/wd26439")# This kind of function may not throw. Declare it 'noexcept'
zmq_check_cxx_flag_prepend("/wd26447")# The function is declared 'noexcept' but calls function '...' which may throw exceptions
zmq_check_cxx_flag_prepend("/wd26433")# Function '...' should be marked with 'override'
zmq_check_cxx_flag_prepend("/wd26409")# Avoid calling new and delete explicitly, use std::make_unique<T> instead
# Requires GSL
zmq_check_cxx_flag_prepend("/wd26429")# Symbol '...' is never tested for nullness, it can be marked as not_null
zmq_check_cxx_flag_prepend("/wd26446")# Prefer to use gsl::at()
zmq_check_cxx_flag_prepend("/wd26481")# Don't use pointer arithmetic. Use span instead
zmq_check_cxx_flag_prepend("/wd26472")# Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narow
zmq_check_cxx_flag_prepend("/wd26448")# Consider using gsl::finally if final action is intended
zmq_check_cxx_flag_prepend("/wd26400")# Do not assign the result of an allocation or a function call with an owner<T> return value to a raw pointer, use owner<T> instead
zmq_check_cxx_flag_prepend("/wd26485")# Expression '...': No array to pointer decay (bounds.3)
zmq_check_cxx_flag_prepend("/wd26429")# Symbol '...' is never tested for nullness, it can be marked as not_null
zmq_check_cxx_flag_prepend("/wd26446")# Prefer to use gsl::at()
zmq_check_cxx_flag_prepend("/wd26481")# Don't use pointer arithmetic. Use span instead
zmq_check_cxx_flag_prepend("/wd26472")# Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narow
zmq_check_cxx_flag_prepend("/wd26448")# Consider using gsl::finally if final action is intended
zmq_check_cxx_flag_prepend("/wd26400")# Do not assign the result of an allocation or a function call with an owner<T> return value to a raw pointer, use owner<T> instead
zmq_check_cxx_flag_prepend("/wd26485")# Expression '...': No array to pointer decay(bounds.3)
else()
zmq_check_cxx_flag_prepend("/W3")
zmq_check_cxx_flag_prepend("/W3")
endif()
if(MSVC_IDE)
set(MSVC_TOOLSET "-${CMAKE_VS_PLATFORM_TOOLSET}")
else()
set(MSVC_TOOLSET "")
endif()
else()
zmq_check_cxx_flag_prepend("-Wall")
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
zmq_check_cxx_flag_prepend("-Wextra")
endif()
option(LIBZMQ_PEDANTIC "" ON)
option(LIBZMQ_WERROR "" OFF)
# TODO: why is -Wno-long-long defined differently than in configure.ac?
if(NOT MSVC)
zmq_check_cxx_flag_prepend("-Wno-long-long")
zmq_check_cxx_flag_prepend("-Wno-uninitialized")
if(LIBZMQ_PEDANTIC)
zmq_check_cxx_flag_prepend("-pedantic")
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
zmq_check_cxx_flag_prepend("-strict-ansi")
endif()
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend("-compat=5")
endif()
endif()
if(MSVC_IDE)
set(MSVC_TOOLSET "-${CMAKE_VS_PLATFORM_TOOLSET}")
else()
set(MSVC_TOOLSET "")
endif()
else()
zmq_check_cxx_flag_prepend("-Wall")
endif()
if(LIBZMQ_WERROR)
if(MSVC)
zmq_check_cxx_flag_prepend("/WX")
else()
zmq_check_cxx_flag_prepend("-Werror")
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
zmq_check_cxx_flag_prepend("-errwarn=%all")
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
zmq_check_cxx_flag_prepend("-Wextra")
endif()
option(LIBZMQ_PEDANTIC "" ON)
option(LIBZMQ_WERROR "" OFF)
# TODO: why is -Wno-long-long defined differently than in configure.ac?
if(NOT MSVC)
zmq_check_cxx_flag_prepend("-Wno-long-long")
zmq_check_cxx_flag_prepend("-Wno-uninitialized")
if(LIBZMQ_PEDANTIC)
zmq_check_cxx_flag_prepend("-pedantic")
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
zmq_check_cxx_flag_prepend("-strict-ansi")
endif()
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend("-compat=5")
endif()
endif()
endif()
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
zmq_check_cxx_flag_prepend("-mcpu=v9")
endif()
if(LIBZMQ_WERROR)
if(MSVC)
zmq_check_cxx_flag_prepend("/WX")
else()
zmq_check_cxx_flag_prepend("-Werror")
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
zmq_check_cxx_flag_prepend("-errwarn=%all")
endif()
endif()
endif()
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend("-features=zla")
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
zmq_check_cxx_flag_prepend("-mcpu=v9")
endif()
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend("-features=zla")
endif()
if(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
message(STATUS "Checking whether atomic operations can be used")
check_c_source_compiles(
if(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
message(STATUS "Checking whether atomic operations can be used")
${OPENPGM_PKGCONFIG_NAME}" not found. openpgm is searchd via `pkg-config ${OPENPGM_PKGCONFIG_NAME}`. Consider providing a valid OPENPGM_PKGCONFIG_NAME")
endif()
if(OPENPGM_FOUND)
message(STATUS ${OPENPGM_PKGCONFIG_NAME}" found")
else()
message(FATAL_ERROR
${OPENPGM_PKGCONFIG_NAME}" not found. openpgm is searchd via `pkg-config ${OPENPGM_PKGCONFIG_NAME}`. Consider providing a valid OPENPGM_PKGCONFIG_NAME")