Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Hönig
waLBerla
Commits
43e4e35f
Commit
43e4e35f
authored
Sep 06, 2021
by
Dominik Thoennes
Browse files
add check for llvm bug and disable sign-conversion warning if needed
parent
d5be87ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
43e4e35f
...
...
@@ -1033,6 +1033,15 @@ if ( WALBERLA_BUILD_WITH_OPENMP )
message
(
FATAL_ERROR
"Could NOT enable OpenMP"
)
endif
()
endif
()
# check for bug in combination with OpenMP and sign conversion https://bugs.llvm.org/show_bug.cgi?id=48387
try_compile
(
WALBERLA_CLANG_OPENMP_BUG
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/TestClangOpenMPBug.cpp"
COMPILE_DEFINITIONS -Werror
)
if
(
NOT
${
WALBERLA_CLANG_OPENMP_BUG
}
)
message
(
WARNING
"Setting -Wno-sign-conversion due to a compiler bug in LLVM (https://bugs.llvm.org/show_bug.cgi?id=48387)"
)
add_flag
(
CMAKE_CXX_FLAGS
"-Wno-sign-conversion"
)
endif
()
else
()
if
(
WALBERLA_CXX_COMPILER_IS_CRAY
)
add_flag
(
CMAKE_C_FLAGS
"-h noomp"
)
...
...
cmake/TestClangOpenMPBug.cpp
0 → 100644
View file @
43e4e35f
#include
<iostream>
int
main
()
{
int
min
=
-
10
;
#pragma omp parallel for
for
(
int
i
=
min
;
i
<=
10
;
++
i
)
{
std
::
cout
<<
i
<<
std
::
endl
;
}
return
0
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment