Use target_compile_options function in CMake script.
This commit is contained in:
parent
8d511f46f4
commit
95d189e244
|
@ -87,11 +87,6 @@ include_directories(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-Wall -Wextra -Werror -Wno-unused-parameter -Wno-deprecated-register
|
||||
-std=c++0x -DYYDEBUG=0
|
||||
)
|
||||
|
||||
bison_target(Parser Monicelli.ypp ${CMAKE_CURRENT_BINARY_DIR}/Parser.cpp)
|
||||
flex_target(Scanner Monicelli.lpp ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cpp)
|
||||
add_flex_bison_dependency(Scanner Parser)
|
||||
|
@ -102,6 +97,12 @@ add_executable(mcc
|
|||
CppEmitter.cpp BitcodeEmitter.cpp
|
||||
)
|
||||
|
||||
target_compile_options(mcc PRIVATE
|
||||
${LLVM_CXXFLAGS} ${Boost_CXXFLAGS}
|
||||
-Wall -Wextra -Werror -Wno-unused-parameter -Wno-deprecated-register
|
||||
-std=c++0x -DYYDEBUG=0
|
||||
)
|
||||
|
||||
llvm_map_components_to_libnames(LLVM_LIBRARIES
|
||||
support core native bitwriter
|
||||
)
|
||||
|
|
Reference in New Issue
Block a user