diff --git a/CMakeLists.txt b/CMakeLists.txt index fa6e3dd3..afda08d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(MIN_BOOST_VERSION 1.66) if ("$ENV{BOOST_ROOT}" STREQUAL "") + # assume that we are inside the boost-superproject set(BOOST_INCLUDEDIR "${PROJECT_SOURCE_DIR}/../..") endif() @@ -186,11 +187,11 @@ if (BUILD_BENCHMARKS) target_link_libraries(${BASENAME} PRIVATE benchmark::benchmark_main) endfunction() - benchmark(test/iteration_bench.cpp) - benchmark(test/axis_bench.cpp) - benchmark(test/parallel_filling_bench.cpp) + benchmark(benchmark/axis_index.cpp) + benchmark(benchmark/histogram_iteration.cpp) + benchmark(benchmark/histogram_parallel_filling.cpp) - add_executable(speed_boost test/speed_boost.cpp) + add_executable(speed_boost benchmark/speed_boost.cpp) target_include_directories(speed_boost PRIVATE include ${Boost_INCLUDE_DIR}) target_compile_definitions(speed_boost PRIVATE -DBOOST_DISABLE_ASSERTS) target_compile_options(speed_boost PRIVATE -O3) diff --git a/benchmark/speed_boost.cpp b/benchmark/speed_boost.cpp index 18155d1f..22615bfc 100644 --- a/benchmark/speed_boost.cpp +++ b/benchmark/speed_boost.cpp @@ -5,7 +5,7 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) #include -#include "utility_histogram.hpp" +#include "../test/utility_histogram.hpp" #include #include diff --git a/test/Jamfile b/test/Jamfile index 2a94a204..dc5f1857 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -6,6 +6,7 @@ # http://www.boost.org/LICENSE_1_0.txt) import testing ; +import feature ; project : requirements @@ -13,6 +14,8 @@ project . ; +path-constant THIS_PATH : . ; + alias run-tests : [ run algorithm_project_test.cpp ] [ run algorithm_reduce_test.cpp ] @@ -34,15 +37,21 @@ alias run-tests : [ run histogram_growing_test.cpp ] [ run histogram_mixed_test.cpp ] [ run histogram_operators_test.cpp ] - [ run histogram_serialization_test.cpp /boost/serialization//boost_serialization/static : : histogram_serialization_test_dynamic.xml histogram_serialization_test_static.xml ] + [ run histogram_serialization_test.cpp + /boost/serialization//boost_serialization/static : : : + STATIC_XML=\\\"$(THIS_PATH)/histogram_serialization_test_static.xml\\\" + DYNAMIC_XML=\\\"$(THIS_PATH)/histogram_serialization_test_dynamic.xml\\\" + ] [ run histogram_test.cpp ] [ run indexed_test.cpp ] [ run internal_accumulators_test.cpp ] [ run linearize_test.cpp ] [ run meta_test.cpp ] - [ run storage_adaptor_serialization_test.cpp /boost/serialization//boost_serialization/static ] + [ run storage_adaptor_serialization_test.cpp + /boost/serialization//boost_serialization/static ] [ run storage_adaptor_test.cpp ] - [ run unlimited_storage_serialization_test.cpp /boost/serialization//boost_serialization/static ] + [ run unlimited_storage_serialization_test.cpp + /boost/serialization//boost_serialization/static ] [ run unlimited_storage_test.cpp ] [ run utility_test.cpp ] ; diff --git a/test/histogram_serialization_test.cpp b/test/histogram_serialization_test.cpp index 51cfd101..d3eb9e6f 100644 --- a/test/histogram_serialization_test.cpp +++ b/test/histogram_serialization_test.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -63,9 +62,8 @@ void run_tests(const char* filename) { BOOST_TEST_EQ(a, b); } -int main(int argc, char** argv) { - assert(argc == 3); - run_tests(argv[1]); - run_tests(argv[2]); +int main() { + run_tests(STATIC_XML); + run_tests(DYNAMIC_XML); return boost::report_errors(); }