From 8695d7525f3b46e6ad239a697745196b71b56cd4 Mon Sep 17 00:00:00 2001 From: pantor Date: Sat, 5 Oct 2024 10:01:11 +0200 Subject: [PATCH] include building benchmark in test option --- .github/workflows/ci.yml | 2 +- CMakeLists.txt | 3 --- meson.build | 2 -- meson_options.txt | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f937041..e22110d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: ubuntu-22.04-clang-15-no-exceptions os: ubuntu-22.04 compiler: clang-15 - cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF -DBUILD_BENCHMARK=ON" + cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF" - name: ubuntu-22.04-gcc os: ubuntu-22.04 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bf91de4..91e9a342 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ option(INJA_INSTALL_SINGLE_HEADER "Install the single header instead" OFF) option(INJA_EXPORT "Export the current build tree to the package registry" ON) option(BUILD_TESTING "Build unit tests" ON) option(INJA_BUILD_TESTS "Build unit tests when BUILD_TESTING is enabled." ON) -option(BUILD_BENCHMARK "Build benchmark" ON) option(COVERALLS "Generate coveralls data" OFF) @@ -103,10 +102,8 @@ if(BUILD_TESTING AND INJA_BUILD_TESTS) target_include_directories(single_inja_test PRIVATE include third_party/include) add_test(single_inja_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/single_inja_test) -endif() -if(BUILD_BENCHMARK) add_executable(inja_benchmark test/benchmark.cpp) target_link_libraries(inja_benchmark PRIVATE inja) endif() diff --git a/meson.build b/meson.build index bfed780f..422ffea2 100644 --- a/meson.build +++ b/meson.build @@ -52,10 +52,8 @@ if get_option('build_tests') test('Inja unit test', inja_test) test('Inja single include test', inja_single_test) -endif -if get_option('build_benchmark') inja_benchmark = executable( 'inja_benchmark', 'test/benchmark.cpp', diff --git a/meson_options.txt b/meson_options.txt index 016cbc37..15a0e355 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1 @@ option('build_tests', type: 'boolean', value: true) -option('build_benchmark', type: 'boolean', value: true)