forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: modify structure of the build
- Loading branch information
Showing
15 changed files
with
465 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,43 @@ | ||
# -*- mode: cmake -*- | ||
set (CXXSRC "") | ||
set (F90SRC "") | ||
set (F77SRC "") | ||
set (ALLHEADERS "") | ||
set (ALLSRC "") | ||
|
||
include(TestManager) | ||
set (CXXSRC | ||
AMReX_Amr.cpp AMReX_AmrLevel.cpp AMReX_AuxBoundaryData.cpp AMReX_Derive.cpp | ||
AMReX_Extrapolater.cpp AMReX_StateData.cpp AMReX_StateDescriptor.cpp ) | ||
|
||
# | ||
# Define a project name | ||
# After this command the following varaibles are defined | ||
# CAMRLIB_SOURCE_DIR | ||
# CAMRLIB_BINARY_DIR | ||
# Other projects (subdirectories) can reference this directory | ||
# through these variables. | ||
project(CAMRLIB) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
set(CXX_source_files AMReX_Amr.cpp AMReX_AmrLevel.cpp AMReX_AuxBoundaryData.cpp AMReX_Derive.cpp AMReX_Extrapolater.cpp AMReX_StateData.cpp AMReX_StateDescriptor.cpp) | ||
set(FPP_source_files AMReX_ARRAYLIM_${BL_SPACEDIM}D.F) | ||
|
||
set(CXX_header_files AMReX_Amr.H AMReX_AmrLevel.H AMReX_AuxBoundaryData.H AMReX_Derive.H AMReX_Extrapolater.H AMReX_LevelBld.H AMReX_PROB_AMR_F.H AMReX_StateData.H AMReX_StateDescriptor.H) | ||
set(FPP_header_files ) | ||
|
||
if(USE_ARRAYVIEW EQUAL TRUE) | ||
set(CXX_source_files ${CXX_source_files} AMReX_DatasetClient.cpp) | ||
set(CXX_header_files ${CXX_header_files} AMReX_DatasetClient.H) | ||
endif() | ||
set (F90SRC AMReX_extrapolater_${BL_SPACEDIM}d.f90) | ||
|
||
set(F77_header_files) | ||
set(F90_header_files) | ||
set (F77SRC AMReX_ARRAYLIM_${BL_SPACEDIM}D.F) | ||
|
||
set(F77_source_files) | ||
set(F90_source_files AMReX_extrapolater_${BL_SPACEDIM}d.f90) | ||
set (ALLHEADERS | ||
AMReX_Amr.H AMReX_AmrLevel.H AMReX_AuxBoundaryData.H AMReX_Derive.H | ||
AMReX_Extrapolater.H AMReX_LevelBld.H AMReX_PROB_AMR_F.H AMReX_StateData.H | ||
AMReX_StateDescriptor.H) | ||
|
||
preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) | ||
|
||
set(local_source_files ${FPP_out_files} ${F77_source_files} ${F90_source_files} ${CXX_source_files}) | ||
set(local_header_files ${CXX_header_files} ${F77_header_files} ${FPP_header_files} ${F90_header_files}) | ||
add_library(box_camr OBJECT ${local_source_files}) | ||
# | ||
# This is an option to display arrays in GDB. It is for debugging | ||
# AMReX and currently not supported by cmake.# | ||
# if(USE_ARRAYVIEW EQUAL TRUE) | ||
# set(CXX_source_files ${CXX_source_files} AMReX_DatasetClient.cpp) | ||
# set(CXX_header_files ${CXX_header_files} AMReX_DatasetClient.H) | ||
# endif() | ||
|
||
add_dependencies(box_camr box_c) | ||
|
||
# Collect sources | ||
set ( ALLSRC ${CXXSRC} ${F90SRC} ${F77SRC} ) | ||
|
||
install_include_files(${local_header_files}) | ||
# | ||
# Add absolute path (needed by target_sources) | ||
# | ||
prepend ( ALLSRC ${CMAKE_CURRENT_LIST_DIR} ) | ||
prepend ( ALLHEADERS ${CMAKE_CURRENT_LIST_DIR} ) | ||
|
||
if (BUILD_TESTS) | ||
target_sources ( amrex PRIVATE ${ALLSRC} ${ALLHEADERS} ) | ||
|
||
endif() | ||
# | ||
# Accumulate headers | ||
# | ||
accumulate_headers (ALLHEADERS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,45 @@ | ||
include (TestManager) | ||
set (CXXSRC "") | ||
set (F90SRC "") | ||
set (F77SRC "") | ||
set (ALLHEADERS "") | ||
set (ALLSRC "") | ||
|
||
project (CAMRCORELIB) | ||
|
||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
set ( CXX_source_files | ||
set ( CXXSRC | ||
AMReX_AmrCore.cpp AMReX_Cluster.cpp AMReX_ErrorList.cpp | ||
AMReX_FillPatchUtil.cpp AMReX_FluxRegister.cpp | ||
AMReX_Interpolater.cpp AMReX_TagBox.cpp AMReX_AmrMesh.cpp ) | ||
|
||
set ( FPP_source_files | ||
AMReX_FLUXREG_${BL_SPACEDIM}D.F AMReX_INTERP_${BL_SPACEDIM}D.F ) | ||
set ( F77SRC AMReX_FLUXREG_${BL_SPACEDIM}D.F AMReX_INTERP_${BL_SPACEDIM}D.F ) | ||
|
||
set ( F90PP_source_files AMReX_FillPatchUtil_${BL_SPACEDIM}d.F90 ) | ||
set ( F90SRC AMReX_FillPatchUtil_${BL_SPACEDIM}d.F90 ) | ||
|
||
set ( CXX_header_files | ||
set ( ALLHEADERS | ||
AMReX_AmrCore.H AMReX_Cluster.H AMReX_ErrorList.H | ||
AMReX_FillPatchUtil.H AMReX_FluxRegister.H AMReX_Interpolater.H | ||
AMReX_TagBox.H AMReX_AmrMesh.H AMReX_INTERP_F.H | ||
AMReX_FillPatchUtil_F.H) | ||
|
||
set ( FPP_header_files AMReX_FLUXREG_F.H AMReX_FillPatchUtil_F.H ) | ||
set ( F77_header_files ) | ||
set ( F90_header_files ) | ||
AMReX_FillPatchUtil_F.H AMReX_FLUXREG_F.H | ||
AMReX_FillPatchUtil_F.H ) | ||
|
||
set ( F77_source_files ) | ||
|
||
# These files are in Particle | ||
# These files are neeeded only if Particles are enabled | ||
if (ENABLE_PARTICLES EQUAL 1) | ||
list ( APPEND CXX_header_files AMReX_AmrParGDB.H AMReX_AmrParticles.H ) | ||
list ( APPEND ALLHEADERS AMReX_AmrParGDB.H AMReX_AmrParticles.H ) | ||
endif () | ||
|
||
set_F77_properties ( FPP_out_files ${FPP_source_files} ) | ||
|
||
set ( local_source_files | ||
${FPP_out_files} ${F77_source_files} ${F90_source_files} | ||
${CXX_source_files} ) | ||
|
||
set ( local_header_files | ||
${CXX_header_files} ${F77_header_files} ${FPP_header_files} | ||
${F90_header_files} ) | ||
|
||
add_library (box_camrcore OBJECT ${local_source_files}) | ||
# Collect sources | ||
set ( ALLSRC ${CXXSRC} ${F90SRC} ${F77SRC} ) | ||
|
||
install_include_files ( ${local_header_files} ) | ||
# | ||
# Add absolute path (needed by target_sources) | ||
# | ||
prepend ( ALLSRC ${CMAKE_CURRENT_LIST_DIR} ) | ||
prepend ( ALLHEADERS ${CMAKE_CURRENT_LIST_DIR} ) | ||
|
||
if (BUILD_TESTS) | ||
target_sources ( amrex PRIVATE ${ALLSRC} ${ALLHEADERS} ) | ||
|
||
endif() | ||
# | ||
# Accumulate headers | ||
# | ||
accumulate_headers (ALLHEADERS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,35 @@ | ||
# -*- mode: cmake -*- | ||
set (CXXSRC "") | ||
set (F90SRC "") | ||
set (F77SRC "") | ||
set (ALLHEADERS "") | ||
set (ALLSRC "") | ||
|
||
include(TestManager) | ||
set ( CXXSRC | ||
AMReX_BndryData.cpp AMReX_BndryRegister.cpp AMReX_FabSet.cpp | ||
AMReX_InterpBndryData.cpp AMReX_MacBndry.cpp AMReX_Mask.cpp | ||
AMReX_MultiMask.cpp ) | ||
|
||
# | ||
# Define a project name | ||
# After this command the following varaibles are defined | ||
# CBNDRYLIB_SOURCE_DIR | ||
# CBNDRYLIB_BINARY_DIR | ||
# Other projects (subdirectories) can reference this directory | ||
# through these variables. | ||
project(CBNDRYLIB) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
set(CXX_source_files AMReX_BndryData.cpp AMReX_BndryRegister.cpp AMReX_FabSet.cpp AMReX_InterpBndryData.cpp AMReX_MacBndry.cpp AMReX_Mask.cpp AMReX_MultiMask.cpp) | ||
set(FPP_source_files AMReX_INTERPBNDRYDATA_${BL_SPACEDIM}D.F AMReX_LO_UTIL.F ) | ||
set(F77_source_files) | ||
set(F90_source_files) | ||
|
||
set(CXX_header_files AMReX_BndryData.H AMReX_BndryRegister.H AMReX_BoundCond.H AMReX_FabSet.H AMReX_InterpBndryData.H AMReX_LO_BCTYPES.H AMReX_MacBndry.H AMReX_Mask.H AMReX_MultiMask.H) | ||
set(FPP_header_files AMReX_INTERPBNDRYDATA_F.H) | ||
set(F77_header_files) | ||
set(F90_header_files) | ||
set ( F77SRC | ||
AMReX_INTERPBNDRYDATA_${BL_SPACEDIM}D.F AMReX_LO_UTIL.F ) | ||
|
||
preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) | ||
set(local_source_files ${CXX_source_files} ${F77_source_files} ${FPP_out_files} ${F90_source_files}) | ||
set(local_header_files ${CXX_header_files} ${F77_header_files} ${FPP_header_files} ${F90_header_files}) | ||
add_library(box_cbndry OBJECT ${local_source_files}) | ||
set ( ALLHEADERS | ||
AMReX_BndryData.H AMReX_BndryRegister.H AMReX_BoundCond.H | ||
AMReX_FabSet.H AMReX_INTERPBNDRYDATA_F.H AMReX_InterpBndryData.H | ||
AMReX_LO_BCTYPES.H AMReX_MacBndry.H AMReX_Mask.H AMReX_MultiMask.H ) | ||
|
||
add_dependencies(box_cbndry box_c) | ||
|
||
# Accumulate sources | ||
set ( ALLSRC ${CXXSRC} ${F77SRC} ) | ||
|
||
install_include_files(${local_header_files}) | ||
|
||
if (BUILD_TESTS) | ||
# | ||
# Add absolute path (needed by target_sources) | ||
# | ||
prepend ( ALLSRC ${CMAKE_CURRENT_LIST_DIR} ) | ||
prepend ( ALLHEADERS ${CMAKE_CURRENT_LIST_DIR} ) | ||
|
||
endif() | ||
target_sources ( amrex PRIVATE ${ALLSRC} ${ALLHEADERS} ) | ||
|
||
# | ||
# Accumulate headers | ||
# | ||
accumulate_headers (ALLHEADERS) |
Oops, something went wrong.