Skip to content

Commit 8695d75

Browse files
committedOct 5, 2024·
include building benchmark in test option
1 parent de5e742 commit 8695d75

File tree

4 files changed

+1
-7
lines changed

4 files changed

+1
-7
lines changed
 

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: ubuntu-22.04-clang-15-no-exceptions
3131
os: ubuntu-22.04
3232
compiler: clang-15
33-
cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF -DBUILD_BENCHMARK=ON"
33+
cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF"
3434

3535
- name: ubuntu-22.04-gcc
3636
os: ubuntu-22.04

‎CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ option(INJA_INSTALL_SINGLE_HEADER "Install the single header instead" OFF)
1414
option(INJA_EXPORT "Export the current build tree to the package registry" ON)
1515
option(BUILD_TESTING "Build unit tests" ON)
1616
option(INJA_BUILD_TESTS "Build unit tests when BUILD_TESTING is enabled." ON)
17-
option(BUILD_BENCHMARK "Build benchmark" ON)
1817
option(COVERALLS "Generate coveralls data" OFF)
1918

2019

@@ -103,10 +102,8 @@ if(BUILD_TESTING AND INJA_BUILD_TESTS)
103102
target_include_directories(single_inja_test PRIVATE include third_party/include)
104103

105104
add_test(single_inja_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/single_inja_test)
106-
endif()
107105

108106

109-
if(BUILD_BENCHMARK)
110107
add_executable(inja_benchmark test/benchmark.cpp)
111108
target_link_libraries(inja_benchmark PRIVATE inja)
112109
endif()

‎meson.build

-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ if get_option('build_tests')
5252

5353
test('Inja unit test', inja_test)
5454
test('Inja single include test', inja_single_test)
55-
endif
5655

5756

58-
if get_option('build_benchmark')
5957
inja_benchmark = executable(
6058
'inja_benchmark',
6159
'test/benchmark.cpp',

‎meson_options.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
option('build_tests', type: 'boolean', value: true)
2-
option('build_benchmark', type: 'boolean', value: true)

0 commit comments

Comments
 (0)
Please sign in to comment.