diff --git a/CMakeLists.txt b/CMakeLists.txt index 7db1784214c..ba970ec2caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,14 @@ endif() # CCSE_BINARY_DIR project(CCSE) + +# Compile options: +OPTION (ENABLE_FORTRAN_MPI "Enable Fortran MPI Communicator" ON) +OPTION (ENABLE_MG_FBOXLIB "Enable Fortran for MultiGrid Solver" OFF) +OPTION (ENABLE_FBASELIB "Enable Fortran BaseLib" OFF) +OPTION (ENABLE_CXX11 "Enable C++11" ON) + + # Below, we have set some of the switches for reasonable default behavior, these can be # overridden at the cmake command line, ie "cmake -DVAR=VALUE", or by editing the values # directly below. NOTE: If the C++ classes are to be used, the BL_SPACEDIM value must @@ -114,3 +122,5 @@ if (ENABLE_Config_Report) message(STATUS "${config_output}") endif() + +#MESSAGE (STATUS ${CMAKE_CXX_FLAGS}) diff --git a/Src/C_AMRLib/CMakeLists.txt b/Src/C_AMRLib/CMakeLists.txt index 19b9856529f..89c0c1abde8 100644 --- a/Src/C_AMRLib/CMakeLists.txt +++ b/Src/C_AMRLib/CMakeLists.txt @@ -33,7 +33,7 @@ set(F90_source_files extrapolater_${BL_SPACEDIM}d.f90) # These files are in C_ParticleLib if(BL_USE_PARTICLES EQUAL 1) - list(APPEND CXX_header_files AmrParGDB.H AmrParticles.H) + list(APPEND CXX_header_files ../C_ParticleLib/AmrParGDB.H ../C_ParticleLib/AmrParticles.H) endif() preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) diff --git a/Src/C_BaseLib/CMakeLists.txt b/Src/C_BaseLib/CMakeLists.txt index ed0485e7775..2b57e4f2b95 100644 --- a/Src/C_BaseLib/CMakeLists.txt +++ b/Src/C_BaseLib/CMakeLists.txt @@ -20,7 +20,7 @@ set(FPP_source_files COORDSYS_${BL_SPACEDIM}D.F FILCC_${BL_SPACEDIM}D.F) set(F90PP_source_files bl_fort_module.F90) set(F90_source_files mempool_f.f90 threadbox.f90 MultiFabUtil_${BL_SPACEDIM}d.f90 BaseFab_nd.f90) -set(CXX_header_files Arena.H Array.H ArrayLim.H BArena.H BaseFab.H BCRec.H BL_CXX11.H BC_TYPES.H BLassert.H BLBackTrace.H BLFort.H BLProfiler.H BoxArray.H BoxDomain.H Box.H BoxLib.H BoxList.H CArena.H ccse-mpi.H CONSTANTS.H CoordSys.H DistributionMapping.H FabArray.H FabConv.H FArrayBox.H FPC.H Geometry.H MultiFabUtil.H IArrayBox.H IndexType.H IntVect.H Looping.H iMultiFab.H MemPool.H MultiFab.H Orientation.H ParallelDescriptor.H ParmParse.H PArray.H Periodicity.H PList.H Pointers.H RealBox.H REAL.H SPACE.H Tuple.H UseCount.H Utility.H VisMF.H winstd.H PhysBCFunct.H ParGDB.H) +set(CXX_header_files Arena.H Array.H ArrayLim.H BArena.H BaseFab.H BCRec.H BL_CXX11.H BC_TYPES.H BLassert.H BLBackTrace.H BLFort.H BLProfiler.H BoxArray.H BoxDomain.H Box.H BoxLib.H BoxList.H CArena.H ccse-mpi.H CONSTANTS.H CoordSys.H DistributionMapping.H FabArray.H FabConv.H FArrayBox.H FPC.H Geometry.H MultiFabUtil.H IArrayBox.H IndexType.H IntVect.H Looping.H iMultiFab.H MemPool.H MultiFab.H Orientation.H ParallelDescriptor.H ParmParse.H PArray.H Periodicity.H PList.H Pointers.H RealBox.H REAL.H SPACE.H Tuple.H UseCount.H Utility.H VisMF.H winstd.H PhysBCFunct.H) set(F77_header_files bc_types.fi) set(FPP_header_files COORDSYS_F.H SPACE_F.H BaseFab_f.H) diff --git a/Src/C_ParticleLib/CMakeLists.txt b/Src/C_ParticleLib/CMakeLists.txt index f4b2afcb449..e8a95ab77da 100644 --- a/Src/C_ParticleLib/CMakeLists.txt +++ b/Src/C_ParticleLib/CMakeLists.txt @@ -26,7 +26,7 @@ set(F90_header_files) if(BL_USE_PARTICLES EQUAL 1) list(APPEND CXX_source_files Particles.cpp TracerParticles.cpp) - list(APPEND CXX_header_files Particles.H TracerParticles.H) + list(APPEND CXX_header_files Particles.H ParticleInit.H TracerParticles.H ParGDB.H) list(APPEND FPP_source_files Particles_${BL_SPACEDIM}D.F) list(APPEND FPP_header_files Particles_F.H) endif() diff --git a/Tools/CMake/CCSEOptions.cmake b/Tools/CMake/CCSEOptions.cmake index 4dfb8455c18..b16c76c5665 100644 --- a/Tools/CMake/CCSEOptions.cmake +++ b/Tools/CMake/CCSEOptions.cmake @@ -137,9 +137,6 @@ if (ENABLE_COMM_PROFILING) list(APPEND BL_DEFINES BL_COMM_PROFILING) endif (ENABLE_COMM_PROFILING) - - - set(BOXLIB_EXTRA_LIBRARIES) set(BOXLIB_EXTRA_LIBRARY_PATH) set(BOXLIB_EXTRA_C_INCLUDE_PATH) @@ -175,6 +172,24 @@ endif (DEFINED EXTRA_DEFS_FOR_CCSE) set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${BL_DEFINES}") + +if (ENABLE_FORTRAN_MPI AND ENABLE_MPI) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBL_USE_FORTRAN_MPI=1") +endif (ENABLE_FORTRAN_MPI AND ENABLE_MPI) + +if (ENABLE_MG_FBOXLIB) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMG_USE_FBOXIB=1") +endif (ENABLE_MG_FBOXLIB) + +if (ENABLE_FBASELIB) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBL_USE_F_BASELIB=1") +endif (ENABLE_FBASELIB) + +if (ENABLE_CXX11) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +endif (ENABLE_CXX11) + + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(APPEND CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-64 -Wno-deprecated") endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")