Skip to content

Commit

Permalink
master: add_check_executable.cmake: check for ninja or nmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Dec 9, 2024
1 parent 568544f commit be3a3d7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmake/add_check_executable.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
# 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)
Expand Down Expand Up @@ -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} )
Expand Down

0 comments on commit be3a3d7

Please sign in to comment.