Skip to content

Commit

Permalink
Fruit builds with CMake
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Hahn <[email protected]>
  • Loading branch information
quantumsteve committed Feb 20, 2024
1 parent d2a967b commit b08b24c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 380 deletions.
13 changes: 0 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ add_subdirectory (src)
add_definitions (-DMAC)

if(1)
# Configure FRUIT
include_directories (${FRUIT_INCLUDE_PATH})
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FRUIT_LINK_FLAGS}")

# Configure KORCSRC
include_directories (${KORCSRC_INCLUDE_PATH})
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${KORCSRC_LINK_FLAGS}")

add_subdirectory (test)

enable_testing()
Expand All @@ -80,11 +72,6 @@ if(1)
WORKING_DIRECTORY build/bin
)

add_test (NAME regression_test_1
COMMAND korc_regtest1.sh
WORKING_DIRECTORY test/reg_tests
)

endif ()


Expand Down
12 changes: 9 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ list (APPEND korc_sources
korc_pspline.f90
)

korc_sources
main.f90
set(korc_main "")
list(APPEND korc_main
main.f90
)

add_library(korc_lib ${korc_sources})
set_property(TARGET korc_lib PROPERTY LINKER_LANGUAGE Fortran)

add_executable (xkorc ${korc_sources})
add_executable (xkorc ${korc_main})
target_link_libraries(xkorc korc_lib)
set_property(TARGET xkorc PROPERTY LINKER_LANGUAGE Fortran)

option (CORI_DIR "Use Cori directories" OFF)
Expand Down
6 changes: 2 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

add_library (fruit fruit/fruit.f90)

#add_library (fruit_mpi fruit/fruit_mpi.f90)
#target_link_libraries(fruit_mpi PUBLIC fruit )

set (korc_tests "")
list (APPEND korc_tests
korc_test.f90
Expand All @@ -16,6 +13,7 @@ list (APPEND korc_tests
add_executable (xtest ${korc_tests})
set_property(TARGET xtest PROPERTY LINKER_LANGUAGE Fortran)

target_link_libraries (xtest fruit xkorc ${MPI_Fortran_LIBRARIES})
target_link_libraries (xtest fruit korc_lib ${MPI_Fortran_LIBRARIES})
target_link_libraries (xtest ${HDF5_LIBRARIES})
target_link_libraries (xtest ${KORCSRC_LIBRARIES})

Loading

0 comments on commit b08b24c

Please sign in to comment.