mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
committed by
Craig Scott
parent
52445300d6
commit
08be74bfd7
@@ -0,0 +1,3 @@
|
||||
-- GetPrequisites\(.*script.sh\) : ignoring script file
|
||||
-- GetPrequisites\(.*script.bat\) : ignoring script file
|
||||
-- GetPrequisites\(.*script\) : ignoring script file
|
||||
@@ -0,0 +1,19 @@
|
||||
include(GetPrerequisites)
|
||||
|
||||
function(check_script script)
|
||||
set(prereqs "")
|
||||
get_prerequisites(${script} prereqs 1 1 "" "")
|
||||
if(NOT "${prereqs}" STREQUAL "")
|
||||
message(FATAL_ERROR "Prerequisites for ${script} not empty")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Should not throw any errors
|
||||
# Regular executable
|
||||
get_prerequisites(${CMAKE_COMMAND} cmake_prereqs 1 1 "" "")
|
||||
# Shell script
|
||||
check_script(${CMAKE_CURRENT_LIST_DIR}/script.sh)
|
||||
# Batch script
|
||||
check_script(${CMAKE_CURRENT_LIST_DIR}/script.bat)
|
||||
# Shell script without extension
|
||||
check_script(${CMAKE_CURRENT_LIST_DIR}/script)
|
||||
@@ -1,3 +1,4 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake_command(TargetMissing ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/TargetMissing.cmake)
|
||||
run_cmake_command(ExecutableScripts ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ExecutableScripts.cmake)
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World"
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
echo "Hello world"
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World"
|
||||
Reference in New Issue
Block a user