@@ -59,14 +59,14 @@ if( NOT DEFINED AMReX_DIR )
59
59
GIT_TAG ${AMReX_GIT_BRANCH}
60
60
)
61
61
62
- if (NOT ${amrex} _POPULATED)
63
- FetchContent_Populate (amrex)
62
+ if (NOT ${amrex} _POPULATED)
63
+ FetchContent_MakeAvailable (amrex)
64
64
65
- list (APPEND CMAKE_MODULE_PATH ${amrex_SOURCE_DIR} /Tools/CMake)
65
+ list (APPEND CMAKE_MODULE_PATH ${amrex_SOURCE_DIR} /Tools/CMake)
66
66
67
- # Load amrex options here so that they are
68
- # available to the entire project
69
- include (AMReXOptions)
67
+ # Load amrex options here so that they are
68
+ # available to the entire project
69
+ include (AMReXOptions)
70
70
71
71
if ( AMReX_SUNDIALS )
72
72
if ( NOT DEFINED SUNDIALS_DIR )
@@ -86,7 +86,7 @@ if( NOT DEFINED SUNDIALS_DIR )
86
86
)
87
87
88
88
if (NOT ${sundials} _POPULATED)
89
- FetchContent_Populate (sundials)
89
+ FetchContent_MakeAvailable (sundials)
90
90
# set(SUNDIALS_DIR ${sundials_SOURCE_DIR})
91
91
# Set build options for subproject
92
92
set (EXAMPLES_ENABLE_C OFF CACHE INTERNAL "" )
@@ -122,9 +122,6 @@ if( NOT DEFINED SUNDIALS_DIR )
122
122
endif ()
123
123
list (APPEND CMAKE_MODULE_PATH ${sundials_SOURCE_DIR} )
124
124
125
- # Add SUNDIALS sources to the build
126
- add_subdirectory (${sundials_SOURCE_DIR} )
127
-
128
125
# This is to use the same target name uses by the sundials exported targets
129
126
add_library (SUNDIALS::cvode ALIAS sundials_cvode_static)
130
127
add_library (SUNDIALS::arkode ALIAS sundials_arkode_static)
@@ -172,9 +169,6 @@ endif ()
172
169
include (AMReX_SetupCUDA)
173
170
endif ()
174
171
endif ()
175
-
176
- # Bring the populated content into the build
177
- add_subdirectory (${amrex_SOURCE_DIR} ${amrex_BINARY_DIR} )
178
172
endif ()
179
173
else ()
180
174
message (STATUS "Using existing AMReX library" )
@@ -210,10 +204,8 @@ if(TUTORIAL_PYTHON)
210
204
GIT_REPOSITORY ${pyAMReX_GIT_REPO}
211
205
GIT_TAG ${pyAMReX_GIT_BRANCH}
212
206
)
213
-
214
207
if (NOT fetchedpyamrex_POPULATED)
215
- FetchContent_Populate(fetchedpyamrex)
216
- add_subdirectory (${fetchedpyamrex_SOURCE_DIR} ${fetchedpyamrex_BINARY_DIR} )
208
+ FetchContent_MakeAvailable(fetchedpyamrex)
217
209
endif ()
218
210
endif ()
219
211
endif ()
0 commit comments