build: fix add_definition abuse in CMake

add_definitions is meant for adding C preprocessor definitions.  Modern cmake
suggests use of the CMAKE_CXX_FLAGS for the purposes of pushing flags to the
compilation commands.  Simply switch to the modern form given that we are
already requiring a new enough cmake.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203637 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-03-12 04:11:28 +00:00
parent 6875f3b6e4
commit 89a52ffd54

View File

@ -259,11 +259,14 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
add_definitions(
${LIBCXX_CXX_REQUIRED_FLAGS}
${LIBCXX_CXX_WARNING_FLAGS}
${LIBCXX_CXX_FEATURE_FLAGS}
)
string(REPLACE ";" " " LIBCXX_CXX_REQUIRED_FLAGS "${LIBCXX_CXX_REQUIRED_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_REQUIRED_FLAGS}")
string(REPLACE ";" " " LIBCXX_CXX_WARNING_FLAGS "${LIBCXX_CXX_WARNING_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_WARNING_FLAGS}")
string(REPLACE ";" " " LIBCXX_CXX_FEATURE_FLAGS "${LIBCXX_CXX_FEATURE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_FEATURE_FLAGS}")
#===============================================================================
# Setup Source Code