Skip to content

Commit

Permalink
Merge pull request #857 from dalg24/cmake_exe_path
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop authored May 5, 2023
2 parents 37652a3 + a05eb97 commit bb1a8d2
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion benchmarks/brute_force_vs_bvh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ add_executable(ArborX_Benchmark_BruteForceVsBVH.exe
brute_force_vs_bvh.cpp
)
target_link_libraries(ArborX_Benchmark_BruteForceVsBVH.exe ArborX::ArborX Boost::program_options)
add_test(NAME ArborX_Benchmark_BruteForceVsBVH COMMAND ./ArborX_Benchmark_BruteForceVsBVH.exe)
add_test(NAME ArborX_Benchmark_BruteForceVsBVH COMMAND ArborX_Benchmark_BruteForceVsBVH.exe)
2 changes: 1 addition & 1 deletion benchmarks/bvh_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(UNIT_TESTS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/test)
add_executable(ArborX_Benchmark_BoundingVolumeHierarchy.exe bvh_driver.cpp)
target_link_libraries(ArborX_Benchmark_BoundingVolumeHierarchy.exe ArborX::ArborX benchmark::benchmark Boost::program_options)
target_include_directories(ArborX_Benchmark_BoundingVolumeHierarchy.exe PRIVATE ${POINT_CLOUDS_INCLUDE_DIR} ${UNIT_TESTS_INCLUDE_DIR})
add_test(NAME ArborX_Benchmark_BoundingVolumeHierarchy COMMAND ./ArborX_Benchmark_BoundingVolumeHierarchy.exe --buffer=0 --benchmark_color=true)
add_test(NAME ArborX_Benchmark_BoundingVolumeHierarchy COMMAND ArborX_Benchmark_BoundingVolumeHierarchy.exe --buffer=0 --benchmark_color=true)
if(ARBORX_PERFORMANCE_TESTING)
target_compile_definitions(ArborX_Benchmark_BoundingVolumeHierarchy.exe PRIVATE ARBORX_PERFORMANCE_TESTING)
endif()
2 changes: 1 addition & 1 deletion benchmarks/dbscan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ target_compile_features(ArborX_DataConverter.exe PRIVATE cxx_std_17)
target_link_libraries(ArborX_DataConverter.exe Boost::program_options)

