forked from OSchip/llvm-project
[cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones.
* Previously part of https://reviews.llvm.org/D41622. llvm-svn: 323171
This commit is contained in:
parent
4801624ee3
commit
66ddb50e44
|
@ -9,7 +9,7 @@ INCLUDE(CheckCXXSourceCompiles)
|
|||
|
||||
function(check_cxx_atomics varname)
|
||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS "-nodefaultlibs -std=c++11 -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs -std=c++11 -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include")
|
||||
if (${LIBCXX_GCC_TOOLCHAIN})
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue