From 53a93a19fa42e236a9f504fdb15dc913515f347e Mon Sep 17 00:00:00 2001 From: Noah LeBlanc <56392435+WarEagle451@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:31:00 -0500 Subject: [PATCH] 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. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4b3c1b2..483aa85f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 # ---------------------------------------------------------------------------------------