Commit 02802af9 authored by gabime's avatar gabime

Renamed SPDLOG_ENABLE_WARNINGS to SPDLOG_BUILD_WARNINGS

parent a8169a3d
...@@ -80,7 +80,7 @@ option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/ ...@@ -80,7 +80,7 @@ option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/
option(SPDLOG_SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF) option(SPDLOG_SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF)
# warning options # warning options
option(SPDLOG_ENABLE_WARNINGS "Enable compiler warnings" OFF) option(SPDLOG_BUILD_WARNINGS "Enable compiler warnings" OFF)
# install options # install options
option(SPDLOG_INSTALL "Generate the install target" ${SPDLOG_MASTER_PROJECT}) option(SPDLOG_INSTALL "Generate the install target" ${SPDLOG_MASTER_PROJECT})
...@@ -159,7 +159,7 @@ target_include_directories(spdlog PUBLIC ...@@ -159,7 +159,7 @@ target_include_directories(spdlog PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>") "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
target_link_libraries(spdlog PUBLIC Threads::Threads) target_link_libraries(spdlog PUBLIC Threads::Threads)
spdlog_enable_warnings(spdlog) SPDLOG_BUILD_WARNINGS(spdlog)
set_target_properties(spdlog PROPERTIES VERSION ${SPDLOG_VERSION} SOVERSION ${SPDLOG_VERSION_MAJOR}) set_target_properties(spdlog PROPERTIES VERSION ${SPDLOG_VERSION} SOVERSION ${SPDLOG_VERSION_MAJOR})
set_target_properties(spdlog PROPERTIES DEBUG_POSTFIX d) set_target_properties(spdlog PROPERTIES DEBUG_POSTFIX d)
...@@ -258,9 +258,9 @@ endif() ...@@ -258,9 +258,9 @@ endif()
if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO) if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO)
message(STATUS "Generating example(s)") message(STATUS "Generating example(s)")
add_subdirectory(example) add_subdirectory(example)
spdlog_enable_warnings(example) SPDLOG_BUILD_WARNINGS(example)
if(SPDLOG_BUILD_EXAMPLE_HO) if(SPDLOG_BUILD_EXAMPLE_HO)
spdlog_enable_warnings(example_header_only) SPDLOG_BUILD_WARNINGS(example_header_only)
endif() endif()
endif() endif()
......
...@@ -27,8 +27,8 @@ endfunction() ...@@ -27,8 +27,8 @@ endfunction()
# Turn on warnings on the given target # Turn on warnings on the given target
function(spdlog_enable_warnings target_name) function(SPDLOG_BUILD_WARNINGS target_name)
if(SPDLOG_ENABLE_WARNINGS) if(SPDLOG_BUILD_WARNINGS)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND MSVC_OPTIONS "/W3") list(APPEND MSVC_OPTIONS "/W3")
if(MSVC_VERSION GREATER 1900) #Allow non fatal security wanrnings for msvc 2015 if(MSVC_VERSION GREATER 1900) #Allow non fatal security wanrnings for msvc 2015
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment