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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 15:40:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 15:40:00 +0300
commit6cd0484de8c765e5ce0f2072c7b10af0794ce7f8 (patch)
treeaf31da8e5cf2cf51d7d0ac0c2b14a45b8dabea65 /build_files
parentec27776d8e44137333468e24ab0606d17ad87bfe (diff)
CMake: Make language explicit for per-file strict flags removal
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake25
1 files changed, 18 insertions, 7 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index b487eb4f61b..d265b8ffad2 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1120,28 +1120,39 @@ endmacro()
# note, we can only append flags on a single file so we need to negate the options.
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
# probably add more removals here.
-macro(remove_strict_flags_file
+macro(remove_strict_c_flags_file
filenames)
-
foreach(_SOURCE ${ARGV})
-
if(CMAKE_COMPILER_IS_GNUCC OR
(CMAKE_C_COMPILER_ID MATCHES "Clang"))
-
set_source_files_properties(${_SOURCE}
PROPERTIES
COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
)
endif()
-
if(MSVC)
# TODO
endif()
-
endforeach()
-
unset(_SOURCE)
+endmacro()
+macro(remove_strict_cxx_flags_file
+ filenames)
+ remove_strict_c_flags_file(${filenames} ${ARHV})
+ foreach(_SOURCE ${ARGV})
+ if(CMAKE_COMPILER_IS_GNUCC OR
+ (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+ set_source_files_properties(${_SOURCE}
+ PROPERTIES
+ COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
+ )
+ endif()
+ if(MSVC)
+ # TODO
+ endif()
+ endforeach()
+ unset(_SOURCE)
endmacro()
# External libs may need 'signed char' to be default.