@ -5,7 +5,6 @@
cmake_minimum_required ( VERSION 3.1 )
cmake_minimum_required ( VERSION 3.1 )
project ( spdlog VERSION 1.3.0 LANGUAGES CXX )
project ( spdlog VERSION 1.3.0 LANGUAGES CXX )
include ( CTest )
include ( CMakeDependentOption )
include ( CMakeDependentOption )
include ( GNUInstallDirs )
include ( GNUInstallDirs )
@ -54,10 +53,22 @@ endif()
option ( SPDLOG_BUILD_EXAMPLES "Build examples" ${ SPDLOG_MASTER_PROJECT } )
option ( SPDLOG_BUILD_EXAMPLES "Build examples" ${ SPDLOG_MASTER_PROJECT } )
option ( SPDLOG_BUILD_BENCH "Build benchmarks" ${ SPDLOG_MASTER_PROJECT } )
option ( SPDLOG_BUILD_BENCH "Build benchmarks" ${ SPDLOG_MASTER_PROJECT } )
# L o g i c f o r e n a b l i n g t e s t s : I f t h e u s e r d o e s n o t e x p l i c i t l y
# s p e c i f y t h e v a l u e o f t h e S P D L O G _ B U I L D _ T E S T I N G v a r i a b l e t h e n t h e
# l o g i c i s s i m p l e r t o r e a s o n a b o u t : t h a t i s , t e s t i n g w i l l b e
# b u i l t i f a n d o n l y i f B U I L D _ T E S T I N G i s O N a n d w e a r e a M a s t e r
# P r o j e c t . O n t h e o t h e r h a n d , i f t h e u s e r o v e r r i d e s t h e v a l u e o f
# S P D L O G _ B U I L D _ T E S T I N G t h e n i t c a n g e t a b i t m o r e t r i c k y d u e t o
# c a c h i n g .
cmake_dependent_option ( SPDLOG_BUILD_TESTING
cmake_dependent_option ( SPDLOG_BUILD_TESTING
" B u i l d s p d l o g t e s t s " $ { S P D L O G _ M A S T E R _ P R O J E C T }
" B u i l d s p d l o g t e s t s " $ { S P D L O G _ M A S T E R _ P R O J E C T }
" B U I L D _ T E S T I N G " O F F
" B U I L D _ T E S T I N G " O F F
)
)
if ( SPDLOG_BUILD_TESTING )
# I n c l u d e C T e s t c o n d i t i o n a l l y s i n c e i t w i l l e n a b l e B U I L D _ T E S T I N G .
include ( CTest )
endif ( )
target_include_directories (
target_include_directories (
s p d l o g
s p d l o g