Commit b425f34f authored by Kim, Jungwon's avatar Kim, Jungwon

cmake not

parent 3b10d1fe
......@@ -6,7 +6,9 @@ set(PAPYRUS_VERSION_MAJOR 1)
set(PAPYRUS_VERSION_MINOR 0)
set(PAPYRUS_VERSION_PATCH 0)
set(PAPYRUS_USE_FORTRAN ON CACHE BOOL "Enable support for Fortran 90")
set(PAPYRUS_USE_FORTRAN OFF CACHE BOOL "Enable support for Fortran 90")
option(PAPYRUS_BUILD_WITH_SPACK "Bulid with Spack" OFF)
if(PAPYRUS_USE_FORTRAN)
enable_language(Fortran)
......@@ -17,19 +19,13 @@ MESSAGE (STATUS "MPI_CXX_COMPILER ${MPI_CXX_COMPILER}")
MESSAGE (STATUS "MPI_C_COMPILER ${MPI_C_COMPILER}")
MESSAGE (STATUS "MPI_Fortran_COMPILER ${MPI_Fortran_COMPILER}")
if ("${MPI_C_COMPILER}" STREQUAL "MPI_C_COMPILER-NOTFOUND")
set(CMAKE_C_COMPILER "$ENV{SPACK_CC}")
else()
if (NOT "${MPI_C_COMPILER}" STREQUAL "MPI_C_COMPILER-NOTFOUND")
set(CMAKE_C_COMPILER "${MPI_C_COMPILER}")
endif()
if ("${MPI_CXX_COMPILER}" STREQUAL "MPI_CXX_COMPILER-NOTFOUND")
set(CMAKE_CXX_COMPILER "$ENV{SPACK_CXX}")
else()
if (NOT "${MPI_CXX_COMPILER}" STREQUAL "MPI_CXX_COMPILER-NOTFOUND")
set(CMAKE_CXX_COMPILER "${MPI_CXX_COMPILER}")
endif()
if ("${MPI_Fortran_COMPILER}" STREQUAL "MPI_Fortran_COMPILER-NOTFOUND")
set(CMAKE_Fortran_COMPILER "$ENV{SPACK_FC}")
else()
if (NOT "${MPI_Fortran_COMPILER}" STREQUAL "MPI_Fortran_COMPILER-NOTFOUND")
set(CMAKE_Fortran_COMPILER "${MPI_Fortran_COMPILER}")
endif()
set(CMAKE_CXX_STANDARD 11)
......
......@@ -2,5 +2,6 @@
rm -rf build install
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpirun" -DMPIEXEC_NUMPROC_FLAG="-n"
#cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpirun" -DMPIEXEC_NUMPROC_FLAG="-n" # Stampede2
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/slurm/default/bin/srun" -DMPIEXEC_NUMPROC_FLAG="-n" -DPAPYRUS_USE_FORTRAN=ON #Grand Tave
make -j install
add_subdirectory(src)
if(!PAPYRUS_BUILD_FROM_SPACK)
if(NOT PAPYRUS_BUILD_WITH_SPACK)
add_subdirectory(tests)
endif()
add_subdirectory(bin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment