summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r--Tests/RunCMake/Ninja/AssumedSources.cmake3
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Ninja/CommandConcat.cmake2
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake3
-rw-r--r--Tests/RunCMake/Ninja/Executable.cmake3
-rw-r--r--Tests/RunCMake/Ninja/LooseObjectDepends.cmake3
-rw-r--r--Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake3
-rw-r--r--Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake3
-rw-r--r--Tests/RunCMake/Ninja/SharedLib.cmake3
-rw-r--r--Tests/RunCMake/Ninja/StaticLib.cmake3
-rw-r--r--Tests/RunCMake/Ninja/SubDirPrefix.cmake3
-rw-r--r--Tests/RunCMake/Ninja/TwoLibs.cmake3
16 files changed, 14 insertions, 24 deletions
diff --git a/Tests/RunCMake/Ninja/AssumedSources.cmake b/Tests/RunCMake/Ninja/AssumedSources.cmake
index d5364f0..d68fca9 100644
--- a/Tests/RunCMake/Ninja/AssumedSources.cmake
+++ b/Tests/RunCMake/Ninja/AssumedSources.cmake
@@ -1,6 +1,5 @@
-cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0118 NEW)
-project(AssumedSources)
+enable_language(C)
set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/target.c"
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
index 92a3a0f..45e5aa3 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
@@ -1,3 +1,4 @@
+cmake_policy(VERSION 3.2)
cmake_policy(SET CMP0058 OLD)
set(byproducts BYPRODUCTS byproduct1a byproduct1b)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
index 0326e07..388e018 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
@@ -1,2 +1,3 @@
+cmake_policy(VERSION 3.2)
cmake_policy(SET CMP0058 OLD)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
index 6128167..6f5484a 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
@@ -1,2 +1,3 @@
+cmake_policy(VERSION 3.2)
set(byproducts BYPRODUCTS byproduct1a byproduct1b)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
index 7bc66ef..714ae64 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
@@ -1 +1,2 @@
+cmake_policy(VERSION 3.2)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMakeLists.txt b/Tests/RunCMake/Ninja/CMakeLists.txt
index 2a0591e..8eb5748 100644
--- a/Tests/RunCMake/Ninja/CMakeLists.txt
+++ b/Tests/RunCMake/Ninja/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/Ninja/CommandConcat.cmake b/Tests/RunCMake/Ninja/CommandConcat.cmake
index 790cf9d..7d6faf5 100644
--- a/Tests/RunCMake/Ninja/CommandConcat.cmake
+++ b/Tests/RunCMake/Ninja/CommandConcat.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.7)
-project(concat_cmd NONE)
set(output1 ${CMAKE_BINARY_DIR}/out1.txt)
set(output2 ${CMAKE_BINARY_DIR}/out2.txt)
file(REMOVE ${output1} ${output2})
diff --git a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
index 8e01c8c..e04ac21 100644
--- a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
+++ b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello NONE)
-
add_custom_command(
OUTPUT hello.copy.c
COMMAND "${CMAKE_COMMAND}" -E copy
diff --git a/Tests/RunCMake/Ninja/Executable.cmake b/Tests/RunCMake/Ninja/Executable.cmake
index 4e17d68..2b6a61b 100644
--- a/Tests/RunCMake/Ninja/Executable.cmake
+++ b/Tests/RunCMake/Ninja/Executable.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_executable(hello hello.c)
include(CheckOutput.cmake)
include(CheckNoPrefixSubDir.cmake)
diff --git a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
index 360c7ba..90f8249 100644
--- a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
+++ b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.8)
-project(LooseObjectDepends C)
+enable_language(C)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h"
diff --git a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
index 505f750..9615c56 100644
--- a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
+++ b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-project(Test LANGUAGES C)
+enable_language(C)
configure_file(PreventConfigureFileDupBuildRule.cmake PreventTargetAliasesDupBuildRule.cmake @ONLY)
add_subdirectory(SubDirConfigureFileDup)
diff --git a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
index da6f86a..81eb731 100644
--- a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
+++ b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-project(Test LANGUAGES C)
+enable_language(C)
# fake launcher executable
set(input_launcher_executable ${CMAKE_CURRENT_BINARY_DIR}/fake_launcher_executable)
diff --git a/Tests/RunCMake/Ninja/SharedLib.cmake b/Tests/RunCMake/Ninja/SharedLib.cmake
index 1a78390..c295c16 100644
--- a/Tests/RunCMake/Ninja/SharedLib.cmake
+++ b/Tests/RunCMake/Ninja/SharedLib.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_library(greeting SHARED greeting.c)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(hello hello_with_greeting.c)
diff --git a/Tests/RunCMake/Ninja/StaticLib.cmake b/Tests/RunCMake/Ninja/StaticLib.cmake
index 0f815ae..dab6742 100644
--- a/Tests/RunCMake/Ninja/StaticLib.cmake
+++ b/Tests/RunCMake/Ninja/StaticLib.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_definitions(-DGREETING_STATIC)
add_library(greeting STATIC greeting.c)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/Tests/RunCMake/Ninja/SubDirPrefix.cmake b/Tests/RunCMake/Ninja/SubDirPrefix.cmake
index 30ad1e6..49d075f 100644
--- a/Tests/RunCMake/Ninja/SubDirPrefix.cmake
+++ b/Tests/RunCMake/Ninja/SubDirPrefix.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
add_subdirectory(SubDirPrefix)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/Tests/RunCMake/Ninja/TwoLibs.cmake b/Tests/RunCMake/Ninja/TwoLibs.cmake
index 666452f..10ac5a6 100644
--- a/Tests/RunCMake/Ninja/TwoLibs.cmake
+++ b/Tests/RunCMake/Ninja/TwoLibs.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib-static")