aboutsummaryrefslogtreecommitdiff
path: root/openmp/cmake
diff options
context:
space:
mode:
authorAlexandre Ganea <37383324+aganea@users.noreply.github.com>2024-02-01 08:14:05 -0500
committerGitHub <noreply@github.com>2024-02-01 08:14:05 -0500
commitd2565bb11308f6cf98d838e828d9bcbe2d51e0e4 (patch)
treefe1bf1e362023710d163366acc3e1ba64c000407 /openmp/cmake
parent178719e86043c1e830a7e24de027a84f6f8ea28f (diff)
downloadllvm-d2565bb11308f6cf98d838e828d9bcbe2d51e0e4.zip
llvm-d2565bb11308f6cf98d838e828d9bcbe2d51e0e4.tar.gz
llvm-d2565bb11308f6cf98d838e828d9bcbe2d51e0e4.tar.bz2
[openmp] On Windows, fix standalone cmake build (#80174)
This fixes: https://github.com/llvm/llvm-project/issues/80117
Diffstat (limited to 'openmp/cmake')
-rw-r--r--openmp/cmake/HandleOpenMPOptions.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index 201aeab..7134620 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -9,6 +9,14 @@ if (NOT COMMAND append_if)
endfunction()
endif()
+if (NOT COMMAND append)
+ function(append value)
+ foreach(variable ${ARGN})
+ set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+ endforeach(variable)
+ endfunction()
+endif()
+
# MSVC and clang-cl in compatibility mode map -Wall to -Weverything.
# TODO: LLVM adds /W4 instead, check if that works for the OpenMP runtimes.
if (NOT MSVC)