Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 02:29:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commit2bd8f7e05936a932d816b722c433a7165de64db0 (patch)
treed2b369b24132550a7d8a6d111338b1939476e298 /build_files/cmake/macros.cmake
parent7160682b0dd21039c6c2e9ed20d8baa4f3cea2ac (diff)
Cleanup: use string APPEND/PREPEND
Replace 'set' with 'string(APPEND/PREPEND ...)'. This avoids duplicating the variable name.
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index ea348b06a07..202b44f611c 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -196,7 +196,7 @@ function(blender_user_header_search_paths
foreach(_INC ${includes})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
# _ALL_INCS is a space-separated string of file paths in quotes.
- set(_ALL_INCS "${_ALL_INCS} \"${_ABS_INC}\"")
+ string(APPEND _ALL_INCS " \"${_ABS_INC}\"")
endforeach()
set_target_properties(${name} PROPERTIES XCODE_ATTRIBUTE_USER_HEADER_SEARCH_PATHS "${_ALL_INCS}")
endif()
@@ -263,11 +263,11 @@ macro(add_cc_flags_custom_test
string(TOUPPER ${name} _name_upper)
if(DEFINED CMAKE_C_FLAGS_${_name_upper})
message(STATUS "Using custom CFLAGS: CMAKE_C_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_name_upper}}" ${ARGV1})
+ string(APPEND CMAKE_C_FLAGS " ${CMAKE_C_FLAGS_${_name_upper}}" ${ARGV1})
endif()
if(DEFINED CMAKE_CXX_FLAGS_${_name_upper})
message(STATUS "Using custom CXXFLAGS: CMAKE_CXX_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_name_upper}}" ${ARGV1})
+ string(APPEND CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS_${_name_upper}}" ${ARGV1})
endif()
unset(_name_upper)
@@ -688,14 +688,14 @@ endmacro()
macro(add_c_flag
flag)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ string(APPEND CMAKE_C_FLAGS " ${flag}")
+ string(APPEND CMAKE_CXX_FLAGS " ${flag}")
endmacro()
macro(add_cxx_flag
flag)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ string(APPEND CMAKE_CXX_FLAGS " ${flag}")
endmacro()
macro(remove_strict_flags)