mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-21 15:02:51 +00:00
e9d4267277
Prefer using '-std=gnu++11' over '-std=c++11' when available, as NetBSD exposes the correct alloca() implementation only with gnu* C/C++ standards. Differential Revision: https://reviews.llvm.org/D55477 llvm-svn: 348854
20 lines
586 B
CMake
20 lines
586 B
CMake
if (${OPENMP_STANDALONE_BUILD})
|
|
# From HandleLLVMOptions.cmake
|
|
function(append_if condition value)
|
|
if (${condition})
|
|
foreach(variable ${ARGN})
|
|
set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
|
|
endforeach(variable)
|
|
endif()
|
|
endfunction()
|
|
endif()
|
|
|
|
if (${OPENMP_ENABLE_WERROR})
|
|
append_if(OPENMP_HAVE_WERROR_FLAG "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
|
endif()
|
|
|
|
append_if(OPENMP_HAVE_STD_GNUPP11_FLAG "-std=gnu++11" CMAKE_CXX_FLAGS)
|
|
if (NOT OPENMP_HAVE_STD_GNUPP11_FLAG)
|
|
append_if(OPENMP_HAVE_STD_CPP11_FLAG "-std=c++11" CMAKE_CXX_FLAGS)
|
|
endif()
|