@@ -59,14 +59,14 @@ if( NOT DEFINED AMReX_DIR )
5959 GIT_TAG ${AMReX_GIT_BRANCH}
6060 )
6161
62- if (NOT ${amrex} _POPULATED)
63- FetchContent_Populate (amrex)
62+ if (NOT ${amrex} _POPULATED)
63+ FetchContent_MakeAvailable (amrex)
6464
65- list (APPEND CMAKE_MODULE_PATH ${amrex_SOURCE_DIR} /Tools/CMake)
65+ list (APPEND CMAKE_MODULE_PATH ${amrex_SOURCE_DIR} /Tools/CMake)
6666
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)
7070
7171if ( AMReX_SUNDIALS )
7272if ( NOT DEFINED SUNDIALS_DIR )
@@ -86,7 +86,7 @@ if( NOT DEFINED SUNDIALS_DIR )
8686 )
8787
8888 if (NOT ${sundials} _POPULATED)
89- FetchContent_Populate (sundials)
89+ FetchContent_MakeAvailable (sundials)
9090# set(SUNDIALS_DIR ${sundials_SOURCE_DIR})
9191 # Set build options for subproject
9292 set (EXAMPLES_ENABLE_C OFF CACHE INTERNAL "" )
@@ -172,9 +172,6 @@ endif ()
172172 include (AMReX_SetupCUDA)
173173 endif ()
174174 endif ()
175-
176- # Bring the populated content into the build
177- add_subdirectory (${amrex_SOURCE_DIR} ${amrex_BINARY_DIR} )
178175 endif ()
179176else ()
180177 message (STATUS "Using existing AMReX library" )
@@ -210,10 +207,8 @@ if(TUTORIAL_PYTHON)
210207 GIT_REPOSITORY ${pyAMReX_GIT_REPO}
211208 GIT_TAG ${pyAMReX_GIT_BRANCH}
212209 )
213-
214210 if (NOT fetchedpyamrex_POPULATED)
215- FetchContent_Populate(fetchedpyamrex)
216- add_subdirectory (${fetchedpyamrex_SOURCE_DIR} ${fetchedpyamrex_BINARY_DIR} )
211+ FetchContent_MakeAvailable(fetchedpyamrex)
217212 endif ()
218213 endif ()
219214endif ()
0 commit comments