mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
Tests: Add RunCMake.target_sources case covering missing source
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
project(${RunCMake_TEST} LANGUAGES NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
|
||||
|
||||
1
Tests/RunCMake/target_sources/MissingSource-result.txt
Normal file
1
Tests/RunCMake/target_sources/MissingSource-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
6
Tests/RunCMake/target_sources/MissingSource-stderr.txt
Normal file
6
Tests/RunCMake/target_sources/MissingSource-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Error at MissingSource\.cmake:[0-9]+ \(add_custom_target\):
|
||||
Cannot find source file:
|
||||
|
||||
missing\.txt
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
3
Tests/RunCMake/target_sources/MissingSource.cmake
Normal file
3
Tests/RunCMake/target_sources/MissingSource.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
cmake_policy(SET CMP0115 NEW)
|
||||
add_custom_target(foo)
|
||||
target_sources(foo PRIVATE missing.txt)
|
||||
@@ -9,6 +9,7 @@ run_cmake(OriginDebug)
|
||||
run_cmake(CMP0026-LOCATION)
|
||||
run_cmake(CMP0076-OLD)
|
||||
run_cmake(CMP0076-WARN)
|
||||
run_cmake(MissingSource)
|
||||
run_cmake(RelativePathInInterface)
|
||||
run_cmake(RelativePathInSubdirGenEx)
|
||||
run_cmake(RelativePathInSubdirInterface)
|
||||
|
||||
Reference in New Issue
Block a user