Skip to content

Commit

Permalink
Merge pull request #4422 from PhilipFackler/check-openmp-support
Browse files Browse the repository at this point in the history
Check for OpenMP compiler support
  • Loading branch information
prckent authored Jan 29, 2023
2 parents ad33976 + 9db115b commit a0bbb67
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,26 @@ if(INSTALL_NEXUS)
endif()

######################################################################
# Set the compiler specific options/flags
# Set compiler specific options/flags
######################################################################
#-------------------------------------------------------------------------------
# Check for OpenMP compiler support
#
# The CMake OpenMP package is *only* used to to verify compiler support.
# No feature of the package is used and we customize OpenMP options directly
# on a per vendor/compiler basis.
#-------------------------------------------------------------------------------
if(QMC_OMP)
find_package(OpenMP)
if(NOT OpenMP_FOUND)
message(FATAL_ERROR "No compiler support for OpenMP found. Switching to a compiler with OpenMP support is recommended."
"Alternatively, you will need to run CMake configure with -DQMC_OMP=OFF")
endif()
endif(QMC_OMP)

#-------------------------------------------------------------------------------
# Set vendor specific compiler options
#-------------------------------------------------------------------------------
if(CMAKE_TOOLCHAIN_FILE)
message(STATUS "Using ${CMAKE_TOOLCHAIN_FILE} toolchain ")
else(CMAKE_TOOLCHAIN_FILE)
Expand Down

0 comments on commit a0bbb67

Please sign in to comment.