diff --git a/CMakeLists.txt b/CMakeLists.txt index 508a0b65..38c4b757 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,11 @@ target_include_directories(spdlog PUBLIC "$" "$") target_link_libraries(spdlog PUBLIC Threads::Threads) -spdlog_enable_warnings(spdlog) + +option(SPDLOG_DISABLE_WARNINGS "Skip enabling warnings when building spdlog" off) +if(NOT SPDLOG_DISABLE_WARNINGS) + spdlog_enable_warnings(spdlog) +endif() set_target_properties(spdlog PROPERTIES VERSION ${SPDLOG_VERSION} SOVERSION ${SPDLOG_VERSION_MAJOR}) set_target_properties(spdlog PROPERTIES DEBUG_POSTFIX d)