set(input_file "input.txt")
add_test(NAME ArborX_Benchmark_DBSCAN COMMAND ./ArborX_Benchmark_DBSCAN.exe --filename=${input_file} --eps=1.4 --verify)
add_test(NAME ArborX_Benchmark_DBSCAN COMMAND ArborX_Benchmark_DBSCAN.exe --filename=${input_file} --eps=1.4 --verify)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${input_file} ${CMAKE_CURRENT_BINARY_DIR}/${input_file} COPYONLY)
2 changes: 1 addition & 1 deletion benchmarks/develop/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Benchmark_Develop.exe develop.cpp)
target_link_libraries(ArborX_Benchmark_Develop.exe ArborX::ArborX benchmark::benchmark)
add_test(NAME ArborX_Benchmark_Develop COMMAND ./ArborX_Benchmark_Develop.exe)
add_test(NAME ArborX_Benchmark_Develop COMMAND ArborX_Benchmark_Develop.exe)
2 changes: 1 addition & 1 deletion benchmarks/distributed_tree_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_executable(ArborX_Benchmark_DistributedTree.exe distributed_tree_driver.cpp)
target_link_libraries(ArborX_Benchmark_DistributedTree.exe ArborX::ArborX Boost::program_options)
target_include_directories(ArborX_Benchmark_DistributedTree.exe PRIVATE ${CMAKE_SOURCE_DIR}/benchmarks/point_clouds)
add_test(NAME ArborX_Benchmark_DistributedTree COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} ./ArborX_Benchmark_DistributedTree.exe ${MPIEXEC_POSTFLAGS})
add_test(NAME ArborX_Benchmark_DistributedTree COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ArborX_Benchmark_DistributedTree.exe> ${MPIEXEC_POSTFLAGS})
2 changes: 1 addition & 1 deletion benchmarks/execution_space_instances/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_executable(ArborX_Benchmark_ExecutionSpaces.exe execution_space_instances_driver.cpp)
target_link_libraries(ArborX_Benchmark_ExecutionSpaces.exe ArborX::ArborX Boost::program_options)
target_include_directories(ArborX_Benchmark_ExecutionSpaces.exe PRIVATE ${CMAKE_SOURCE_DIR}/benchmarks/point_clouds)
add_test(NAME ArborX_Benchmark_ExecutionSpaces COMMAND ./ArborX_Benchmark_ExecutionSpaces.exe)
add_test(NAME ArborX_Benchmark_ExecutionSpaces COMMAND ArborX_Benchmark_ExecutionSpaces.exe)
2 changes: 1 addition & 1 deletion benchmarks/union_find/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Benchmark_UnionFind.exe union_find.cpp)
target_link_libraries(ArborX_Benchmark_UnionFind.exe ArborX::ArborX benchmark::benchmark Boost::program_options)
add_test(NAME ArborX_Benchmark_UnionFind COMMAND ./ArborX_Benchmark_UnionFind.exe --benchmark_color=true)
add_test(NAME ArborX_Benchmark_UnionFind COMMAND ArborX_Benchmark_UnionFind.exe --benchmark_color=true)
4 changes: 2 additions & 2 deletions examples/access_traits/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if(Kokkos_ENABLE_CUDA)
add_executable(ArborX_Example_CudaAccessTraits.exe example_cuda_access_traits.cpp)
target_link_libraries(ArborX_Example_CudaAccessTraits.exe ArborX::ArborX)
add_test(NAME ArborX_Example_CudaAccessTraits COMMAND ./ArborX_Example_CudaAccessTraits.exe)
add_test(NAME ArborX_Example_CudaAccessTraits COMMAND ArborX_Example_CudaAccessTraits.exe)
else()
add_executable(ArborX_Example_HostAccessTraits.exe example_host_access_traits.cpp)
target_link_libraries(ArborX_Example_HostAccessTraits.exe ArborX::ArborX)
add_test(NAME ArborX_Example_HostAccessTraits_Example COMMAND ./ArborX_Example_HostAccessTraits.exe)
add_test(NAME ArborX_Example_HostAccessTraits_Example COMMAND ArborX_Example_HostAccessTraits.exe)
endif()
2 changes: 1 addition & 1 deletion examples/brute_force/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_BruteForce.exe brute_force.cpp)
target_link_libraries(ArborX_Example_BruteForce.exe ArborX::ArborX Boost::program_options)
add_test(NAME ArborX_Example_BruteForce COMMAND ./ArborX_Example_BruteForce.exe)
add_test(NAME ArborX_Example_BruteForce COMMAND ArborX_Example_BruteForce.exe)
2 changes: 1 addition & 1 deletion examples/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_Callback.exe example_callback.cpp)
target_link_libraries(ArborX_Example_Callback.exe ArborX::ArborX)
add_test(NAME ArborX_Example_Callback COMMAND ./ArborX_Example_Callback.exe)
add_test(NAME ArborX_Example_Callback COMMAND ArborX_Example_Callback.exe)
2 changes: 1 addition & 1 deletion examples/dbscan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_DBSCAN.exe example_dbscan.cpp)
target_link_libraries(ArborX_Example_DBSCAN.exe ArborX::ArborX)
add_test(NAME ArborX_Example_DBSCAN COMMAND ./ArborX_Example_DBSCAN.exe)
add_test(NAME ArborX_Example_DBSCAN COMMAND ArborX_Example_DBSCAN.exe)
2 changes: 1 addition & 1 deletion examples/molecular_dynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_MolecularDynamics.exe example_molecular_dynamics.cpp)
target_link_libraries(ArborX_Example_MolecularDynamics.exe ArborX::ArborX)
add_test(NAME ArborX_Example_MolecularDynamics COMMAND ./ArborX_Example_MolecularDynamics.exe)
add_test(NAME ArborX_Example_MolecularDynamics COMMAND ArborX_Example_MolecularDynamics.exe)
2 changes: 1 addition & 1 deletion examples/raytracing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_RayTracing.exe example_raytracing.cpp)
target_link_libraries(ArborX_Example_RayTracing.exe ArborX::ArborX Boost::program_options)
add_test(NAME ArborX_Example_RayTracing COMMAND ./ArborX_Example_RayTracing.exe --nx=10 --ny=10 --nz=10 --lx=1 --ly=100000 --lz=100000 --rays=1000)
add_test(NAME ArborX_Example_RayTracing COMMAND ArborX_Example_RayTracing.exe --nx=10 --ny=10 --nz=10 --lx=1 --ly=100000 --lz=100000 --rays=1000)
2 changes: 1 addition & 1 deletion examples/simple_intersection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(ArborX_Example_Intersection.exe example_intersection.cpp)
target_link_libraries(ArborX_Example_Intersection.exe ArborX::ArborX)
add_test(NAME ArborX_Example_Intersection COMMAND ./ArborX_Example_Intersection.exe)
add_test(NAME ArborX_Example_Intersection COMMAND ArborX_Example_Intersection.exe)
2 changes: 1 addition & 1 deletion examples/viz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(ArborX_Example_TreeViz.exe tree_visualization.cpp)
target_link_libraries(ArborX_Example_TreeViz.exe ArborX::ArborX Boost::program_options)
add_test(NAME ArborX_Example_TreeViz COMMAND ./ArborX_Example_TreeViz.exe)
add_test(NAME ArborX_Example_TreeViz COMMAND ArborX_Example_TreeViz.exe)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/leaf_cloud.txt ${CMAKE_CURRENT_BINARY_DIR}/leaf_cloud.txt COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/arborx_query_sort.py ${CMAKE_CURRENT_BINARY_DIR}/arborx_query_sort.py COPYONLY)
26 changes: 13 additions & 13 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ add_executable(ArborX_Test_DetailsUtils.exe
target_link_libraries(ArborX_Test_DetailsUtils.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsUtils.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_DetailsUtils.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsUtils COMMAND ./ArborX_Test_DetailsUtils.exe)
add_test(NAME ArborX_Test_DetailsUtils COMMAND ArborX_Test_DetailsUtils.exe)

add_executable(ArborX_Test_Geometry.exe
tstDetailsAlgorithms.cpp
Expand All @@ -71,7 +71,7 @@ add_executable(ArborX_Test_Geometry.exe
target_link_libraries(ArborX_Test_Geometry.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_Geometry.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_Geometry.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_Geometry COMMAND ./ArborX_Test_Geometry.exe)
add_test(NAME ArborX_Test_Geometry COMMAND ArborX_Test_Geometry.exe)

set(ARBORX_TEST_QUERY_TREE_SOURCES)
foreach(_test Callbacks Degenerate ManufacturedSolution ComparisonWithBoost)
Expand Down Expand Up @@ -142,13 +142,13 @@ if(Kokkos_ENABLE_SYCL)
target_compile_definitions(ArborX_Test_QueryTree.exe PRIVATE NANORANGE_NO_STD_FORWARD_DECLARATIONS)
endif()
target_include_directories(ArborX_Test_QueryTree.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME ArborX_Test_QueryTree COMMAND ./ArborX_Test_QueryTree.exe)
add_test(NAME ArborX_Test_QueryTree COMMAND ArborX_Test_QueryTree.exe)

add_executable(ArborX_Test_DetailsTreeConstruction.exe tstDetailsMortonCodes.cpp tstDetailsTreeConstruction.cpp utf_main.cpp)
target_link_libraries(ArborX_Test_DetailsTreeConstruction.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsTreeConstruction.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_DetailsTreeConstruction.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsTreeConstruction COMMAND ./ArborX_Test_DetailsTreeConstruction.exe)
add_test(NAME ArborX_Test_DetailsTreeConstruction COMMAND ArborX_Test_DetailsTreeConstruction.exe)

add_executable(ArborX_Test_DetailsContainers.exe
tstSequenceContainers.cpp
Expand All @@ -158,19 +158,19 @@ add_executable(ArborX_Test_DetailsContainers.exe
)
target_link_libraries(ArborX_Test_DetailsContainers.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsContainers.exe PRIVATE BOOST_TEST_DYN_LINK)
add_test(NAME ArborX_Test_DetailsContainers COMMAND ./ArborX_Test_DetailsContainers.exe)
add_test(NAME ArborX_Test_DetailsContainers COMMAND ArborX_Test_DetailsContainers.exe)

add_executable(ArborX_Test_DetailsBatchedQueries.exe tstDetailsBatchedQueries.cpp utf_main.cpp)
target_link_libraries(ArborX_Test_DetailsBatchedQueries.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsBatchedQueries.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_DetailsBatchedQueries.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsBatchedQueries COMMAND ./ArborX_Test_DetailsBatchedQueries.exe)
add_test(NAME ArborX_Test_DetailsBatchedQueries COMMAND ArborX_Test_DetailsBatchedQueries.exe)

add_executable(ArborX_Test_DetailsCrsGraphWrapperImpl.exe tstDetailsCrsGraphWrapperImpl.cpp utf_main.cpp)
target_link_libraries(ArborX_Test_DetailsCrsGraphWrapperImpl.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsCrsGraphWrapperImpl.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_DetailsCrsGraphWrapperImpl.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsCrsGraphWrapperImpl COMMAND ./ArborX_Test_DetailsCrsGraphWrapperImpl.exe)
add_test(NAME ArborX_Test_DetailsCrsGraphWrapperImpl COMMAND ArborX_Test_DetailsCrsGraphWrapperImpl.exe)

add_executable(ArborX_Test_Clustering.exe
tstDBSCAN.cpp
Expand All @@ -180,7 +180,7 @@ add_executable(ArborX_Test_Clustering.exe
target_link_libraries(ArborX_Test_Clustering.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_Clustering.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_Clustering.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/benchmarks/dbscan)
add_test(NAME ArborX_Test_Clustering COMMAND ./ArborX_Test_Clustering.exe)
add_test(NAME ArborX_Test_Clustering COMMAND ArborX_Test_Clustering.exe)

# compare results with a dataset of 1000 points from mlpack
configure_file(
Expand All @@ -204,7 +204,7 @@ add_executable(ArborX_Test_DetailsClusteringHelpers.exe
target_link_libraries(ArborX_Test_DetailsClusteringHelpers.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsClusteringHelpers.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_DetailsClusteringHelpers.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsClusteringHelpers COMMAND ./ArborX_Test_DetailsClusteringHelpers.exe)
add_test(NAME ArborX_Test_DetailsClusteringHelpers COMMAND ArborX_Test_DetailsClusteringHelpers.exe)

add_executable(ArborX_Test_SpecializedTraversals.exe
tstDetailsHalfTraversal.cpp
Expand All @@ -215,7 +215,7 @@ add_executable(ArborX_Test_SpecializedTraversals.exe
target_link_libraries(ArborX_Test_SpecializedTraversals.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_SpecializedTraversals.exe PRIVATE BOOST_TEST_DYN_LINK)
target_include_directories(ArborX_Test_SpecializedTraversals.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_SpecializedTraversals COMMAND ./ArborX_Test_SpecializedTraversals.exe)
add_test(NAME ArborX_Test_SpecializedTraversals COMMAND ArborX_Test_SpecializedTraversals.exe)

if(ARBORX_ENABLE_MPI)
add_executable(ArborX_Test_DistributedTree.exe tstDistributedTree.cpp tstKokkosToolsDistributedAnnotations.cpp utf_main.cpp)
Expand All @@ -227,19 +227,19 @@ if(ARBORX_ENABLE_MPI)
target_compile_definitions(ArborX_Test_DistributedTree.exe PRIVATE NANORANGE_NO_STD_FORWARD_DECLARATIONS)
endif()
target_include_directories(ArborX_Test_DistributedTree.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DistributedTree COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} ./ArborX_Test_DistributedTree.exe ${MPIEXEC_POSTFLAGS})
add_test(NAME ArborX_Test_DistributedTree COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ArborX_Test_DistributedTree.exe> ${MPIEXEC_POSTFLAGS})

add_executable(ArborX_Test_DetailsDistributedTreeImpl.exe tstDetailsDistributedTreeImpl.cpp utf_main.cpp)
target_link_libraries(ArborX_Test_DetailsDistributedTreeImpl.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_DetailsDistributedTreeImpl.exe PRIVATE BOOST_TEST_DYN_LINK ARBORX_MPI_UNIT_TEST)
target_include_directories(ArborX_Test_DetailsDistributedTreeImpl.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME ArborX_Test_DetailsDistributedTreeImpl COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} ./ArborX_Test_DetailsDistributedTreeImpl.exe ${MPIEXEC_POSTFLAGS})
add_test(NAME ArborX_Test_DetailsDistributedTreeImpl COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ArborX_Test_DetailsDistributedTreeImpl.exe> ${MPIEXEC_POSTFLAGS})
endif()

add_executable(ArborX_Test_BoostAdapters.exe tstBoostGeometryAdapters.cpp tstBoostRangeAdapters.cpp utf_main.cpp)
target_link_libraries(ArborX_Test_BoostAdapters.exe PRIVATE ArborX Boost::unit_test_framework)
target_compile_definitions(ArborX_Test_BoostAdapters.exe PRIVATE BOOST_TEST_DYN_LINK)
add_test(NAME ArborX_Test_BoostAdapters COMMAND ./ArborX_Test_BoostAdapters.exe)
add_test(NAME ArborX_Test_BoostAdapters COMMAND ArborX_Test_BoostAdapters.exe)

if(ARBORX_ENABLE_HEADER_SELF_CONTAINMENT_TESTS)
add_subdirectory(headers_self_contained)
Expand Down

0 comments on commit bb1a8d2

Please sign in to comment.