From be3a3d7122471d3867da8171f40f8e24ed564299 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 9 Dec 2024 06:54:57 -0700 Subject: [PATCH] master: add_check_executable.cmake: check for ninja or nmake. --- cmake/add_check_executable.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/add_check_executable.cmake b/cmake/add_check_executable.cmake index a796b65ee..5c090432a 100644 --- a/cmake/add_check_executable.cmake +++ b/cmake/add_check_executable.cmake @@ -1,6 +1,6 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later # SPDX-FileCopyrightText: Bradley M. Bell -# SPDX-FileContributor: 2003-23 Bradley M. Bell +# SPDX-FileContributor: 2003-24 Bradley M. Bell # ---------------------------------------------------------------------------- # add_check_executable(parent_target short_name) # add_check_executable(parent_target short_name arguments) @@ -78,7 +78,14 @@ MACRO(add_check_executable parent_target short_name) ${add_check_executable_arguments} DEPENDS ${add_check_executable_depends} ) - MESSAGE(STATUS "make ${add_check_executable_full_name}: available") + IF( "${CMAKE_GENERATOR}" STREQUAL "Ninja" ) + SET(make_cmd "ninja" ) + ELSEIF( "${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles" ) + SET(make_cmd "nmake" ) + ELSE( ) + SET(make_cmd "make" ) + ENDIF( ) + MESSAGE(STATUS "${make_cmd} ${add_check_executable_full_name}: available") # # add parent dependency add_to_list( ${parent_target}_depends ${add_check_executable_full_name} )