xref: /phasta/phastaIO/CMakeLists.txt (revision 8f9016f65798c31e86c962e830cf2dc88ecffd68)
1project(phastaIO)
2enable_language(CXX)
3
4if(NOT PHASTA_SKIP_MPI_CHECK)
5find_package(MPI REQUIRED)
6endif()
7include_directories(${MPI_C_INCLUDE_PATH})
8# collect all the source files
9include(FortranCInterface)
10FortranCInterface_VERIFY(CXX)
11FortranCInterface_Header(FCMangle.h)
12include_directories("${phastaIO_BINARY_DIR}")
13add_definitions(-DMPICH_SKIP_MPICXX)
14add_definitions(-DOMPI_SKIP_MPICXX=1)
15set(SRC_FILES phiotmrc.cc phastaIO.cc phiompi.c)
16if(NOT PHASTA_CHEF_ENABLED)
17  set(SRC_FILES ${SRC_FILES} phiotimer_empty/phiotimer_empty.cc)
18  include_directories(phiotimer_empty)
19endif()
20
21ADD_LIBRARY(phastaIO ${SRC_FILES})
22target_link_libraries(phastaIO ${MPI_C_LIBRARIES})
23