@@ -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 "" )
@@ -172,9 +172,6 @@ endif ()
172
172
include (AMReX_SetupCUDA )
173
173
endif ()
174
174
endif ()
175
-
176
- # Bring the populated content into the build
177
- add_subdirectory (${amrex_SOURCE_DIR} ${amrex_BINARY_DIR} )
178
175
endif ()
179
176
else ()
180
177
message (STATUS "Using existing AMReX library" )
@@ -210,10 +207,8 @@ if(TUTORIAL_PYTHON)
210
207
GIT_REPOSITORY ${pyAMReX_GIT_REPO}
211
208
GIT_TAG ${pyAMReX_GIT_BRANCH}
212
209
)
213
-
214
210
if (NOT fetchedpyamrex_POPULATED )
215
- FetchContent_Populate (fetchedpyamrex )
216
- add_subdirectory (${fetchedpyamrex_SOURCE_DIR} ${fetchedpyamrex_BINARY_DIR} )
211
+ FetchContent_MakeAvailable (fetchedpyamrex )
217
212
endif ()
218
213
endif ()
219
214
endif ()
0 commit comments