File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ mark_as_advanced(GMX_USE_PLUMED)
48
48
function (gmx_manage_plumed)
49
49
# Create a link target, leave it empty if the plumed option is not active
50
50
add_library (plumedgmx INTERFACE )
51
- set (GMX_PLUMED_ACTIVE OFF CACHE INTERNAL "Cache entry for PLUMED activation" )
51
+ set (GMX_PLUMED_ACTIVE OFF PARENT_SCOPE )
52
52
if (WIN32 )
53
53
if (GMX_USE_PLUMED STREQUAL "ON" )
54
54
message (FATAL_ERROR "PLUMED is not supported on Windows. Reconfigure with -DGMX_USE_PLUMED=OFF." )
@@ -67,7 +67,7 @@ function(gmx_manage_plumed)
67
67
target_link_libraries ( plumedgmx INTERFACE ${CMAKE_DL_LIBS} )
68
68
# The plumedgmx already exists, now we set it up:
69
69
target_include_directories (plumedgmx SYSTEM INTERFACE $<BUILD_INTERFACE:${PLUMED_DIR} >)
70
- set (GMX_PLUMED_ACTIVE ON CACHE INTERNAL "Cache entry for PLUMED activation" )
70
+ set (GMX_PLUMED_ACTIVE ON PARENT_SCOPE )
71
71
else ()
72
72
if (GMX_USE_PLUMED STREQUAL "ON" )
73
73
message (FATAL_ERROR "PLUMED needs dlopen or anything equivalent. Reconfigure with -DGMX_USE_PLUMED=OFF." )
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ mark_as_advanced(GMX_USE_SIMD_KERNELS)
68
68
# pulling is using the muparser target as well, so detect it early
69
69
gmx_manage_muparser()
70
70
71
+ # The following functions and macros called here sets up the "module_x_active" variable before
72
+ # including the directories with their own modules
73
+ gmx_manage_plumed()
74
+
71
75
# Add these contents first because linking their tests can take a lot
72
76
# of time, so we want lots of parallel work still available after
73
77
# linking starts.
@@ -450,7 +454,6 @@ target_link_libraries(libgromacs PRIVATE lmfit)
450
454
target_link_libraries (libgromacs PRIVATE muparser::muparser)
451
455
gmx_manage_colvars()
452
456
target_link_libraries (libgromacs PRIVATE colvars)
453
- gmx_manage_plumed()
454
457
target_link_libraries (libgromacs PRIVATE plumedgmx)
455
458
456
459
# Make sure we fix "everything" found by compilers that support that
You can’t perform that action at this time.
0 commit comments