-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer need to patch GROMACS CMake recipe for OpenMP
- Loading branch information
1 parent
cac51a1
commit cc70416
Showing
1 changed file
with
1 addition
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
diff --git a/cmake/gmxManageColvars.cmake b/cmake/gmxManageColvars.cmake | ||
index 90778221..645b23b5 100644 | ||
--- a/cmake/gmxManageColvars.cmake | ||
+++ b/cmake/gmxManageColvars.cmake | ||
@@ -54,6 +54,11 @@ function(gmx_manage_colvars) | ||
target_sources(colvars INTERFACE $<TARGET_OBJECTS:colvars_objlib>) | ||
target_include_directories(colvars SYSTEM INTERFACE $<BUILD_INTERFACE:${COLVARS_DIR}>) | ||
|
||
+ if(GMX_OPENMP) | ||
+ target_compile_options(colvars_objlib PRIVATE ${OpenMP_CXX_FLAGS}) | ||
+ target_link_libraries(colvars_objlib PRIVATE OpenMP::OpenMP_CXX) | ||
+ endif() | ||
+ | ||
else() | ||
# Create a dummy link target so the calling code doesn't need to know | ||
# whether colvars support is being compiled. | ||
|