Skip to content

Commit

Permalink
include building benchmark in test option
Browse files Browse the repository at this point in the history
  • Loading branch information
pantor committed Oct 5, 2024
1 parent de5e742 commit 8695d75
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
option('build_tests', type: 'boolean', value: true)
option('build_benchmark', type: 'boolean', value: true)

0 comments on commit 8695d75

Please sign in to comment.