[CMAKE] CMakeLists.txt: Print CMAKE_CONFIGURATION_TYPES
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Tue, 8 Sep 2020 02:28:50 +0000 (04:28 +0200)
committerJérôme Gardou <zefklop@users.noreply.github.com>
Thu, 6 May 2021 14:13:05 +0000 (16:13 +0200)
Follow-up to d10728a.

CMakeLists.txt

index d1e1e82..c1fe5f4 100644 (file)
@@ -132,8 +132,14 @@ else()
     # We don't need CMake importlib handling.
     unset(CMAKE_IMPORT_LIBRARY_SUFFIX)
 
     # We don't need CMake importlib handling.
     unset(CMAKE_IMPORT_LIBRARY_SUFFIX)
 
-    # Print build type
-    message("-- Build Type: ${CMAKE_BUILD_TYPE}")
+    # Print build type(s)
+    if(CMAKE_CONFIGURATION_TYPES)
+        # Multi-config generators, like Visual Studio (MSBuild).
+        message("-- Configuration types: ${CMAKE_CONFIGURATION_TYPES}")
+    else()
+        # Single-configuration generators, like Ninja.
+        message("-- Build type: ${CMAKE_BUILD_TYPE}")
+    endif()
 
     # Always add /MT in VS CMAKE_GENERATOR and define _SBCS otherwise VS thinks it's a multi-byte or whatever project
     if (MSVC_IDE)
 
     # Always add /MT in VS CMAKE_GENERATOR and define _SBCS otherwise VS thinks it's a multi-byte or whatever project
     if (MSVC_IDE)