Skip to content

Commit

Permalink
added option for building without w3emc in tave and vint
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-a-potts committed Oct 24, 2024
1 parent b425016 commit 768d409
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ endif()

# User options.
option(OPENMP "use OpenMP threading" ON)
option(LINK_W3EMC "Link w3emc library" ON)

# Find packages.
find_package(MPI REQUIRED)
Expand Down
7 changes: 6 additions & 1 deletion src/tave.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ endif()

set(exe_name tave.x)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
if(LINK_W3EMC)
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
w3emc::w3emc_d
g2::g2_d)
else()
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
g2::g2_d)
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
11 changes: 8 additions & 3 deletions src/vint.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ endif()

set(exe_name vint.x)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
w3emc::w3emc_d
g2::g2_d)
if(LINK_W3EMC)
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
w3emc::w3emc_d
g2::g2_d)
else()
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
g2::g2_d)
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 768d409

Please sign in to comment.