From 4baa2f6a0d4219df41dcc0ba752e9efcae492f22 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 20 Nov 2023 11:21:04 +0000 Subject: [PATCH] Add -fopenmp-simd flags if available --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbe438b0..f64c5834 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,12 @@ if (NOT HPCOMBI_DISABLE_MARCH_NATIVE) endif() endif() +check_cxx_compiler_flag('-fopenmp-simd', HPCOMBI_HAVE_OPENMP_SIMD_FLAG) + +if (HPCOMBI_HAVE_OPENMP_SIMD_FLAG) + add_compile_options(-fopenmp-simd -DSIMDE_ENABLE_OPENMP) +endif() + # Currently the code coverage fails to link on Mac OSX, not sure why if(CODE_COVERAGE) include(CheckCCompilerFlag) @@ -122,7 +128,6 @@ if (BUILD_TESTING) add_subdirectory(benchmark) endif(BUILD_TESTING) - ################### # pkgconfig stuff configure_file(${CMAKE_SOURCE_DIR}/HPCOMBI_VERSION.in