Commit 3b10d1fe authored by Kim, Jungwon's avatar Kim, Jungwon

cmake fortran build from spack

parent f960771f
......@@ -7,7 +7,6 @@ set(PAPYRUS_VERSION_MINOR 0)
set(PAPYRUS_VERSION_PATCH 0)
set(PAPYRUS_USE_FORTRAN ON CACHE BOOL "Enable support for Fortran 90")
MESSAGE (STATUS "PAPYRUS_USE_FORTRAN ${PAPYRUS_USE_FORTRAN}")
if(PAPYRUS_USE_FORTRAN)
enable_language(Fortran)
......@@ -19,15 +18,10 @@ 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")
MESSAGE (STATUS "NO COMPILE WITH $ENV{SPACK_CC}")
set(CMAKE_C_COMPILER "$ENV{SPACK_CC}")
else()
MESSAGE (STATUS "YES COMPILE WITH ${MPI_C_COMPILER}")
set(CMAKE_C_COMPILER "${MPI_C_COMPILER}")
endif()
MESSAGE (STATUS "COMPILE WITH CMAKE_C_COMPILER ${CMAKE_C_COMPILER}")
if ("${MPI_CXX_COMPILER}" STREQUAL "MPI_CXX_COMPILER-NOTFOUND")
set(CMAKE_CXX_COMPILER "$ENV{SPACK_CXX}")
else()
......
add_subdirectory(src)
if(!PAPYRUS_BUILD_FROM_SPACK)
add_subdirectory(tests)
endif()
add_subdirectory(bin)
......@@ -13,7 +13,6 @@ macro(papyruskv_test_fortran arg)
target_link_libraries(kv.${arg} papyruskv pthread stdc++)
add_test(kv.${arg} ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./kv.${arg})
set_tests_properties(kv.${arg} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
set_tests_properties(kv.${arg} PROPERTIES LINKER_LANGUAGE Fortran)
endmacro(papyruskv_test_fortran)
add_subdirectory(01_open_close)
......
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