Fixed redundant message when using multi-config generators

Multi-config generators such as "Ninja Multi-Config" will not define CMAKE_BUILD_TYPE, therefore the "Build type" message should not be called.
pull/3001/head
Noah LeBlanc 2 years ago committed by GitHub
parent 696db97f67
commit 53a93a19fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -142,7 +142,9 @@ if(SPDLOG_BUILD_PIC)
endif()
find_package(Threads REQUIRED)
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
if(DEFINED CMAKE_BUILD_TYPE)
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
endif()
# ---------------------------------------------------------------------------------------
# Static/Shared library
# ---------------------------------------------------------------------------------------

Loading…
Cancel
Save