mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 23:53:07 +00:00
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions add_target_compile_flags -> target_compile_options add_target_include_directories -> target_include_directories
This commit is contained in:
parent
480f729f6d
commit
7e069ccdb2
93 changed files with 163 additions and 180 deletions
|
@ -31,16 +31,7 @@ endfunction()
|
|||
# arguments, all of which will be added to the list
|
||||
#
|
||||
# Examples:
|
||||
# add_target_compile_flags(mymodule "-pedantic -O5")
|
||||
# add_target_link_flags(mymodule "-s --fatal-warnings")
|
||||
# add_target_compile_definitions(mymodule WIN32 _WIN32 INLINE=inline)
|
||||
# add_target_include_directories(mymodule include ../include)
|
||||
function(add_target_compile_flags _module _flags)
|
||||
if(${ARGC} GREATER 2)
|
||||
message(FATAL_ERROR "Excess arguments to add_target_compile_flags! Module ${_module}, args ${ARGN}")
|
||||
endif()
|
||||
add_target_property(${_module} COMPILE_FLAGS ${_flags})
|
||||
endfunction()
|
||||
|
||||
function(add_target_link_flags _module _flags)
|
||||
if(${ARGC} GREATER 2)
|
||||
|
@ -49,14 +40,6 @@ function(add_target_link_flags _module _flags)
|
|||
add_target_property(${_module} LINK_FLAGS ${_flags})
|
||||
endfunction()
|
||||
|
||||
function(add_target_compile_definitions _module)
|
||||
add_target_property(${_module} COMPILE_DEFINITIONS ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(add_target_include_directories _module)
|
||||
add_target_property(${_module} INCLUDE_DIRECTORIES ${ARGN})
|
||||
endfunction()
|
||||
|
||||
# replace_compiler_option
|
||||
# (taken from LLVM)
|
||||
# Replaces a compiler option or switch `_old' in `_var' by `_new'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue