diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 89ba7f94..02a066fb 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -47,7 +47,7 @@ jobs: { name: cppcheck, cmake-flag: CMAKE_CXX_CPPCHECK="cppcheck;--version;--verbose;--report-progress;--enable=all;--error-exitcode=1;--std=c++20;--suppressions-list=../.cppcheck-supressions" } ] include: - - pkgs: clang-15 llvm-15-dev libclang-15-dev clang-tools-15 clang-tidy-15 iwyu cppcheck + - pkgs: clang-15 clang-tools-15 clang-tidy-15 iwyu cppcheck cxx: clang++-15 defaults: @@ -84,7 +84,7 @@ jobs: strategy: matrix: include: - - pkgs: clang-15 libtbb-dev + - pkgs: clang-15 cxx: clang++-15 name: codeql diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 597117fe..2e817e64 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -10,10 +10,10 @@ jobs: matrix: build-type: [ Release, RelWithDebInfo ] compiler: [ - { cxx: g++-11, pkgs: g++-11 libtbb-dev }, - { cxx: g++-12, pkgs: g++-12 libtbb-dev }, - { cxx: clang++-14, pkgs: clang-14 libtbb-dev }, - { cxx: clang++-15, pkgs: clang-15 libtbb-dev }, + { cxx: g++-11, pkgs: g++-11 }, + { cxx: g++-12, pkgs: g++-12 }, + { cxx: clang++-14, pkgs: clang-14 }, + { cxx: clang++-15, pkgs: clang-15 }, ] defaults: @@ -37,7 +37,7 @@ jobs: - name: setup-build env: CXX: ${{ matrix.compiler.cxx }} - run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DGAPP_LINK_TBB=ON -DBUILD_SHARED_LIBS=OFF + run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DBUILD_SHARED_LIBS=OFF - name: build run: cmake --build . --parallel 8 diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml index bbe468f9..ec07e6f9 100644 --- a/.github/workflows/sanitizers.yml +++ b/.github/workflows/sanitizers.yml @@ -11,7 +11,7 @@ jobs: sanitizer: [ address, undefined, thread ] include: - cxx: clang++-15 - pkgs: clang-15 llvm-15 libtbb-dev + pkgs: clang-15 llvm-15 env: ASAN_OPTIONS: check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:detect_leaks=1 @@ -40,7 +40,7 @@ jobs: - name: setup-build env: CXX: ${{ matrix.cxx }} - run: cmake .. -DGAPP_LINK_TBB=ON -DGAPP_CXX_FLAGS="-fsanitize=${{ matrix.sanitizer }} -g -fno-omit-frame-pointer" + run: cmake .. -DGAPP_CXX_FLAGS="-fsanitize=${{ matrix.sanitizer }} -g -fno-omit-frame-pointer" - name: build run: cmake --build . --parallel diff --git a/.tsan-supressions b/.tsan-supressions index 1a873fc1..e69de29b 100644 --- a/.tsan-supressions +++ b/.tsan-supressions @@ -1,14 +0,0 @@ -race:^tbb::detail::d1::node::node -race:^tbb::detail::d1::tree_node::tree_node - -race:^tbb::detail::d1::blocked_range<*>::size -race:^tbb::detail::d1::blocked_range<*>::is_divisible -race:^tbb::detail::d1::auto_partition_type::is_divisible - -race:tbb::detail::d1::small_object_allocator::new_object -race:tbb::detail::d1::small_object_allocator::delete_object - -race:tbb::detail::d1::dynamic_grainsize_mode<*>::check_being_stolen - -race:tbb::detail::d1::start_for<*>::finalize -race:tbb::detail::d1::start_for<*>::offer_work_impl diff --git a/CMakeLists.txt b/CMakeLists.txt index d1259f94..b348628f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ option(GAPP_USE_LTO "Use link time optimizations for the library." ON) option(GAPP_USE_MARCH_NATIVE "Optimize for the host architecture in release builds (only used for gcc and clang)." OFF) option(GAPP_DISABLE_EXCEPTIONS "Disable exception support when building the library." OFF) option(GAPP_DISABLE_RTTI "Disable run-time type information when building the library." OFF) -option(GAPP_LINK_TBB "Link Intel's TBB library (needed for the parallel stl algorithms when using gcc/clang)." OFF) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build") @@ -141,12 +140,6 @@ target_compile_features(gapp PUBLIC "cxx_std_20") target_compile_definitions(gapp PUBLIC "$<$>:GAPP_BUILD_STATIC>") target_compile_options(gapp PUBLIC "$<$:-Zc:preprocessor>") -# Dependencies -find_package(TBB) -if(TBB_FOUND AND GAPP_LINK_TBB AND NOT MSVC) - target_link_libraries(gapp PUBLIC "TBB::tbb") -endif() - # Install install(TARGETS gapp EXPORT gapp-config diff --git a/README.md b/README.md index a21de16d..388629dc 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ The following are needed for building and using the library: - C++20 compiler (gcc 11.0, clang 14.0, msvc 14.30 or later) - CMake 3.21 or later -- Intel TBB (optional, depending on the standard library implementation) - Catch2 3.3 or later (optional, only needed for the tests) diff --git a/docs/install-guide.md b/docs/install-guide.md index 9ce3476e..d0de6134 100644 --- a/docs/install-guide.md +++ b/docs/install-guide.md @@ -10,30 +10,17 @@ ## Requirements You will need a C++20 compiler and CMake to build and use the library. -There are no additional required dependencies, but there is an optional dependency -on [Intel's TBB](https://github.com/oneapi-src/oneTBB) library depending on your standard library -implementation, and [Catch2](https://github.com/catchorg/Catch2) is needed to build the tests. +There are no additional required dependencies, but [Catch2](https://github.com/catchorg/Catch2) +is needed to build the tests. The full list of requirements are: - C++20 compiler (gcc 11.0, clang 14.0, msvc 14.30 or later) - CMake 3.21 or later -- Intel TBB (optional, depending on the standard library implementation) - Catch2 3.3 or later (optional, only needed for the tests) -Intel's TBB library is needed depending on your standard library implementation -for the parallel algorithms that were introduced in C++17. The library depends on these -algorithms to parallelize certain operations, and without standard library support for these, -everything will run sequentially. - -Specifically, for the 3 major standard library implementations: - -- Microsoft's STL: Doesn't need TBB, the parallel algorithms are supported even without it -- libstdc++: Needs TBB for the algorithms to actually run in parallel -- libc++: Doesn't support C++17's parallel algorithms yet, so everything will be sequential either way - The library works on both Windows and Linux. Both of these platforms and all compilers mentioned -above are tested (gcc and clang on Linux, and msvc and clang-cl on Windows). +above are tested (gcc and clang on Linux, msvc and clang-cl on Windows). ## Install with CMake @@ -192,9 +179,6 @@ target_link_libraries(example_project PRIVATE gapp::gapp) - `GAPP_DISABLE_RTTI` - When this option is `ON`, the library will be built without run-time type information. The default value is `OFF`. -- `GAPP_LINK_TBB` - When this option is `ON`, the project will attempt to link Intel's TBB library to the - library during the build. This option has no effect if TBB is not installed on the system, or if - CMake can't find it. The default value is `OFF`. The options are specified during the configuration step of CMake, for example: