Skip to content

Commit

Permalink
No longer need to patch GROMACS CMake recipe for OpenMP
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Jan 11, 2024
1 parent cac51a1 commit cc70416
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions gromacs/gromacs-mdmodules/gmxManageColvars.cmake.diff
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.

0 comments on commit cc70416

Please sign in to comment.