mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e7fc1052a
commit
d73e5751b2
@ -5,7 +5,10 @@
|
|||||||
# Beware that there is no implementation of remove_llvm_definitions.
|
# Beware that there is no implementation of remove_llvm_definitions.
|
||||||
|
|
||||||
macro(add_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} )
|
add_definitions( ${ARGN} )
|
||||||
endmacro(add_llvm_definitions)
|
endmacro(add_llvm_definitions)
|
||||||
|
|
||||||
|
@ -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(CXX_FLGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||||
set(CPP_FLGS "${CMAKE_CPP_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}
|
add_custom_command(OUTPUT ${LLVM_CONFIG}
|
||||||
COMMAND echo 's!@LLVM_CPPFLAGS@!${CPP_FLGS}!' > temp.sed
|
COMMAND echo 's!@LLVM_CPPFLAGS@!${CPP_FLGS}!' > temp.sed
|
||||||
COMMAND echo 's!@LLVM_CFLAGS@!${C_FLGS}!' >> temp.sed
|
COMMAND echo 's!@LLVM_CFLAGS@!${C_FLGS}!' >> temp.sed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user