Commit 00f6dd84 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[BUGFIX] handle failing of FindOpenMP

parent 69cae363
Pipeline #29695 passed with stages
in 376 minutes and 28 seconds
......@@ -1001,19 +1001,25 @@ endif()
option ( WALBERLA_THREAD_SAFE_LOGGING "Enables/Disables thread-safe logging" ON )
if ( WALBERLA_BUILD_WITH_OPENMP )
if ( WALBERLA_CXX_COMPILER_IS_NEC )
add_flag ( CMAKE_C_FLAGS "-Popenmp" )
add_flag ( CMAKE_CXX_FLAGS "-Popenmp" )
find_package( OpenMP )
if (OpenMP_FOUND)
add_flag ( CMAKE_C_FLAGS "${OpenMP_C_FLAGS}" )
add_flag ( CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS}" )
list ( APPEND SERVICE_LIBS ${OpenMP_CXX_LIBRARIES} )
else()
find_package( OpenMP )
add_flag ( CMAKE_C_FLAGS "${OpenMP_C_FLAGS}" )
add_flag ( CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS}" )
list ( APPEND SERVICE_LIBS ${OpenMP_CXX_LIBRARIES} )
#workarounds
if ( WALBERLA_CXX_COMPILER_IS_NEC )
message( STATUS "Enabling OpenMP workaround for NEC")
add_flag ( CMAKE_C_FLAGS "-Popenmp" )
add_flag ( CMAKE_CXX_FLAGS "-Popenmp" )
else()
message(FATAL_ERROR "Could NOT enable OpenMP")
endif()
endif()
else()
if ( WALBERLA_CXX_COMPILER_IS_CRAY )
add_flag ( CMAKE_C_FLAGS "-h noomp" )
add_flag ( CMAKE_CXX_FLAGS "-h noomp" )
add_flag ( CMAKE_C_FLAGS "-h noomp" )
add_flag ( CMAKE_CXX_FLAGS "-h noomp" )
endif()
endif()
############################################################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment