Enabled warning on examples only if built as part of spdlog

This commit is contained in:
gabime
2020-04-01 00:23:04 +03:00
parent 7906592230
commit c2b47430fb
2 changed files with 48 additions and 1 deletions

View File

@@ -253,8 +253,12 @@ endif()
# Build binaries
#---------------------------------------------------------------------------------------
if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO)
message(STATUS "Generating examples")
message(STATUS "Generating example(s)")
add_subdirectory(example)
spdlog_enable_warnings(example)
if(SPDLOG_BUILD_EXAMPLE_HO)
spdlog_enable_warnings(example_header_only)
endif()
endif()
if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_TESTS_HO)