diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-27 12:16:59 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-02 21:14:02 (GMT) |
commit | 6e636f2ebaf78141f4d0a36c96804b9a1bc89857 (patch) | |
tree | 6c46f8eea138028f770c2971f652bdcbbbb15d03 /Tests/RunCMake/TargetSources | |
parent | 3676fb49634efd01755aa5c12d58e2f2bf20d09f (diff) | |
download | CMake-6e636f2ebaf78141f4d0a36c96804b9a1bc89857.zip CMake-6e636f2ebaf78141f4d0a36c96804b9a1bc89857.tar.gz CMake-6e636f2ebaf78141f4d0a36c96804b9a1bc89857.tar.bz2 |
cmTarget: Make the SOURCES origin tracable.
Diffstat (limited to 'Tests/RunCMake/TargetSources')
7 files changed, 60 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetSources/OriginDebug-result.txt b/Tests/RunCMake/TargetSources/OriginDebug-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt new file mode 100644 index 0000000..dad9fee --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt @@ -0,0 +1,15 @@ +CMake Debug Log at OriginDebug.cmake:13 \(add_library\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_2.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_1.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetSources/OriginDebug.cmake b/Tests/RunCMake/TargetSources/OriginDebug.cmake new file mode 100644 index 0000000..911a7d4 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug.cmake @@ -0,0 +1,14 @@ + +cmake_minimum_required(VERSION 3.0) + +project(OriginDebug) + +set(CMAKE_DEBUG_TARGET_PROPERTIES SOURCES) + +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_SOURCES + empty_1.cpp +) + +add_library(OriginDebug empty_2.cpp) +target_link_libraries(OriginDebug iface) diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt b/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt new file mode 100644 index 0000000..9797870 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt @@ -0,0 +1,22 @@ +CMake Debug Log at OriginDebug.cmake:13 \(add_library\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_2.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) ++ +CMake Debug Log: + Used sources for target OriginDebug: + + * .*CMakeLists.txt ++ +CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_1.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake b/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake new file mode 100644 index 0000000..a3cc3a8 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake @@ -0,0 +1,4 @@ + +# Separate test for the IDEs, because they show the CMakeLists.txt file +# as a source file. +include(${CMAKE_CURRENT_LIST_DIR}/OriginDebug.cmake) diff --git a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake index 1a3a7fa..b9095f9 100644 --- a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake +++ b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake @@ -3,4 +3,7 @@ include(RunCMake) if(RunCMake_GENERATOR MATCHES Xcode OR RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(ConfigNotAllowed) + run_cmake(OriginDebugIDE) +else() + run_cmake(OriginDebug) endif() |