Skip to content

Commit

Permalink
#3: cmake: change to use DARMA libraries at the same level
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Aug 10, 2021
1 parent f9c77c1 commit 91d3012
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ project(vt-sample)

set(CMAKE_CXX_STANDARD 14)

find_package(vt REQUIRED)
set(vt_DIR "" CACHE STRING "Path to VT")
set(checkpoint_DIR "" CACHE STRING "Path to checkpoint")
set(detector_DIR "" CACHE STRING "Path to detector")

# Create symbolic links for adding as a subdirectory to test with all DARMA
# libraries at the same level
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${vt_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/TPL/vt)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${checkpoint_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/TPL/checkpoint)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${detector_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/TPL/detector)

add_subdirectory(TPL/detector)
add_subdirectory(TPL/checkpoint)
add_subdirectory(TPL/vt)

#################### VT RUNTIME SAMPLE #####################
set(RUNTIME_SAMPLE vt-runtime-sample)
Expand All @@ -15,7 +27,9 @@ add_executable(
"${CMAKE_SOURCE_DIR}/vt-runtime/src/sample.cc"
)

target_link_libraries(${RUNTIME_SAMPLE} PUBLIC vt::runtime::vt)
target_link_libraries(${RUNTIME_SAMPLE} PUBLIC detector)
target_link_libraries(${RUNTIME_SAMPLE} PUBLIC checkpoint)
target_link_libraries(${RUNTIME_SAMPLE} PUBLIC vt)
############################################################

################### VT TRACE-ONLY SAMPLE ###################
Expand All @@ -26,5 +40,7 @@ add_executable(
"${CMAKE_SOURCE_DIR}/vt-trace-only/src/sample.cc"
)

target_link_libraries(${TRACE_ONLY_SAMPLE} PUBLIC detector)
target_link_libraries(${TRACE_ONLY_SAMPLE} PUBLIC checkpoint)
target_link_libraries(${TRACE_ONLY_SAMPLE} PUBLIC vt::vt-trace)
############################################################

0 comments on commit 91d3012

Please sign in to comment.