Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for OpenMP compiler support #4422

Merged
merged 5 commits into from
Jan 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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