https://git.reactos.org/?p=reactos.git;a=commitdiff;h=84621b3634fb674c7176df...
commit 84621b3634fb674c7176df2ef087b793e2381f89 Author: Jérôme Gardou jerome.gardou@reactos.org AuthorDate: Fri Sep 18 16:54:21 2020 +0200 Commit: Jérôme Gardou zefklop@users.noreply.github.com CommitDate: Tue Oct 20 21:44:54 2020 +0200
[CMAKE] Get rid of replace_compiler_option macro
This is not used anymore --- sdk/cmake/compilerflags.cmake | 21 --------------------- 1 file changed, 21 deletions(-)
diff --git a/sdk/cmake/compilerflags.cmake b/sdk/cmake/compilerflags.cmake index 5da48e6cb53..d42b57cbb05 100644 --- a/sdk/cmake/compilerflags.cmake +++ b/sdk/cmake/compilerflags.cmake @@ -49,27 +49,6 @@ function(add_target_link_flags _module _flags) add_target_property(${_module} LINK_FLAGS ${_flags}) endfunction()
-# replace_compiler_option -# (taken from LLVM) -# Replaces a compiler option or switch `_old' in `_var' by `_new'. -# If `_old' is not in `_var', appends `_new' to `_var'. -# -# Example: -# replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2") -macro(replace_compiler_option _var _old _new) - # If the option already is on the variable, don't add it: - if("${${_var}}" MATCHES "(^| )${_new}($| )") - set(__n "") - else() - set(__n "${_new}") - endif() - if("${${_var}}" MATCHES "(^| )${_old}($| )") - string(REGEX REPLACE "(^| )${_old}($| )" " ${__n} " ${_var} "${${_var}}") - else() - set(${_var} "${${_var}} ${__n}") - endif() -endmacro(replace_compiler_option) - # add_compile_flags # Add or replace compiler flags in the global scope for either all source # files or only those of the specified language.