File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ if (NOT COMMAND append_if)
9
9
endfunction ()
10
10
endif ()
11
11
12
+ if (NOT COMMAND append )
13
+ function (append value )
14
+ foreach (variable ${ARGN} )
15
+ set (${variable} "${${variable} } ${value} " PARENT_SCOPE )
16
+ endforeach (variable )
17
+ endfunction ()
18
+ endif ()
19
+
12
20
# MSVC and clang-cl in compatibility mode map -Wall to -Weverything.
13
21
# TODO: LLVM adds /W4 instead, check if that works for the OpenMP runtimes.
14
22
if (NOT MSVC )
@@ -44,9 +52,9 @@ append_if(OPENMP_HAVE_DATA_SECTIONS "-fdata-sections" CMAKE_C_FLAGS CMAKE_CXX_FL
44
52
45
53
if (MSVC )
46
54
# Disable "warning C4201: nonstandard extension used: nameless struct/union"
47
- append_if ( TRUE "-wd4201" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
55
+ append ( "-wd4201" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
48
56
49
57
# Disable "warning C4190: '__kmpc_atomic_cmplx8_rd' has C-linkage specified, but returns
50
58
# UDT '__kmp_cmplx64_t' which is incompatible with C"
51
- append_if ( TRUE "-wd4190" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
59
+ append ( "-wd4190" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
52
60
endif ()
You can’t perform that action at this time.
0 commit comments