Hi Saleem, This resurrects the error I tried to fix in r191814. See the error on our buildbot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/7812/steps/build%2064-bit%20llvm%20using%20clang/logs/stdio -Werror flag, which is presumably added by add_llvm_definitions() in HandleLLVMOptions.cmake appears *after* -Wno-error added by libcxx CMakeLists.txt. Should we just get rid of add_llvm_definitions() in LLVM's CMake files and add a flag to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS variables instead?
On Wed, Mar 12, 2014 at 8:11 AM, Saleem Abdulrasool <[email protected]>wrote: > Author: compnerd > Date: Tue Mar 11 23:11:28 2014 > New Revision: 203637 > > URL: http://llvm.org/viewvc/llvm-project?rev=203637&view=rev > Log: > 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. > > Modified: > libcxx/trunk/CMakeLists.txt > > Modified: libcxx/trunk/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=203637&r1=203636&r2=203637&view=diff > > ============================================================================== > --- libcxx/trunk/CMakeLists.txt (original) > +++ libcxx/trunk/CMakeLists.txt Tue Mar 11 23:11:28 2014 > @@ -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 > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > -- Alexey Samsonov, MSK
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
