diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-01-27 19:29:48 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-01-27 19:29:48 +0000 |
commit | 632ad9bfe60dca1475da69ec5993879b211fa97c (patch) | |
tree | f100a7f3cf08bbbc8ecc037d16a740668fcc5631 | |
parent | bbc4eea2c26960ced56906d4a2573c8c1d291dc2 (diff) | |
download | bcm5719-llvm-632ad9bfe60dca1475da69ec5993879b211fa97c.tar.gz bcm5719-llvm-632ad9bfe60dca1475da69ec5993879b211fa97c.zip |
Don't show -pedantic, -W and -Wall on the output of
llvm-config --cflags --cxxflags --cppflags
We shouldn't impose those flags on people who use llvm-config for
building their own projects.
llvm-svn: 124399
-rw-r--r-- | llvm/cmake/modules/AddLLVMDefinitions.cmake | 5 | ||||
-rw-r--r-- | llvm/tools/llvm-config/CMakeLists.txt | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddLLVMDefinitions.cmake b/llvm/cmake/modules/AddLLVMDefinitions.cmake index 0f6d81f736d..2787830bfa9 100644 --- a/llvm/cmake/modules/AddLLVMDefinitions.cmake +++ b/llvm/cmake/modules/AddLLVMDefinitions.cmake @@ -5,7 +5,10 @@ # Beware that there is no implementation of remove_llvm_definitions.
macro(add_llvm_definitions)
- set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${ARGN}")
+ # We don't want no semicolons on LLVM_DEFINITIONS:
+ foreach(arg ${ARGN})
+ set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}")
+ endforeach(arg)
add_definitions( ${ARGN} )
endmacro(add_llvm_definitions)
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt index cf672a48691..b9a833f7bbd 100644 --- a/llvm/tools/llvm-config/CMakeLists.txt +++ b/llvm/tools/llvm-config/CMakeLists.txt @@ -92,6 +92,17 @@ set(C_FLGS "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") set(CXX_FLGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") set(CPP_FLGS "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") +# We don't want certain flags on the output of +# llvm-config --cflags --cxxflags +macro(remove_option_from_llvm_config option) + llvm_replace_compiler_option(C_FLGS "${option}" "") + llvm_replace_compiler_option(CXX_FLGS "${option}" "") + llvm_replace_compiler_option(CPP_FLGS "${option}" "") +endmacro(remove_option_from_llvm_config) +remove_option_from_llvm_config("-pedantic") +remove_option_from_llvm_config("-Wall") +remove_option_from_llvm_config("-W") + add_custom_command(OUTPUT ${LLVM_CONFIG} COMMAND echo 's!@LLVM_CPPFLAGS@!${CPP_FLGS}!' > temp.sed COMMAND echo 's!@LLVM_CFLAGS@!${C_FLGS}!' >> temp.sed |