These are needed by both libraries, so we can do that in a common namespace and unify configuration parameters. Also make sure that the user isn't requesting libomptarget if the library cannot be built on the system. Issue an error in that case. Differential Revision: https://reviews.llvm.org/D40081 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319342 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
466 B
CMake
16 lines
466 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_CPP11_FLAG "-std=c++11" CMAKE_CXX_FLAGS) |