Skip to content

Commit

Permalink
Add -fopenmp-simd flags if available
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Nov 20, 2023
1 parent cd71b47 commit 4baa2f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -122,7 +128,6 @@ if (BUILD_TESTING)
add_subdirectory(benchmark)
endif(BUILD_TESTING)


###################
# pkgconfig stuff
configure_file(${CMAKE_SOURCE_DIR}/HPCOMBI_VERSION.in
Expand Down

0 comments on commit 4baa2f6

Please sign in to comment.