Commit 9885aac6 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Add check before using a flag to ensure clang can compile

parent 09e9b58e
......@@ -117,7 +117,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/")
else()
# NOT INTEL
if(NOT ScalFMM_USE_MPI)
set(ScalFMM_CXX_FLAGS "${ScalFMM_CXX_FLAGS} -Wzero-as-null-pointer-constant")
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wzero-as-null-pointer-constant HAS_WZERO_NULL_PTR_FLAG)
if(HAS_WZERO_NULL_PTR_FLAG)
set(ScalFMM_CXX_FLAGS "${ScalFMM_CXX_FLAGS} -Wzero-as-null-pointer-constant")
endif()
else()
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wno-literal-suffix HAS_NO_LITERAL_SUFFIX_FLAG)
......
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