Skip to content
Snippets Groups Projects
Commit 769d9bac authored by Ben Cumming's avatar Ben Cumming Committed by GitHub
Browse files

Merge pull request #7 from halfflat/feature/spike_handling

Fix linking of MPI libraries for tests and validation.
parents a14a7485 898d4b2d
No related branches found
No related tags found
No related merge requests found
......@@ -50,21 +50,23 @@ add_definitions("-DDATADIR=\"${CMAKE_SOURCE_DIR}/data\"")
add_executable(test.exe ${TEST_SOURCES} ${HEADERS})
add_executable(validate.exe ${VALIDATION_SOURCES} ${HEADERS})
target_link_libraries(test.exe LINK_PUBLIC cellalgo gtest)
target_link_libraries(validate.exe LINK_PUBLIC cellalgo gtest)
set(TARGETS test.exe validate.exe)
if(WITH_TBB)
target_link_libraries(test.exe LINK_PUBLIC ${TBB_LIBRARIES})
target_link_libraries(validate.exe LINK_PUBLIC ${TBB_LIBRARIES})
endif()
foreach(target ${TARGETS})
target_link_libraries(${target} LINK_PUBLIC cellalgo gtest)
set_target_properties(test.exe
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
if(WITH_TBB)
target_link_libraries(${target} LINK_PUBLIC ${TBB_LIBRARIES})
endif()
set_target_properties(validate.exe
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
if(WITH_MPI)
target_link_libraries(${target} LINK_PUBLIC ${MPI_C_LIBRARIES})
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS "${MPI_C_LINK_FLAGS}")
endif()
set_target_properties(${target}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
endforeach()
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