Skip to content

Commit

Permalink
cmake update
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Oct 12, 2016
1 parent 2c5f413 commit 8b48742
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,3 +122,5 @@ if (ENABLE_Config_Report)
message(STATUS "${config_output}")
endif()


#MESSAGE (STATUS ${CMAKE_CXX_FLAGS})
2 changes: 1 addition & 1 deletion Src/C_AMRLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion Src/C_BaseLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Src/C_ParticleLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
21 changes: 18 additions & 3 deletions Tools/CMake/CCSEOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")

0 comments on commit 8b48742

Please sign in to comment.