mirror of
https://github.com/pantor/inja.git
synced 2026-10-06 04:20:36 +00:00
optional benchmark
This commit is contained in:
@@ -12,6 +12,7 @@ set(INJA_VERSION ${PROJECT_VERSION})
|
|||||||
## OPTIONS
|
## OPTIONS
|
||||||
##
|
##
|
||||||
option(BUILD_UNIT_TESTS "Build the unit tests" ON)
|
option(BUILD_UNIT_TESTS "Build the unit tests" ON)
|
||||||
|
option(BUILD_BENCHMARK "Build the inja benchmark" OFF)
|
||||||
option(HUNTER_ENABLED "Use hunter to manage dependencies" OFF)
|
option(HUNTER_ENABLED "Use hunter to manage dependencies" OFF)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-8
@@ -12,7 +12,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## TARGETS
|
## TESTS
|
||||||
##
|
##
|
||||||
add_executable(inja_test
|
add_executable(inja_test
|
||||||
src/unit-files.cpp
|
src/unit-files.cpp
|
||||||
@@ -28,14 +28,7 @@ add_executable(inja_single_test
|
|||||||
src/unit.cpp
|
src/unit.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(inja_benchmark
|
|
||||||
src/benchmark.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
##
|
|
||||||
## INCLUDES
|
|
||||||
##
|
|
||||||
if(HUNTER_ENABLED) # Use Hunter to manage dependencies
|
if(HUNTER_ENABLED) # Use Hunter to manage dependencies
|
||||||
# Add Catch framework
|
# Add Catch framework
|
||||||
hunter_add_package(Catch)
|
hunter_add_package(Catch)
|
||||||
@@ -59,6 +52,17 @@ else() # Manage dependencies manually
|
|||||||
# Add dependencies to targets
|
# Add dependencies to targets
|
||||||
target_link_libraries(inja_test Catch inja)
|
target_link_libraries(inja_test Catch inja)
|
||||||
target_link_libraries(inja_single_test Catch inja_single)
|
target_link_libraries(inja_single_test Catch inja_single)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
## BENCHMARK
|
||||||
|
##
|
||||||
|
if(BUILD_BENCHMARK)
|
||||||
|
add_executable(inja_benchmark
|
||||||
|
src/benchmark.cpp
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(inja_benchmark hayai inja)
|
target_link_libraries(inja_benchmark hayai inja)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user