diff --git a/CMakeLists.txt b/CMakeLists.txt index f545d1e3478052c8768ed2a9388e6481bb01f80a..0052b9546d21af2ba28d109b8e41f03b090ea029 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -961,8 +961,13 @@ option ( WALBERLA_THREAD_SAFE_LOGGING "Enables/Disables thread-safe logging" ON if ( WALBERLA_BUILD_WITH_OPENMP ) if ( WALBERLA_CXX_COMPILER_IS_INTEL ) - add_flag ( CMAKE_C_FLAGS "-openmp" ) - add_flag ( CMAKE_CXX_FLAGS "-openmp" ) + if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "15.0" ) + add_flag ( CMAKE_C_FLAGS "-openmp" ) + add_flag ( CMAKE_CXX_FLAGS "-openmp" ) + else() + add_flag ( CMAKE_C_FLAGS "-qopenmp" ) + add_flag ( CMAKE_CXX_FLAGS "-qopenmp" ) + endif() elseif ( CMAKE_COMPILER_IS_GNUCXX ) add_flag ( CMAKE_C_FLAGS "-fopenmp" ) add_flag ( CMAKE_CXX_FLAGS "-fopenmp" )