summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-05 19:54:02 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-07 16:09:01 (GMT)
commitc0debb1f89de47f13f7b9682ebd24b772a649e78 (patch)
tree15e09c0a61f81ef5e4e0fdb6533ca7987c031d17 /Tests
parentdaae0d2f5b0f9f5e1db3615d85d39ee819d50175 (diff)
parentec85306025ae787e08d4ce097fde966f1809c74f (diff)
downloadCMake-c0debb1f89de47f13f7b9682ebd24b772a649e78.zip
CMake-c0debb1f89de47f13f7b9682ebd24b772a649e78.tar.gz
CMake-c0debb1f89de47f13f7b9682ebd24b772a649e78.tar.bz2
Merge branch 'master' into generator-toolset
We need the latest Tests/CMakeLists.txt so we can refactor all tests.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt16
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp12
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt23
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp15
-rw-r--r--Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt28
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depG.cpp7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depG.h7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/targetC.cpp16
-rw-r--r--Tests/CMakeLists.txt15
-rw-r--r--Tests/CMakeTests/CMakeLists.txt5
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in11
-rw-r--r--Tests/CompatibleInterface/CMakeLists.txt69
-rw-r--r--Tests/CompatibleInterface/empty.cpp1
-rw-r--r--Tests/CompatibleInterface/iface2.cpp7
-rw-r--r--Tests/CompatibleInterface/iface2.h13
-rw-r--r--Tests/CompatibleInterface/main.cpp32
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt76
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt20
-rw-r--r--Tests/ExportImport/Import/A/deps_shared_iface.cpp12
-rw-r--r--Tests/ExportImport/Import/CMakeLists.txt5
-rw-r--r--Tests/ExportImport/Import/package_new_new/CMakeLists.txt23
-rw-r--r--Tests/ExportImport/Import/package_new_old/CMakeLists.txt24
-rw-r--r--Tests/ExportImport/Import/package_old_old/CMakeLists.txt24
-rw-r--r--Tests/ExternalProject/CMakeLists.txt4
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt41
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt38
-rw-r--r--Tests/Module/ExternalData/Data.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake52
-rw-r--r--Tests/Module/ExternalData/Data2.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/CMakeLists.txt11
-rw-r--r--Tests/Module/ExternalData/Data2/Data2Check.cmake12
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_1_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_2_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_3_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2b.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data3/CMakeLists.txt14
-rw-r--r--Tests/Module/ExternalData/Data3/Data.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data3/Data3Check.cmake25
-rw-r--r--Tests/Module/ExternalData/Data3/Other.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/A.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/B.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/C.dat.md51
-rw-r--r--Tests/Module/ExternalData/MD5/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/MD5/08cfcf221f76ace7b906b312284e73d71
-rw-r--r--Tests/Module/ExternalData/MD5/30ba0acdee9096b3b9fc6c69362c6b421
-rw-r--r--Tests/Module/ExternalData/MD5/31eff09e84fca01415f8cd9d82ec432b1
-rw-r--r--Tests/Module/ExternalData/MD5/401767f22a456b3522953722090a2c361
-rw-r--r--Tests/Module/ExternalData/MD5/8c018830e3efa5caf3c7415028335a571
-rw-r--r--Tests/Module/ExternalData/MD5/8f4add4581551facf27237e6577fd6621
-rw-r--r--Tests/Module/ExternalData/MD5/9d980b06c2f0fec3d4872d68175b98221
-rw-r--r--Tests/Module/ExternalData/MD5/aaad162b85f60d1eb57ca71a23e8efd71
-rw-r--r--Tests/Module/ExternalData/MD5/c1030719c95f3435d8abc39c0d4429461
-rw-r--r--Tests/Module/ExternalData/MD5/ce38ea6c3c1e00fa6405dd64b8bf6da01
-rw-r--r--Tests/Module/ExternalData/MD5/ecfa1ecd417d4253af81ae04d1bd65811
-rw-r--r--Tests/Module/ExternalData/MD5/f41c94425d01ecbbee70440b951cb0581
-rw-r--r--Tests/Module/ExternalData/MD5/f7ab5a04aae9cb9a520e70b20b9c8ed71
-rw-r--r--Tests/Module/ExternalData/MetaA.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaB.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaC.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaTop.dat.md51
-rw-r--r--Tests/Module/ExternalData/PairedA.dat.md51
-rw-r--r--Tests/Module/ExternalData/PairedB.dat.md51
-rw-r--r--Tests/Module/ExternalData/SHA1/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA1/2af59a7022024974f3b8521b7ed8137c996a79f11
-rw-r--r--Tests/Module/ExternalData/SHA224/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA224/3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a58691741
-rw-r--r--Tests/Module/ExternalData/SHA256/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA256/969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f1331
-rw-r--r--Tests/Module/ExternalData/SeriesA.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.2.dat.sha11
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.3.dat.sha2241
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.4.dat.sha2561
-rw-r--r--Tests/Qt4Targets/CMakeLists.txt20
-rw-r--r--Tests/Qt4Targets/activeqtexe.cpp36
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt9
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW.cmake9
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD.cmake21
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt0
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake14
-rw-r--r--Tests/RunCMake/CMP0004/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0004/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0004/empty.cpp0
-rw-r--r--Tests/RunCMake/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-stderr.txt5
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends.cmake10
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-stderr.txt4
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-stderr.txt5
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends.cmake10
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-stderr.txt4
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/CompatibleInterface/main.cpp5
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt8
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1-stderr.txt19
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2-stderr.txt16
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExternalData/Data.txt.md51
-rw-r--r--Tests/RunCMake/ExternalData/Directory1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory1-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory1.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory1/DirData1.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory2-stderr.txt10
-rw-r--r--Tests/RunCMake/ExternalData/Directory2.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory2.md51
-rw-r--r--Tests/RunCMake/ExternalData/Directory2/DirData2.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory3-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory3.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory3/DirData3.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory4-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory4-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/Directory4.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory4/DirData4.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory5-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory5-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory5.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentMD5-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentMD5.cmake22
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentSHA1-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentSHA1.cmake22
-rw-r--r--Tests/RunCMake/ExternalData/MissingData-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/MissingData-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/MissingData.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt5
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/NormalData1-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData1.cmake13
-rw-r--r--Tests/RunCMake/ExternalData/NormalData2-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData2.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NormalData3-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData3.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NormalDataSub1-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalDataSub1.cmake13
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot-stderr.txt12
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/RunCMakeTest.cmake24
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1/CMakeLists.txt29
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1/Data.txt.md51
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt1
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt7
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake7
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes-stderr.txt23
-rw-r--r--Tests/VSExternalInclude/Lib1/CMakeLists.txt1
-rw-r--r--Tests/VSExternalInclude/Lib2/CMakeLists.txt1
226 files changed, 1389 insertions, 92 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index a37c597..0bfcc1b 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -12,17 +12,19 @@ target_compile_definitions(target_compile_definitions
INTERFACE MY_INTERFACE_DEFINE
)
-add_library(importedlib UNKNOWN IMPORTED)
-target_compile_definitions(importedlib
- INTERFACE MY_IMPORTEDINTERFACE_DEFINE
-)
-
add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
+add_library(linked UNKNOWN IMPORTED)
+set_property(TARGET linked PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS "MY_LINKED_DEFINE")
+
+
target_compile_definitions(consumer
- PRIVATE target_compile_definitions importedlib
+ PRIVATE $<TARGET_PROPERTY:target_compile_definitions,INTERFACE_COMPILE_DEFINITIONS>
$<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
- $<$<TARGET_DEFINED:importedlib>:SHOULD_BE_DEFINED>
+ $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
+ $<LINKED:linked>
+ -DDASH_D_DEFINE
)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index 1ef657d..c077593 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -11,10 +11,6 @@
#error Expected MY_INTERFACE_DEFINE
#endif
-#ifndef MY_IMPORTEDINTERFACE_DEFINE
-#error Expected MY_IMPORTEDINTERFACE_DEFINE
-#endif
-
#ifdef SHOULD_NOT_BE_DEFINED
#error Unexpected SHOULD_NOT_BE_DEFINED
#endif
@@ -23,4 +19,12 @@
#error Expected SHOULD_BE_DEFINED
#endif
+#ifndef DASH_D_DEFINE
+#error Expected DASH_D_DEFINE
+#endif
+
+#ifndef MY_LINKED_DEFINE
+#error Expected MY_LINKED_DEFINE
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index a0f2ee0..a564918 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -11,15 +11,15 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/publicinclude/publicinclude.h" "#define
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/interfaceinclude")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/interfaceinclude/interfaceinclude.h" "#define INTERFACEINCLUDE_DEFINE\n")
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude/importedinterfaceinclude.h" "#define IMPORTEDINTERFACEINCLUDE_DEFINE\n")
-
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/poison")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/poison/common.h" "#error Should not be included\n")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cure")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cure/common.h" "#define CURE_DEFINE\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/linkedinclude")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/linkedinclude/linkedinclude.h" "#define LINKEDINCLUDE_DEFINE\n")
+
add_executable(target_include_directories
"${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
)
@@ -33,18 +33,25 @@ target_include_directories(target_include_directories
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/poison"
)
target_include_directories(target_include_directories
- BEFORE PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/cure"
+ BEFORE PUBLIC "$<$<TARGET_DEFINED:target_include_directories>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
)
-add_library(importedlib UNKNOWN IMPORTED)
-target_include_directories(importedlib
- INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude"
+# Has no effect because the target is not defined:
+target_include_directories(target_include_directories
+ BEFORE PUBLIC "$<$<TARGET_DEFINED:notdefined>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
)
add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
+add_library(linked UNKNOWN IMPORTED)
+set_property(TARGET linked PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/linkedinclude")
+
target_include_directories(consumer
- PRIVATE target_include_directories importedlib
+ PRIVATE
+ $<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
+ $<LINKED:linked>
+ relative_dir
)
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 6fd61d5..ccffd9c 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -2,7 +2,8 @@
#include "common.h"
#include "publicinclude.h"
#include "interfaceinclude.h"
-#include "importedinterfaceinclude.h"
+#include "relative_dir.h"
+#include "linkedinclude.h"
#ifdef PRIVATEINCLUDE_DEFINE
#error Unexpected PRIVATEINCLUDE_DEFINE
@@ -16,12 +17,16 @@
#error Expected INTERFACEINCLUDE_DEFINE
#endif
-#ifndef IMPORTEDINTERFACEINCLUDE_DEFINE
-#error Expected IMPORTEDINTERFACEINCLUDE_DEFINE
-#endif
-
#ifndef CURE_DEFINE
#error Expected CURE_DEFINE
#endif
+#ifndef RELATIVE_DIR_DEFINE
+#error Expected RELATIVE_DIR_DEFINE
+#endif
+
+#ifndef LINKEDINCLUDE_DEFINE
+#error Expected LINKEDINCLUDE_DEFINE
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
new file mode 100644
index 0000000..7017b61
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
@@ -0,0 +1,2 @@
+
+#define RELATIVE_DIR_DEFINE
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 1551c50..cd0fe11 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -29,9 +29,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_library(depA SHARED depA.cpp)
generate_export_header(depA)
-add_library(importedlib UNKNOWN IMPORTED)
-target_link_libraries(importedlib LINK_INTERFACE_LIBRARIES depA)
-
add_library(depB SHARED depB.cpp)
generate_export_header(depB)
@@ -65,10 +62,6 @@ assert_property(targetA LINK_INTERFACE_LIBRARIES "")
add_subdirectory(subdir)
target_link_libraries(targetA subdirlib)
-set_property(TARGET targetA APPEND PROPERTY
- INCLUDE_DIRECTORIES
- $<TARGET_PROPERTY:subdirlib,INTERFACE_INCLUDE_DIRECTORIES>
-)
target_link_libraries(targetA depB depC)
@@ -90,3 +83,24 @@ set_property(TARGET depD APPEND PROPERTY
add_executable(targetB targetB.cpp)
target_link_libraries(targetB depD)
+
+macro(create_header _name)
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_name}")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_name}/${_name}.h" "//${_name}.h\n")
+endmacro()
+
+create_header(foo)
+create_header(bar)
+
+add_library(depG SHARED depG.cpp)
+generate_export_header(depG)
+target_include_directories(depG INTERFACE
+ "${CMAKE_CURRENT_BINARY_DIR}/foo"
+ "${CMAKE_CURRENT_BINARY_DIR}/bar"
+)
+target_compile_definitions(depG INTERFACE
+ TEST_DEF
+)
+
+add_executable(targetC targetC.cpp)
+target_link_libraries(targetC depG)
diff --git a/Tests/CMakeCommands/target_link_libraries/depG.cpp b/Tests/CMakeCommands/target_link_libraries/depG.cpp
new file mode 100644
index 0000000..65b9655
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/depG.cpp
@@ -0,0 +1,7 @@
+
+#include "depG.h"
+
+int DepG::foo()
+{
+ return 0;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/depG.h b/Tests/CMakeCommands/target_link_libraries/depG.h
new file mode 100644
index 0000000..1a36589
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/depG.h
@@ -0,0 +1,7 @@
+
+#include "depg_export.h"
+
+struct DEPG_EXPORT DepG
+{
+ int foo();
+};
diff --git a/Tests/CMakeCommands/target_link_libraries/targetC.cpp b/Tests/CMakeCommands/target_link_libraries/targetC.cpp
new file mode 100644
index 0000000..ff6ba66
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/targetC.cpp
@@ -0,0 +1,16 @@
+
+#include "depG.h"
+
+#include "foo.h"
+#include "bar.h"
+
+#ifndef TEST_DEF
+#error Expected TEST_DEF definition
+#endif
+
+int main(int argc, char **argv)
+{
+ DepG g;
+
+ return g.foo();
+}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2f7df01..0876a07 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -216,6 +216,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(PolicyScope PolicyScope)
ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
ADD_TEST_MACRO(CompileDefinitions CompileDefinitions)
+ ADD_TEST_MACRO(CompatibleInterface CompatibleInterface)
set_tests_properties(EmptyLibrary PROPERTIES
PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target:test")
ADD_TEST_MACRO(CrossCompile CrossCompile)
@@ -311,6 +312,19 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(Module.CheckTypeSize CheckTypeSize)
+ add_test(Module.ExternalData ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Module/ExternalData"
+ "${CMake_BINARY_DIR}/Tests/Module/ExternalData"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project ExternalDataTest
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-noclean
+ --force-new-ctest-process
+ --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData")
+
ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader)
if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
@@ -1976,6 +1990,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--output-log "${CMake_BINARY_DIR}/Tests/CTestTestParallel/testOutput.log"
)
+ set(CTestLimitDashJ_EXTRA_OPTIONS --force-new-ctest-process)
add_test_macro(CTestLimitDashJ ${CMAKE_CTEST_COMMAND} -j 4
--output-on-failure -C "\${CTestTest_CONFIG}")
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index d34d4a6..b049995 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -4,7 +4,8 @@ set(CMAKE_EXECUTABLE "${CMake_BIN_DIR}/cmake")
macro(AddCMakeTest TestName PreArgs)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${TestName}Test.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY IMMEDIATE)
- add_test(CMake.${TestName} ${CMAKE_EXECUTABLE} ${PreArgs}
+ add_test(NAME CMake.${TestName}
+ COMMAND ${CMAKE_EXECUTABLE} ${PreArgs}
-P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN})
endmacro()
@@ -28,7 +29,7 @@ AddCMakeTest(String "")
AddCMakeTest(Math "")
AddCMakeTest(CMakeMinimumRequired "")
AddCMakeTest(CompilerIdVendor "")
-AddCMakeTest(ProcessorCount "")
+AddCMakeTest(ProcessorCount "-DKWSYS_TEST_EXE=$<TARGET_FILE:cmsysTestsCxx>")
AddCMakeTest(PushCheckState "")
AddCMakeTest(While "")
diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in
index 98f6ab1..f92dcc4 100644
--- a/Tests/CMakeTests/ProcessorCountTest.cmake.in
+++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in
@@ -9,10 +9,17 @@ message("### 3. ProcessorCount(...) function call is emitting output that it sho
message("processor_count='${processor_count}'")
execute_process(
- COMMAND "@CMAKE_BINARY_DIR@/Source/kwsys/$ENV{CMAKE_CONFIG_TYPE}/cmsysTestsCxx"
+ COMMAND "${KWSYS_TEST_EXE}"
testSystemInformation
OUTPUT_VARIABLE tsi_out
- ERROR_VARIABLE tsi_err)
+ ERROR_VARIABLE tsi_err
+ RESULT_VARIABLE tsi_res
+)
+if (tsi_res)
+ message("executing \"${KWSYS_TEST_EXE}\" failed")
+ message(FATAL_ERROR "output: ${tsi_res}")
+endif ()
+
string(REGEX REPLACE "(.*)GetNumberOfPhysicalCPU:.([0-9]*)(.*)" "\\2"
system_info_processor_count "${tsi_out}")
diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt
new file mode 100644
index 0000000..329510b
--- /dev/null
+++ b/Tests/CompatibleInterface/CMakeLists.txt
@@ -0,0 +1,69 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(CompatibleInterface)
+
+include(GenerateExportHeader)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+add_library(iface1 empty.cpp)
+set_property(TARGET iface1 APPEND PROPERTY
+ COMPATIBLE_INTERFACE_BOOL
+ BOOL_PROP1
+ BOOL_PROP2
+ BOOL_PROP3
+ BOOL_PROP4
+)
+set_property(TARGET iface1 APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING
+ STRING_PROP1
+ STRING_PROP2
+ STRING_PROP3
+)
+
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
+set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP1 prop1)
+set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP2 prop2)
+
+add_executable(CompatibleInterface main.cpp)
+target_link_libraries(CompatibleInterface iface1)
+
+set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP2 ON)
+set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP3 ON)
+set_property(TARGET CompatibleInterface PROPERTY STRING_PROP2 prop2)
+set_property(TARGET CompatibleInterface PROPERTY STRING_PROP3 prop3)
+
+target_compile_definitions(CompatibleInterface
+ PRIVATE
+ $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP1>>:BOOL_PROP1>
+ $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP2>>:BOOL_PROP2>
+ $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP3>>:BOOL_PROP3>
+ $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP1>,prop1>:STRING_PROP1>
+ $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP2>,prop2>:STRING_PROP2>
+ $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP3>,prop3>:STRING_PROP3>
+)
+
+
+add_library(iface2 SHARED iface2.cpp)
+generate_export_header(iface2)
+
+set_property(TARGET iface2 APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING
+ Iface2_PROP
+)
+
+# For the LINK_LIBRARIES and related properties, we should not evaluate
+# properties defined only in the interface - they should be implicitly zero
+set_property(TARGET iface2
+ APPEND PROPERTY
+ LINK_INTERFACE_LIBRARIES $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP4>>:nonexistant>
+)
+target_link_libraries(CompatibleInterface iface2
+ $<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:nonexistant>
+)
+# Test that this does not segfault:
+target_compile_definitions(CompatibleInterface
+ PRIVATE
+ $<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:SOME_DEFINE>
+)
diff --git a/Tests/CompatibleInterface/empty.cpp b/Tests/CompatibleInterface/empty.cpp
new file mode 100644
index 0000000..0032329
--- /dev/null
+++ b/Tests/CompatibleInterface/empty.cpp
@@ -0,0 +1 @@
+// no content
diff --git a/Tests/CompatibleInterface/iface2.cpp b/Tests/CompatibleInterface/iface2.cpp
new file mode 100644
index 0000000..a9b5015
--- /dev/null
+++ b/Tests/CompatibleInterface/iface2.cpp
@@ -0,0 +1,7 @@
+
+#include "iface2.h"
+
+int Iface2::foo()
+{
+ return 0;
+}
diff --git a/Tests/CompatibleInterface/iface2.h b/Tests/CompatibleInterface/iface2.h
new file mode 100644
index 0000000..ef4ebee
--- /dev/null
+++ b/Tests/CompatibleInterface/iface2.h
@@ -0,0 +1,13 @@
+
+#ifndef IFACE2_H
+#define IFACE2_H
+
+#include "iface2_export.h"
+
+class IFACE2_EXPORT Iface2
+{
+public:
+ int foo();
+};
+
+#endif
diff --git a/Tests/CompatibleInterface/main.cpp b/Tests/CompatibleInterface/main.cpp
new file mode 100644
index 0000000..f5e6e38
--- /dev/null
+++ b/Tests/CompatibleInterface/main.cpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOL_PROP1
+#error Expected BOOL_PROP1
+#endif
+
+#ifndef BOOL_PROP2
+#error Expected BOOL_PROP2
+#endif
+
+#ifndef BOOL_PROP3
+#error Expected BOOL_PROP3
+#endif
+
+#ifndef STRING_PROP1
+#error Expected STRING_PROP1
+#endif
+
+#ifndef STRING_PROP2
+#error Expected STRING_PROP2
+#endif
+
+#ifndef STRING_PROP3
+#error Expected STRING_PROP3
+#endif
+
+#include "iface2.h"
+
+int main(int argc, char **argv)
+{
+ Iface2 if2;
+ return if2.foo();
+}
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index dd615d1..ae938cd 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -90,32 +90,23 @@ set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3)
# Test exporting dependent libraries into different exports
add_library(testLibRequired testLibRequired.c)
add_library(testLibDepends testLibDepends.c)
-set_property(TARGET testLibDepends APPEND PROPERTY
- INCLUDE_DIRECTORIES
- $<TARGET_PROPERTY:testLibRequired,INTERFACE_INCLUDE_DIRECTORIES>
-)
-set_property(TARGET testLibDepends APPEND PROPERTY
- COMPILE_DEFINITIONS
- $<TARGET_PROPERTY:testLibRequired,INTERFACE_COMPILE_DEFINITIONS>
-)
-set_property(TARGET testLibDepends APPEND PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES
- $<TARGET_PROPERTY:testLibRequired,INTERFACE_INCLUDE_DIRECTORIES>
-)
-set_property(TARGET testLibDepends APPEND PROPERTY
- INTERFACE_COMPILE_DEFINITIONS
- $<TARGET_PROPERTY:testLibRequired,INTERFACE_COMPILE_DEFINITIONS>
-)
-target_link_libraries(testLibDepends testLibRequired)
+target_link_libraries(testLibDepends LINK_PUBLIC testLibRequired)
macro(add_include_lib _libName)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_libName}.c" "// no content\n")
add_library(${_libName} "${CMAKE_CURRENT_BINARY_DIR}/${_libName}.c")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_libName}")
set_property(TARGET ${_libName} APPEND PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/${_libName}")
+ INTERFACE_INCLUDE_DIRECTORIES
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${_libName}>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/${_libName}>"
+ )
if (NOT "${ARGV1}" STREQUAL "NO_HEADER")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_libName}/${_libName}.h" "// no content\n")
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/${_libName}/${_libName}.h"
+ DESTINATION include/${_libName}
+ )
endif()
endmacro()
@@ -129,6 +120,10 @@ add_include_lib(testLibIncludeRequired3 NO_HEADER)
# but we are testing that the INSTALL_INTERFACE causes it not to be used
# at build time.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/testLibIncludeRequired3/testLibIncludeRequired4.h" "#error Should not be included\n")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/testLibIncludeRequired3/testLibIncludeRequired4.h"
+ DESTINATION include/testLibIncludeRequired3
+)
add_include_lib(testLibIncludeRequired4)
add_include_lib(testLibIncludeRequired5 NO_HEADER)
# Generate testLibIncludeRequired6 in the testLibIncludeRequired5 directory
@@ -139,6 +134,10 @@ add_include_lib(testLibIncludeRequired5 NO_HEADER)
# the Import side of this unit test, the '6' include from the '5' directory
# will not be used because it is in the BUILD_INTERFACE only.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/testLibIncludeRequired5/testLibIncludeRequired6.h" "#error Should not be included\n")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/testLibIncludeRequired5/testLibIncludeRequired6.h"
+ DESTINATION include/testLibIncludeRequired5
+)
add_include_lib(testLibIncludeRequired6)
set_property(TARGET testLibRequired APPEND PROPERTY
@@ -149,6 +148,8 @@ set_property(TARGET testLibRequired APPEND PROPERTY
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired4,INTERFACE_INCLUDE_DIRECTORIES>>
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
$<INSTALL_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired6,INTERFACE_INCLUDE_DIRECTORIES>>
+ # Test that the below is non-fatal
+ $<$<TARGET_DEFINED:not_a_target>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
)
set_property(TARGET testLibRequired APPEND PROPERTY
@@ -173,6 +174,22 @@ set_property(TARGET testSharedLibRequired APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
)
+set_property(TARGET testSharedLibRequired
+ APPEND PROPERTY
+ COMPATIBLE_INTERFACE_BOOL CUSTOM_PROP
+)
+set_property(TARGET testSharedLibRequired
+ PROPERTY
+ INTERFACE_CUSTOM_PROP ON
+)
+set_property(TARGET testSharedLibRequired
+ APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING CUSTOM_STRING
+)
+set_property(TARGET testSharedLibRequired
+ PROPERTY
+ INTERFACE_CUSTOM_STRING testcontent
+)
add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
@@ -201,11 +218,30 @@ install(TARGETS testLibRequired
testLibIncludeRequired6
testSharedLibRequired
EXPORT RequiredExp DESTINATION lib )
-install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredConfig.cmake DESTINATION lib/cmake/testLibRequired)
+install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired)
install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp DESTINATION lib )
-install(EXPORT DependsExp FILE testLibDependsConfig.cmake DESTINATION lib/cmake/testLibDepends)
+install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION lib/cmake/testLibDepends)
+file(WRITE
+ "${CMAKE_CURRENT_BINARY_DIR}/testLibRequiredConfig.cmake"
+ "
+if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS 2.3 AND NOT \${CMAKE_FIND_PACKAGE_NAME}_INTERFACES)
+ set(\${CMAKE_FIND_PACKAGE_NAME}_NO_INTERFACES 1)
+endif()
+include(\"\${CMAKE_CURRENT_LIST_DIR}/testLibRequiredTargets.cmake\")
+set(\${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS \"${CMAKE_CURRENT_BINARY_DIR}\" \"${CMAKE_CURRENT_SOURCE_DIR}\" )
+"
+)
+
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file( testLibRequiredConfigVersion.cmake VERSION 2.5 COMPATIBILITY AnyNewerVersion)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/testLibRequiredConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/testLibRequiredConfigVersion.cmake"
+ DESTINATION lib/cmake/testLibRequired
+)
# Install and export from install tree.
install(
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 4812e7e..0337130 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -5,8 +5,8 @@ include(${Import_BINARY_DIR}/../Export/ExportBuildTree.cmake)
include(${CMAKE_INSTALL_PREFIX}/lib/exp/exp.cmake)
# Import two exports, where the Depends one depends on an exported target from the Required one:
-include(${CMAKE_INSTALL_PREFIX}/lib/cmake/testLibRequired/testLibRequiredConfig.cmake)
-include(${CMAKE_INSTALL_PREFIX}/lib/cmake/testLibDepends/testLibDependsConfig.cmake)
+include(${CMAKE_INSTALL_PREFIX}/lib/cmake/testLibRequired/testLibRequiredTargets.cmake)
+include(${CMAKE_INSTALL_PREFIX}/lib/cmake/testLibDepends/testLibDependsTargets.cmake)
# Try referencing an executable imported from the install tree.
add_custom_command(
@@ -159,13 +159,15 @@ endif()
add_executable(deps_iface deps_iface.c)
target_link_libraries(deps_iface testLibDepends)
-target_include_directories(deps_iface PRIVATE testLibDepends)
-target_compile_definitions(deps_iface PRIVATE testLibDepends)
add_executable(deps_shared_iface deps_shared_iface.cpp)
target_link_libraries(deps_shared_iface testSharedLibDepends)
-target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends)
-target_compile_definitions(deps_shared_iface PRIVATE testSharedLibDepends)
+target_compile_definitions(deps_shared_iface
+ PRIVATE
+ $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
+ $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
+ $<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>
+)
if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
include(CheckCXXCompilerFlag)
@@ -191,7 +193,9 @@ endif()
add_executable(deps_shared_iface2 deps_shared_iface.cpp)
target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib)
-target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends bld_subdirlib)
target_compile_definitions(deps_shared_iface2
- PRIVATE bld_testSharedLibDepends TEST_SUBDIR_LIB
+ PRIVATE TEST_SUBDIR_LIB
+ $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
+ $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
+ $<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>
)
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index 43f832a..2f0e74a 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -8,6 +8,18 @@
#endif
#endif
+#ifndef PIC_PROPERTY_IS_ON
+#error Expected PIC_PROPERTY_IS_ON
+#endif
+
+#ifndef CUSTOM_PROPERTY_IS_ON
+#error Expected CUSTOM_PROPERTY_IS_ON
+#endif
+
+#ifndef CUSTOM_STRING_IS_MATCH
+#error Expected CUSTOM_STRING_IS_MATCH
+#endif
+
#ifdef TEST_SUBDIR_LIB
#include "subdir.h"
#endif
diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt
index 3fc78a2..237f8fa 100644
--- a/Tests/ExportImport/Import/CMakeLists.txt
+++ b/Tests/ExportImport/Import/CMakeLists.txt
@@ -17,3 +17,8 @@ add_executable(imp_testTransExe1 imp_testTransExe1.c)
target_link_libraries(imp_testTransExe1 imp_lib1)
add_executable(imp_testTransExe1b imp_testTransExe1.c)
target_link_libraries(imp_testTransExe1b imp_lib1b)
+
+# Test package INTERFACE controls
+add_subdirectory(package_old_old)
+add_subdirectory(package_new_old)
+add_subdirectory(package_new_new)
diff --git a/Tests/ExportImport/Import/package_new_new/CMakeLists.txt b/Tests/ExportImport/Import/package_new_new/CMakeLists.txt
new file mode 100644
index 0000000..4e6f642
--- /dev/null
+++ b/Tests/ExportImport/Import/package_new_new/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+find_package(testLibRequired 2.5 REQUIRED)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "
+#include \"testSharedLibRequired.h\"
+int main(int argc, char **argv)
+{
+ TestSharedLibRequired req;
+ return req.foo();
+}
+"
+)
+
+get_target_property(prop Req::testSharedLibRequired INTERFACE_INCLUDE_DIRECTORIES)
+if (NOT prop)
+ message(SEND_ERROR "Interface of Req::testSharedLibRequired should not be empty")
+endif()
+
+add_executable(new_new_test "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(new_new_test Req::testSharedLibRequired)
diff --git a/Tests/ExportImport/Import/package_new_old/CMakeLists.txt b/Tests/ExportImport/Import/package_new_old/CMakeLists.txt
new file mode 100644
index 0000000..e675d64
--- /dev/null
+++ b/Tests/ExportImport/Import/package_new_old/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+find_package(testLibRequired 2.5 REQUIRED)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "
+#include \"testSharedLibRequired.h\"
+int main(int argc, char **argv)
+{
+ TestSharedLibRequired req;
+ return req.foo();
+}
+"
+)
+
+get_target_property(prop Req::testSharedLibRequired INTERFACE_INCLUDE_DIRECTORIES)
+if ("${prop}" STREQUAL "")
+ message(SEND_ERROR "Interface of Req::testSharedLibRequired should not be empty")
+endif()
+
+add_executable(new_old_test "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(new_old_test Req::testSharedLibRequired)
+include_directories(${testLibRequired_INCLUDE_DIRS})
diff --git a/Tests/ExportImport/Import/package_old_old/CMakeLists.txt b/Tests/ExportImport/Import/package_old_old/CMakeLists.txt
new file mode 100644
index 0000000..3b27330
--- /dev/null
+++ b/Tests/ExportImport/Import/package_old_old/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+find_package(testLibRequired 2.1 REQUIRED)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "
+#include \"testSharedLibRequired.h\"
+int main(int argc, char **argv)
+{
+ TestSharedLibRequired req;
+ return req.foo();
+}
+"
+)
+
+get_target_property(prop Req::testSharedLibRequired INTERFACE_INCLUDE_DIRECTORIES)
+if (prop)
+ message(SEND_ERROR "Interface of Req::testSharedLibRequired should be empty, but is ${prop}")
+endif()
+
+add_executable(old_old_test "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(old_old_test Req::testSharedLibRequired)
+include_directories(${testLibRequired_INCLUDE_DIRS})
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index e24a979..602ff0f 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -50,6 +50,8 @@ if(NOT DEFINED can_build_tutorial_step5)
endif()
endif()
+add_custom_target(NonExternalProjectTarget
+ COMMAND ${CMAKE_COMMAND} -E echo NonExternalProjectTarget)
# Empty projects that test all the known ExternalProject_Add argument key words:
#
@@ -94,7 +96,7 @@ ExternalProject_Add(${proj}
CVS_REPOSITORY ""
CVS_MODULE ""
CVS_TAG ""
- DEPENDS "MinimalNoOpProject"
+ DEPENDS "MinimalNoOpProject" NonExternalProjectTarget
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
PATCH_COMMAND ""
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
index 21159e0..5387377 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
@@ -82,3 +82,44 @@ add_custom_target(test_custom_target
$<TARGET_PROPERTY:TargetIncludeDirectories,COMPILE_DEFINITIONS>
WORKING_DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}")
+
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bad")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/bad/common.h" "#error Should not be included\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/good")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/good/common.h" "#include \"othergood.h\"\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/othergood")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/othergood/othergood.h" "// No error\n")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libothergood.cpp" "// No content \n")
+add_library(libothergood "${CMAKE_CURRENT_BINARY_DIR}/libothergood.cpp")
+set_property(TARGET libothergood APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/othergood"
+)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libgood.cpp" "// No content \n")
+add_library(libgood "${CMAKE_CURRENT_BINARY_DIR}/libgood.cpp")
+set_property(TARGET libgood APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${CMAKE_CURRENT_BINARY_DIR}/good;$<TARGET_PROPERTY:libothergood,INTERFACE_INCLUDE_DIRECTORIES>"
+)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libbad.cpp" "// No content \n")
+add_library(libbad "${CMAKE_CURRENT_BINARY_DIR}/libbad.cpp")
+set_property(TARGET libbad APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/bad"
+)
+
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib5.cpp" "#include \"common.h\"\n")
+add_library(lib5 "${CMAKE_CURRENT_BINARY_DIR}/lib5.cpp")
+
+# Assuming the link order must be:
+target_link_libraries(lib5 libbad libgood)
+
+# Oops!.
+# As include directory order and link order are the same when using target_link_libraries, we have to
+# get the libgood includes in before the libbad includes.
+# We do that with this command:
+target_include_directories(lib5
+ BEFORE PRIVATE $<LINKED:libgood>
+)
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
new file mode 100644
index 0000000..607e9b9
--- /dev/null
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 2.8.10.20130115)
+project(ExternalDataTest NONE)
+
+include(CTest)
+
+include(ExternalData)
+
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+ set(slash /)
+endif()
+set(ExternalData_URL_TEMPLATES
+ "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(ExternalData_BINARY_ROOT "${CMAKE_CURRENT_BINARY_DIR}/ExternalData")
+file(REMOVE_RECURSE ${ExternalData_BINARY_ROOT}) # clean test
+
+ExternalData_Add_Test(Data1
+ NAME Data1Check
+ COMMAND ${CMAKE_COMMAND}
+ -D Data=DATA{Data.dat}
+ -D SeriesA=DATA{SeriesA.dat,:}
+ -D SeriesB=DATA{SeriesB.dat,:}
+ -D SeriesC=DATA{SeriesC.dat,:}
+ -D SeriesD=DATA{SeriesD.dat,:}
+ -D SeriesAn=DATA{SeriesAn1.dat,:}
+ -D SeriesBn=DATA{SeriesBn_1.dat,:}
+ -D SeriesCn=DATA{SeriesCn.1.dat,:}
+ -D SeriesDn=DATA{SeriesDn-1.dat,:}
+ -D SeriesMixed=DATA{SeriesMixed.1.dat,:}
+ -D Paired=DATA{PairedA.dat,PairedB.dat}
+ -D Meta=DATA{MetaTop.dat,REGEX:Meta[ABC].dat}
+ -D Directory=DATA{Directory/,A.dat,REGEX:[BC].dat}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake
+ )
+ExternalData_Add_Target(Data1)
+
+add_subdirectory(Data2)
+add_subdirectory(Data3)
diff --git a/Tests/Module/ExternalData/Data.dat.md5 b/Tests/Module/ExternalData/Data.dat.md5
new file mode 100644
index 0000000..70e39bd
--- /dev/null
+++ b/Tests/Module/ExternalData/Data.dat.md5
@@ -0,0 +1 @@
+8c018830e3efa5caf3c7415028335a57
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake
new file mode 100644
index 0000000..b99d7ae
--- /dev/null
+++ b/Tests/Module/ExternalData/Data1Check.cmake
@@ -0,0 +1,52 @@
+file(STRINGS "${Data}" lines LIMIT_INPUT 1024)
+if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
+ message(SEND_ERROR "Input file:\n ${Data}\ndoes not have expected content, but [[${lines}]]")
+endif()
+set(SeriesAn1 "1\\.dat")
+set(SeriesBn1 "_1\\.dat")
+set(SeriesCn1 "\\.1\\.dat")
+set(SeriesDn1 "-1\\.dat")
+set(SeriesAl 1 2 3)
+set(SeriesBl _1 _2 _3)
+set(SeriesCl .1 .2 .3)
+set(SeriesDl -1 -2 -3)
+foreach(s A B C D)
+ foreach(n "" ${Series${s}l})
+ string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+ endforeach()
+endforeach()
+foreach(s A B C D)
+ foreach(n ${Series${s}l})
+ string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+ endforeach()
+endforeach()
+foreach(n .1 .2 .3 .4)
+ string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n A B)
+ string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n Top A B C)
+ string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n A B C)
+ set(file "${Directory}/${n}.dat")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
diff --git a/Tests/Module/ExternalData/Data2.dat.md5 b/Tests/Module/ExternalData/Data2.dat.md5
new file mode 100644
index 0000000..70e39bd
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2.dat.md5
@@ -0,0 +1 @@
+8c018830e3efa5caf3c7415028335a57
diff --git a/Tests/Module/ExternalData/Data2/CMakeLists.txt b/Tests/Module/ExternalData/Data2/CMakeLists.txt
new file mode 100644
index 0000000..c5b79ac
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2/CMakeLists.txt
@@ -0,0 +1,11 @@
+set(ExternalData_SERIES_PARSE "([0-9]+)(_\\.my\\.dat)$")
+set(ExternalData_SERIES_MATCH "([0-9]+)")
+ExternalData_Add_Test(Data2
+ NAME Data2Check
+ COMMAND ${CMAKE_COMMAND}
+ -D Data2=DATA{../Data2.dat}
+ -D Data2b=DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data2b.dat}
+ -D SeriesC=DATA{SeriesC_1_.my.dat,:}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/Data2Check.cmake
+ )
+ExternalData_Add_Target(Data2)
diff --git a/Tests/Module/ExternalData/Data2/Data2Check.cmake b/Tests/Module/ExternalData/Data2/Data2Check.cmake
new file mode 100644
index 0000000..d5b0c7b
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2/Data2Check.cmake
@@ -0,0 +1,12 @@
+foreach(d "${Data2}" "${Data2b}")
+ file(STRINGS "${d}" lines LIMIT_INPUT 1024)
+ if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
+ message(SEND_ERROR "Input file:\n ${d}\ndoes not have expected content, but [[${lines}]]")
+ endif()
+endforeach()
+foreach(n 1 2 3)
+ string(REGEX REPLACE "_1_\\.my\\.dat$" "_${n}_.my.dat" SeriesCFile "${SeriesC}")
+ if(NOT EXISTS "${SeriesCFile}")
+ message(SEND_ERROR "Input file:\n ${SeriesCFile}\ndoes not exist!")
+ endif()
+endforeach()
diff --git a/Tests/Module/ExternalData/Data2/SeriesC_1_.my.dat.md5 b/Tests/Module/ExternalData/Data2/SeriesC_1_.my.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2/SeriesC_1_.my.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/Data2/SeriesC_2_.my.dat.md5 b/Tests/Module/ExternalData/Data2/SeriesC_2_.my.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2/SeriesC_2_.my.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/Data2/SeriesC_3_.my.dat.md5 b/Tests/Module/ExternalData/Data2/SeriesC_3_.my.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2/SeriesC_3_.my.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/Data2b.dat.md5 b/Tests/Module/ExternalData/Data2b.dat.md5
new file mode 100644
index 0000000..70e39bd
--- /dev/null
+++ b/Tests/Module/ExternalData/Data2b.dat.md5
@@ -0,0 +1 @@
+8c018830e3efa5caf3c7415028335a57
diff --git a/Tests/Module/ExternalData/Data3/CMakeLists.txt b/Tests/Module/ExternalData/Data3/CMakeLists.txt
new file mode 100644
index 0000000..a7c2b6e
--- /dev/null
+++ b/Tests/Module/ExternalData/Data3/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(Store0 ${CMAKE_BINARY_DIR}/ExternalData/Other)
+set(Store1 ${CMAKE_BINARY_DIR}/ExternalData/Objects)
+set(ExternalData_OBJECT_STORES ${Store0} ${Store1})
+ExternalData_Add_Test(Data3
+ NAME Data3Check
+ COMMAND ${CMAKE_COMMAND}
+ -D Data=DATA{Data.dat}
+ -D Other=DATA{Other.dat}
+ -D Store0=${Store0}
+ -D Store1=${Store1}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/Data3Check.cmake
+ )
+ExternalData_Add_Target(Data3)
+add_dependencies(Data3 Data1 Data2)
diff --git a/Tests/Module/ExternalData/Data3/Data.dat.md5 b/Tests/Module/ExternalData/Data3/Data.dat.md5
new file mode 100644
index 0000000..70e39bd
--- /dev/null
+++ b/Tests/Module/ExternalData/Data3/Data.dat.md5
@@ -0,0 +1 @@
+8c018830e3efa5caf3c7415028335a57
diff --git a/Tests/Module/ExternalData/Data3/Data3Check.cmake b/Tests/Module/ExternalData/Data3/Data3Check.cmake
new file mode 100644
index 0000000..de98839
--- /dev/null
+++ b/Tests/Module/ExternalData/Data3/Data3Check.cmake
@@ -0,0 +1,25 @@
+if(NOT EXISTS "${Data}")
+ message(SEND_ERROR "Input file:\n ${Data}\ndoes not exist!")
+endif()
+if(NOT EXISTS "${Other}")
+ message(SEND_ERROR "Input file:\n ${Other}\ndoes not exist!")
+endif()
+# Verify that the 'Data' object was found in the second store location left
+# from Data1 target downloads and that the 'Other' object was downloaded to
+# our first store location. Neither object should exist in the other store.
+foreach(should_exist
+ "${Store0}/MD5/aaad162b85f60d1eb57ca71a23e8efd7"
+ "${Store1}/MD5/8c018830e3efa5caf3c7415028335a57"
+ )
+ if(NOT EXISTS ${should_exist})
+ message(SEND_ERROR "Store file:\n ${should_exist}\nshould exist!")
+ endif()
+endforeach()
+foreach(should_not_exist
+ "${Store0}/MD5/8c018830e3efa5caf3c7415028335a57"
+ "${Store1}/MD5/aaad162b85f60d1eb57ca71a23e8efd7"
+ )
+ if(EXISTS ${should_not_exist})
+ message(SEND_ERROR "Store file:\n ${should_not_exist}\nshould not exist!")
+ endif()
+endforeach()
diff --git a/Tests/Module/ExternalData/Data3/Other.dat.md5 b/Tests/Module/ExternalData/Data3/Other.dat.md5
new file mode 100644
index 0000000..5312faa
--- /dev/null
+++ b/Tests/Module/ExternalData/Data3/Other.dat.md5
@@ -0,0 +1 @@
+aaad162b85f60d1eb57ca71a23e8efd7
diff --git a/Tests/Module/ExternalData/Directory/A.dat.md5 b/Tests/Module/ExternalData/Directory/A.dat.md5
new file mode 100644
index 0000000..4a78fc7
--- /dev/null
+++ b/Tests/Module/ExternalData/Directory/A.dat.md5
@@ -0,0 +1 @@
+9d980b06c2f0fec3d4872d68175b9822
diff --git a/Tests/Module/ExternalData/Directory/B.dat.md5 b/Tests/Module/ExternalData/Directory/B.dat.md5
new file mode 100644
index 0000000..4557a21
--- /dev/null
+++ b/Tests/Module/ExternalData/Directory/B.dat.md5
@@ -0,0 +1 @@
+8f4add4581551facf27237e6577fd662
diff --git a/Tests/Module/ExternalData/Directory/C.dat.md5 b/Tests/Module/ExternalData/Directory/C.dat.md5
new file mode 100644
index 0000000..a7f23dd
--- /dev/null
+++ b/Tests/Module/ExternalData/Directory/C.dat.md5
@@ -0,0 +1 @@
+c1030719c95f3435d8abc39c0d442946
diff --git a/Tests/Module/ExternalData/MD5/.gitattributes b/Tests/Module/ExternalData/MD5/.gitattributes
new file mode 100644
index 0000000..3e51d39
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/.gitattributes
@@ -0,0 +1 @@
+* -crlf
diff --git a/Tests/Module/ExternalData/MD5/08cfcf221f76ace7b906b312284e73d7 b/Tests/Module/ExternalData/MD5/08cfcf221f76ace7b906b312284e73d7
new file mode 100644
index 0000000..a689e3c
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/08cfcf221f76ace7b906b312284e73d7
@@ -0,0 +1 @@
+MetaTop
diff --git a/Tests/Module/ExternalData/MD5/30ba0acdee9096b3b9fc6c69362c6b42 b/Tests/Module/ExternalData/MD5/30ba0acdee9096b3b9fc6c69362c6b42
new file mode 100644
index 0000000..5491241
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/30ba0acdee9096b3b9fc6c69362c6b42
@@ -0,0 +1 @@
+Series.3
diff --git a/Tests/Module/ExternalData/MD5/31eff09e84fca01415f8cd9d82ec432b b/Tests/Module/ExternalData/MD5/31eff09e84fca01415f8cd9d82ec432b
new file mode 100644
index 0000000..4d0475e
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/31eff09e84fca01415f8cd9d82ec432b
@@ -0,0 +1 @@
+Series.1
diff --git a/Tests/Module/ExternalData/MD5/401767f22a456b3522953722090a2c36 b/Tests/Module/ExternalData/MD5/401767f22a456b3522953722090a2c36
new file mode 100644
index 0000000..9dec116
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/401767f22a456b3522953722090a2c36
@@ -0,0 +1 @@
+PairedA
diff --git a/Tests/Module/ExternalData/MD5/8c018830e3efa5caf3c7415028335a57 b/Tests/Module/ExternalData/MD5/8c018830e3efa5caf3c7415028335a57
new file mode 100644
index 0000000..fa701e2
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/8c018830e3efa5caf3c7415028335a57
@@ -0,0 +1 @@
+Input file already transformed.
diff --git a/Tests/Module/ExternalData/MD5/8f4add4581551facf27237e6577fd662 b/Tests/Module/ExternalData/MD5/8f4add4581551facf27237e6577fd662
new file mode 100644
index 0000000..69ba09c
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/8f4add4581551facf27237e6577fd662
@@ -0,0 +1 @@
+MetaB
diff --git a/Tests/Module/ExternalData/MD5/9d980b06c2f0fec3d4872d68175b9822 b/Tests/Module/ExternalData/MD5/9d980b06c2f0fec3d4872d68175b9822
new file mode 100644
index 0000000..000e7b2
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/9d980b06c2f0fec3d4872d68175b9822
@@ -0,0 +1 @@
+MetaA
diff --git a/Tests/Module/ExternalData/MD5/aaad162b85f60d1eb57ca71a23e8efd7 b/Tests/Module/ExternalData/MD5/aaad162b85f60d1eb57ca71a23e8efd7
new file mode 100644
index 0000000..df0510c
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/aaad162b85f60d1eb57ca71a23e8efd7
@@ -0,0 +1 @@
+Another input file already transformed.
diff --git a/Tests/Module/ExternalData/MD5/c1030719c95f3435d8abc39c0d442946 b/Tests/Module/ExternalData/MD5/c1030719c95f3435d8abc39c0d442946
new file mode 100644
index 0000000..3fac5e6
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/c1030719c95f3435d8abc39c0d442946
@@ -0,0 +1 @@
+MetaC
diff --git a/Tests/Module/ExternalData/MD5/ce38ea6c3c1e00fa6405dd64b8bf6da0 b/Tests/Module/ExternalData/MD5/ce38ea6c3c1e00fa6405dd64b8bf6da0
new file mode 100644
index 0000000..362d4b4
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/ce38ea6c3c1e00fa6405dd64b8bf6da0
@@ -0,0 +1 @@
+SeriesMixed.1
diff --git a/Tests/Module/ExternalData/MD5/ecfa1ecd417d4253af81ae04d1bd6581 b/Tests/Module/ExternalData/MD5/ecfa1ecd417d4253af81ae04d1bd6581
new file mode 100644
index 0000000..8c414f5
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/ecfa1ecd417d4253af81ae04d1bd6581
@@ -0,0 +1 @@
+PairedB
diff --git a/Tests/Module/ExternalData/MD5/f41c94425d01ecbbee70440b951cb058 b/Tests/Module/ExternalData/MD5/f41c94425d01ecbbee70440b951cb058
new file mode 100644
index 0000000..3503da4
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/f41c94425d01ecbbee70440b951cb058
@@ -0,0 +1 @@
+Series
diff --git a/Tests/Module/ExternalData/MD5/f7ab5a04aae9cb9a520e70b20b9c8ed7 b/Tests/Module/ExternalData/MD5/f7ab5a04aae9cb9a520e70b20b9c8ed7
new file mode 100644
index 0000000..29d727b
--- /dev/null
+++ b/Tests/Module/ExternalData/MD5/f7ab5a04aae9cb9a520e70b20b9c8ed7
@@ -0,0 +1 @@
+Series.2
diff --git a/Tests/Module/ExternalData/MetaA.dat.md5 b/Tests/Module/ExternalData/MetaA.dat.md5
new file mode 100644
index 0000000..4a78fc7
--- /dev/null
+++ b/Tests/Module/ExternalData/MetaA.dat.md5
@@ -0,0 +1 @@
+9d980b06c2f0fec3d4872d68175b9822
diff --git a/Tests/Module/ExternalData/MetaB.dat.md5 b/Tests/Module/ExternalData/MetaB.dat.md5
new file mode 100644
index 0000000..4557a21
--- /dev/null
+++ b/Tests/Module/ExternalData/MetaB.dat.md5
@@ -0,0 +1 @@
+8f4add4581551facf27237e6577fd662
diff --git a/Tests/Module/ExternalData/MetaC.dat.md5 b/Tests/Module/ExternalData/MetaC.dat.md5
new file mode 100644
index 0000000..a7f23dd
--- /dev/null
+++ b/Tests/Module/ExternalData/MetaC.dat.md5
@@ -0,0 +1 @@
+c1030719c95f3435d8abc39c0d442946
diff --git a/Tests/Module/ExternalData/MetaTop.dat.md5 b/Tests/Module/ExternalData/MetaTop.dat.md5
new file mode 100644
index 0000000..1906cbf
--- /dev/null
+++ b/Tests/Module/ExternalData/MetaTop.dat.md5
@@ -0,0 +1 @@
+08cfcf221f76ace7b906b312284e73d7
diff --git a/Tests/Module/ExternalData/PairedA.dat.md5 b/Tests/Module/ExternalData/PairedA.dat.md5
new file mode 100644
index 0000000..1ffe035
--- /dev/null
+++ b/Tests/Module/ExternalData/PairedA.dat.md5
@@ -0,0 +1 @@
+401767f22a456b3522953722090a2c36
diff --git a/Tests/Module/ExternalData/PairedB.dat.md5 b/Tests/Module/ExternalData/PairedB.dat.md5
new file mode 100644
index 0000000..89c942b
--- /dev/null
+++ b/Tests/Module/ExternalData/PairedB.dat.md5
@@ -0,0 +1 @@
+ecfa1ecd417d4253af81ae04d1bd6581
diff --git a/Tests/Module/ExternalData/SHA1/.gitattributes b/Tests/Module/ExternalData/SHA1/.gitattributes
new file mode 100644
index 0000000..3e51d39
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA1/.gitattributes
@@ -0,0 +1 @@
+* -crlf
diff --git a/Tests/Module/ExternalData/SHA1/2af59a7022024974f3b8521b7ed8137c996a79f1 b/Tests/Module/ExternalData/SHA1/2af59a7022024974f3b8521b7ed8137c996a79f1
new file mode 100644
index 0000000..a388540
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA1/2af59a7022024974f3b8521b7ed8137c996a79f1
@@ -0,0 +1 @@
+SeriesMixed.2
diff --git a/Tests/Module/ExternalData/SHA224/.gitattributes b/Tests/Module/ExternalData/SHA224/.gitattributes
new file mode 100644
index 0000000..3e51d39
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA224/.gitattributes
@@ -0,0 +1 @@
+* -crlf
diff --git a/Tests/Module/ExternalData/SHA224/3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a5869174 b/Tests/Module/ExternalData/SHA224/3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a5869174
new file mode 100644
index 0000000..e806d98
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA224/3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a5869174
@@ -0,0 +1 @@
+SeriesMixed.3
diff --git a/Tests/Module/ExternalData/SHA256/.gitattributes b/Tests/Module/ExternalData/SHA256/.gitattributes
new file mode 100644
index 0000000..3e51d39
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA256/.gitattributes
@@ -0,0 +1 @@
+* -crlf
diff --git a/Tests/Module/ExternalData/SHA256/969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f133 b/Tests/Module/ExternalData/SHA256/969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f133
new file mode 100644
index 0000000..e3d1e0c
--- /dev/null
+++ b/Tests/Module/ExternalData/SHA256/969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f133
@@ -0,0 +1 @@
+SeriesMixed.4
diff --git a/Tests/Module/ExternalData/SeriesA.dat.md5 b/Tests/Module/ExternalData/SeriesA.dat.md5
new file mode 100644
index 0000000..be2d687
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesA.dat.md5
@@ -0,0 +1 @@
+f41c94425d01ecbbee70440b951cb058
diff --git a/Tests/Module/ExternalData/SeriesA1.dat.md5 b/Tests/Module/ExternalData/SeriesA1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesA1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesA2.dat.md5 b/Tests/Module/ExternalData/SeriesA2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesA2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesA3.dat.md5 b/Tests/Module/ExternalData/SeriesA3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesA3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesAn1.dat.md5 b/Tests/Module/ExternalData/SeriesAn1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesAn1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesAn2.dat.md5 b/Tests/Module/ExternalData/SeriesAn2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesAn2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesAn3.dat.md5 b/Tests/Module/ExternalData/SeriesAn3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesAn3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesB.dat.md5 b/Tests/Module/ExternalData/SeriesB.dat.md5
new file mode 100644
index 0000000..be2d687
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesB.dat.md5
@@ -0,0 +1 @@
+f41c94425d01ecbbee70440b951cb058
diff --git a/Tests/Module/ExternalData/SeriesB_1.dat.md5 b/Tests/Module/ExternalData/SeriesB_1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesB_1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesB_2.dat.md5 b/Tests/Module/ExternalData/SeriesB_2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesB_2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesB_3.dat.md5 b/Tests/Module/ExternalData/SeriesB_3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesB_3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesBn_1.dat.md5 b/Tests/Module/ExternalData/SeriesBn_1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesBn_1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesBn_2.dat.md5 b/Tests/Module/ExternalData/SeriesBn_2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesBn_2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesBn_3.dat.md5 b/Tests/Module/ExternalData/SeriesBn_3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesBn_3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesC.1.dat.md5 b/Tests/Module/ExternalData/SeriesC.1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesC.1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesC.2.dat.md5 b/Tests/Module/ExternalData/SeriesC.2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesC.2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesC.3.dat.md5 b/Tests/Module/ExternalData/SeriesC.3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesC.3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesC.dat.md5 b/Tests/Module/ExternalData/SeriesC.dat.md5
new file mode 100644
index 0000000..be2d687
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesC.dat.md5
@@ -0,0 +1 @@
+f41c94425d01ecbbee70440b951cb058
diff --git a/Tests/Module/ExternalData/SeriesCn.1.dat.md5 b/Tests/Module/ExternalData/SeriesCn.1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesCn.1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesCn.2.dat.md5 b/Tests/Module/ExternalData/SeriesCn.2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesCn.2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesCn.3.dat.md5 b/Tests/Module/ExternalData/SeriesCn.3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesCn.3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesD-1.dat.md5 b/Tests/Module/ExternalData/SeriesD-1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesD-1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesD-2.dat.md5 b/Tests/Module/ExternalData/SeriesD-2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesD-2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesD-3.dat.md5 b/Tests/Module/ExternalData/SeriesD-3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesD-3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesD.dat.md5 b/Tests/Module/ExternalData/SeriesD.dat.md5
new file mode 100644
index 0000000..be2d687
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesD.dat.md5
@@ -0,0 +1 @@
+f41c94425d01ecbbee70440b951cb058
diff --git a/Tests/Module/ExternalData/SeriesDn-1.dat.md5 b/Tests/Module/ExternalData/SeriesDn-1.dat.md5
new file mode 100644
index 0000000..f22e266
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesDn-1.dat.md5
@@ -0,0 +1 @@
+31eff09e84fca01415f8cd9d82ec432b
diff --git a/Tests/Module/ExternalData/SeriesDn-2.dat.md5 b/Tests/Module/ExternalData/SeriesDn-2.dat.md5
new file mode 100644
index 0000000..2b917e7
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesDn-2.dat.md5
@@ -0,0 +1 @@
+f7ab5a04aae9cb9a520e70b20b9c8ed7
diff --git a/Tests/Module/ExternalData/SeriesDn-3.dat.md5 b/Tests/Module/ExternalData/SeriesDn-3.dat.md5
new file mode 100644
index 0000000..b9c9760
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesDn-3.dat.md5
@@ -0,0 +1 @@
+30ba0acdee9096b3b9fc6c69362c6b42
diff --git a/Tests/Module/ExternalData/SeriesMixed.1.dat.md5 b/Tests/Module/ExternalData/SeriesMixed.1.dat.md5
new file mode 100644
index 0000000..f962d8f
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesMixed.1.dat.md5
@@ -0,0 +1 @@
+ce38ea6c3c1e00fa6405dd64b8bf6da0
diff --git a/Tests/Module/ExternalData/SeriesMixed.2.dat.sha1 b/Tests/Module/ExternalData/SeriesMixed.2.dat.sha1
new file mode 100644
index 0000000..43a3540
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesMixed.2.dat.sha1
@@ -0,0 +1 @@
+2af59a7022024974f3b8521b7ed8137c996a79f1
diff --git a/Tests/Module/ExternalData/SeriesMixed.3.dat.sha224 b/Tests/Module/ExternalData/SeriesMixed.3.dat.sha224
new file mode 100644
index 0000000..a18e40e
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesMixed.3.dat.sha224
@@ -0,0 +1 @@
+3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a5869174
diff --git a/Tests/Module/ExternalData/SeriesMixed.4.dat.sha256 b/Tests/Module/ExternalData/SeriesMixed.4.dat.sha256
new file mode 100644
index 0000000..67fc3c2
--- /dev/null
+++ b/Tests/Module/ExternalData/SeriesMixed.4.dat.sha256
@@ -0,0 +1 @@
+969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f133
diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt
index 9bd7a64..d0c9c66 100644
--- a/Tests/Qt4Targets/CMakeLists.txt
+++ b/Tests/Qt4Targets/CMakeLists.txt
@@ -2,20 +2,20 @@ cmake_minimum_required(VERSION 2.8)
project(Qt4Targets)
+cmake_policy(SET CMP0020 NEW)
+
find_package(Qt4 REQUIRED)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
add_executable(Qt4Targets WIN32 main.cpp)
target_link_libraries(Qt4Targets Qt4::QtGui)
if (WIN32)
- target_link_libraries(Qt4Targets Qt4::qtmain)
+ if (TARGET Qt4::QAxServer)
+ add_executable(activeqtexe WIN32 activeqtexe.cpp)
+ set_property(TARGET activeqtexe PROPERTY QT4_NO_LINK_QTMAIN ON)
+ target_link_libraries(activeqtexe Qt4::QAxServer Qt4::QtGui)
+ endif()
endif()
-
-set_property(TARGET Qt4Targets APPEND PROPERTY
- INCLUDE_DIRECTORIES
- $<TARGET_PROPERTY:Qt4::QtGui,INTERFACE_INCLUDE_DIRECTORIES>
-)
-set_property(TARGET Qt4Targets APPEND PROPERTY
- COMPILE_DEFINITIONS
- $<TARGET_PROPERTY:Qt4::QtGui,INTERFACE_COMPILE_DEFINITIONS>
-)
diff --git a/Tests/Qt4Targets/activeqtexe.cpp b/Tests/Qt4Targets/activeqtexe.cpp
new file mode 100644
index 0000000..d4a9121
--- /dev/null
+++ b/Tests/Qt4Targets/activeqtexe.cpp
@@ -0,0 +1,36 @@
+
+#include <QApplication>
+
+#ifndef QT_QAXSERVER_LIB
+#error Expected QT_QAXSERVER_LIB
+#endif
+
+#include <QAxFactory>
+
+class MyObject : public QObject
+{
+ Q_OBJECT
+public:
+ MyObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+ }
+};
+
+QAXFACTORY_DEFAULT(MyObject,
+ "{4dc3f340-a6f7-44e4-a79b-3e9217685fbd}",
+ "{9ee49617-7d5c-441a-b833-4b068d41d751}",
+ "{13eca64b-ee2a-4f3c-aa04-5d9d975779a7}",
+ "{ce947ee3-0403-4fdc-895a-4fe779344b46}",
+ "{8de435ce-8d2a-46ac-b3b3-cb800d0547c7}");
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QAxFactory::isServer();
+
+ return app.exec();
+}
+
+#include "activeqtexe.moc"
diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index 5e3686d..855fcf0 100644
--- a/Tests/QtAutomoc/CMakeLists.txt
+++ b/Tests/QtAutomoc/CMakeLists.txt
@@ -13,11 +13,14 @@ add_definitions(-DFOO -DSomeDefine="Barx")
# enable relaxed mode so automoc can handle all the special cases:
set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
-# create an executable and a library target, both requiring automoc:
+# create an executable and two library targets, each requiring automoc:
add_library(codeeditorLib STATIC codeeditor.cpp)
-add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp xyz.cpp yaf.cpp private_slot.cpp)
+add_library(privateSlot OBJECT private_slot.cpp)
-set_target_properties(foo codeeditorLib PROPERTIES AUTOMOC TRUE)
+add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
+ xyz.cpp yaf.cpp $<TARGET_OBJECTS:privateSlot>)
+
+set_target_properties(foo codeeditorLib privateSlot PROPERTIES AUTOMOC TRUE)
target_link_libraries(foo codeeditorLib ${QT_LIBRARIES} )
diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW-result.txt b/Tests/RunCMake/CMP0004/CMP0004-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW-stderr.txt b/Tests/RunCMake/CMP0004/CMP0004-NEW-stderr.txt
new file mode 100644
index 0000000..a21cb6a
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-NEW-stderr.txt
@@ -0,0 +1,2 @@
+ Target "foo" links to item " bar " which has leading or trailing
+ whitespace. This is now an error according to policy CMP0004.
diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
new file mode 100644
index 0000000..7c61961
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
@@ -0,0 +1,9 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+cmake_policy(SET CMP0004 NEW)
+
+add_library(foo SHARED empty.cpp)
+add_library(bar SHARED empty.cpp)
+
+target_link_libraries(foo "$<1: bar >")
diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD-result.txt b/Tests/RunCMake/CMP0004/CMP0004-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD-stderr.txt b/Tests/RunCMake/CMP0004/CMP0004-OLD-stderr.txt
new file mode 100644
index 0000000..782e45c
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-OLD-stderr.txt
@@ -0,0 +1,2 @@
+ Target "bat" links to item " bar " which has leading or trailing
+ whitespace. This is now an error according to policy CMP0004.
diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
new file mode 100644
index 0000000..d6ed72c
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
@@ -0,0 +1,21 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+cmake_policy(SET CMP0004 OLD)
+
+add_library(foo SHARED empty.cpp)
+add_library(bar SHARED empty.cpp)
+add_library(bing SHARED empty.cpp)
+add_library(bung SHARED empty.cpp)
+
+cmake_policy(SET CMP0004 NEW)
+
+add_library(bat SHARED empty.cpp)
+
+target_link_libraries(foo "$<1: bar >")
+target_link_libraries(bing "$<$<NOT:$<TARGET_POLICY:CMP0004>>: bar >")
+target_link_libraries(bung "$<$<TARGET_POLICY:CMP0004>: bar >")
+
+# The line below causes the error because the policy is NEW when bat
+# is created.
+target_link_libraries(bat "$<1: bar >")
diff --git a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt b/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt
diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex-result.txt b/Tests/RunCMake/CMP0004/CMP0004-policy-genex-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex-stderr.txt b/Tests/RunCMake/CMP0004/CMP0004-policy-genex-stderr.txt
new file mode 100644
index 0000000..eed53e7
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex-stderr.txt
@@ -0,0 +1,2 @@
+ Target "foo" links to item " bat " which has leading or trailing
+ whitespace. This is now an error according to policy CMP0004.
diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
new file mode 100644
index 0000000..eab680a
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
@@ -0,0 +1,14 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+cmake_policy(SET CMP0004 NEW)
+
+add_library(foo SHARED empty.cpp)
+add_library(bar SHARED empty.cpp)
+add_library(bat SHARED empty.cpp)
+
+# The negation here avoids the error.
+target_link_libraries(foo "$<$<NOT:$<TARGET_POLICY:CMP0004>>: bar >")
+
+# The below line causes the error.
+target_link_libraries(foo "$<$<TARGET_POLICY:CMP0004>: bat >")
diff --git a/Tests/RunCMake/CMP0004/CMakeLists.txt b/Tests/RunCMake/CMP0004/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0004/RunCMakeTest.cmake b/Tests/RunCMake/CMP0004/RunCMakeTest.cmake
new file mode 100644
index 0000000..950d0ed
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0004-OLD)
+run_cmake(CMP0004-NEW)
+run_cmake(CMP0004-policy-genex)
diff --git a/Tests/RunCMake/CMP0004/empty.cpp b/Tests/RunCMake/CMP0004/empty.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CMP0004/empty.cpp
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 7abedb6..dd150a8 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -51,6 +51,7 @@ if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 3)
endif()
add_RunCMake_test(CMP0019)
+add_RunCMake_test(ExternalData)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorToolset)
add_RunCMake_test(TargetPropertyGeneratorExpressions)
@@ -59,12 +60,14 @@ add_RunCMake_test(ObjectLibrary)
if(NOT WIN32)
add_RunCMake_test(PositionIndependentCode)
endif()
+add_RunCMake_test(CompatibleInterface)
add_RunCMake_test(build_command)
add_RunCMake_test(find_package)
add_RunCMake_test(include)
add_RunCMake_test(include_directories)
add_RunCMake_test(list)
+add_RunCMake_test(CMP0004)
if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
add_RunCMake_test(include_external_msproject)
diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
new file mode 100644
index 0000000..68dd8d6
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} CXX)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-stderr.txt
new file mode 100644
index 0000000..1a925b6
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error in CMakeLists.txt:
+ Target "foo" has property "INCLUDE_DIRECTORIES" listed in its
+ COMPATIBLE_INTERFACE_BOOL property. This is not allowed. Only
+ user-defined properties may appear listed in the COMPATIBLE_INTERFACE_BOOL
+ property.
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop.cmake
new file mode 100644
index 0000000..5feb4d5
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop.cmake
@@ -0,0 +1,11 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL INCLUDE_DIRECTORIES)
+set_property(TARGET foo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ON)
+set_property(TARGET bar PROPERTY INTERFACE_INCLUDE_DIRECTORIES ON)
+
+add_executable(user main.cpp)
+set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES OFF)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-stderr.txt
new file mode 100644
index 0000000..0476da9
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error: Property SOMEPROP on target "user" does
+not match the INTERFACE_SOMEPROP property requirement
+of dependency "foo".
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self.cmake
new file mode 100644
index 0000000..90543e8
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self.cmake
@@ -0,0 +1,11 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP ON)
+set_property(TARGET bar PROPERTY INTERFACE_SOMEPROP ON)
+
+add_executable(user main.cpp)
+set_property(TARGET user PROPERTY SOMEPROP OFF)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-stderr.txt
new file mode 100644
index 0000000..d885c09
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error: The INTERFACE_SOMEPROP property of "bar" does
+not agree with the value of SOMEPROP already determined
+for "user".
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends.cmake
new file mode 100644
index 0000000..69be796
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends.cmake
@@ -0,0 +1,10 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP ON)
+set_property(TARGET bar PROPERTY INTERFACE_SOMEPROP OFF)
+
+add_executable(user main.cpp)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-stderr.txt
new file mode 100644
index 0000000..8556ee0
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error: Property SOMEPROP on target "user" is
+implied to be FALSE because it was used to determine the link libraries
+already. The INTERFACE_SOMEPROP property on
+dependency "foo" is in conflict.
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use.cmake
new file mode 100644
index 0000000..ccfad0a
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use.cmake
@@ -0,0 +1,9 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP ON)
+
+add_executable(user main.cpp)
+target_link_libraries(user foo $<$<STREQUAL:$<TARGET_PROPERTY:SOMEPROP>,prop>:bar>)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-stderr.txt
new file mode 100644
index 0000000..6a293b4
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error in CMakeLists.txt:
+ Target "foo" has property "INCLUDE_DIRECTORIES" listed in its
+ COMPATIBLE_INTERFACE_STRING property. This is not allowed. Only
+ user-defined properties may appear listed in the
+ COMPATIBLE_INTERFACE_STRING property.
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
new file mode 100644
index 0000000..5221a12
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
@@ -0,0 +1,11 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING INCLUDE_DIRECTORIES)
+set_property(TARGET foo PROPERTY INTERFACE_INCLUDE_DIRECTORIES foo_inc)
+set_property(TARGET bar PROPERTY INTERFACE_INCLUDE_DIRECTORIES bar_inc)
+
+add_executable(user main.cpp)
+set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES bar_inc)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-stderr.txt
new file mode 100644
index 0000000..0476da9
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error: Property SOMEPROP on target "user" does
+not match the INTERFACE_SOMEPROP property requirement
+of dependency "foo".
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self.cmake
new file mode 100644
index 0000000..187f29f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self.cmake
@@ -0,0 +1,11 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP prop)
+set_property(TARGET bar PROPERTY INTERFACE_SOMEPROP prop)
+
+add_executable(user main.cpp)
+set_property(TARGET user PROPERTY SOMEPROP different)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-stderr.txt
new file mode 100644
index 0000000..d885c09
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error: The INTERFACE_SOMEPROP property of "bar" does
+not agree with the value of SOMEPROP already determined
+for "user".
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends.cmake
new file mode 100644
index 0000000..73cc3fc
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends.cmake
@@ -0,0 +1,10 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP foo)
+set_property(TARGET bar PROPERTY INTERFACE_SOMEPROP bar)
+
+add_executable(user main.cpp)
+target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-stderr.txt
new file mode 100644
index 0000000..723daec
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error: Property SOMEPROP on target "user" is
+implied to be empty because it was used to determine the link libraries
+already. The INTERFACE_SOMEPROP property on
+dependency "foo" is in conflict.
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use.cmake
new file mode 100644
index 0000000..af3ce8f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use.cmake
@@ -0,0 +1,9 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP prop)
+
+add_executable(user main.cpp)
+target_link_libraries(user foo $<$<STREQUAL:$<TARGET_PROPERTY:SOMEPROP>,prop>:bar>)
diff --git a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
new file mode 100644
index 0000000..922ad7f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
@@ -0,0 +1,10 @@
+include(RunCMake)
+
+run_cmake(InterfaceBool-mismatch-depends)
+run_cmake(InterfaceBool-mismatch-depend-self)
+run_cmake(InterfaceBool-mismatched-use)
+run_cmake(InterfaceBool-builtin-prop)
+run_cmake(InterfaceString-mismatch-depends)
+run_cmake(InterfaceString-mismatch-depend-self)
+run_cmake(InterfaceString-mismatched-use)
+run_cmake(InterfaceString-builtin-prop)
diff --git a/Tests/RunCMake/CompatibleInterface/main.cpp b/Tests/RunCMake/CompatibleInterface/main.cpp
new file mode 100644
index 0000000..65eddcf
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int argc, char **argv)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1-result.txt b/Tests/RunCMake/ExternalData/BadHashAlgo1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadHashAlgo1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt
new file mode 100644
index 0000000..f68f0be
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Unknown hash algorithm specified by ExternalData_LINK_CONTENT:
+
+ BAD
+Call Stack \(most recent call first\):
+ .*
+ BadHashAlgo1.cmake:3 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1.cmake b/Tests/RunCMake/ExternalData/BadHashAlgo1.cmake
new file mode 100644
index 0000000..19e2e41
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadHashAlgo1.cmake
@@ -0,0 +1,3 @@
+include(ExternalData)
+set(ExternalData_LINK_CONTENT BAD)
+ExternalData_Expand_Arguments(Data args DATA{BadHashAlgo1.txt})
diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1.txt b/Tests/RunCMake/ExternalData/BadHashAlgo1.txt
new file mode 100644
index 0000000..bfa2818
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadHashAlgo1.txt
@@ -0,0 +1 @@
+Sample input file that should not be transformed.
diff --git a/Tests/RunCMake/ExternalData/BadOption1-result.txt b/Tests/RunCMake/ExternalData/BadOption1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadOption1-stderr.txt b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt
new file mode 100644
index 0000000..b63d098
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Unknown option "Bad/Option" in argument
+
+ DATA{Data.txt,Bad/Option}
+
+Call Stack \(most recent call first\):
+ .*
+ BadOption1.cmake:2 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadOption1.cmake b/Tests/RunCMake/ExternalData/BadOption1.cmake
new file mode 100644
index 0000000..1303d7f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption1.cmake
@@ -0,0 +1,5 @@
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Data.txt,Bad/Option}
+ )
diff --git a/Tests/RunCMake/ExternalData/BadOption2-result.txt b/Tests/RunCMake/ExternalData/BadOption2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadOption2-stderr.txt b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt
new file mode 100644
index 0000000..d114c8a
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Unknown option "Bad:Option" in argument
+
+ DATA{Data.txt,Bad:Option}
+
+Call Stack \(most recent call first\):
+ .*
+ BadOption2.cmake:2 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadOption2.cmake b/Tests/RunCMake/ExternalData/BadOption2.cmake
new file mode 100644
index 0000000..6269b06
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadOption2.cmake
@@ -0,0 +1,5 @@
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Data.txt,Bad:Option}
+ )
diff --git a/Tests/RunCMake/ExternalData/BadSeries1-result.txt b/Tests/RunCMake/ExternalData/BadSeries1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt
new file mode 100644
index 0000000..3099be5
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt
@@ -0,0 +1,19 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ ExternalData_SERIES_PARSE is set to
+
+ NotASeriesRegex
+
+ which is not of the form
+
+ \(<number>\)\(<suffix>\)\$
+
+ Fix the regular expression or set variables
+
+ ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any
+ ExternalData_SERIES_PARSE_NUMBER = <number> regex group number
+ ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number
+
+Call Stack \(most recent call first\):
+ .*
+ BadSeries1.cmake:3 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadSeries1.cmake b/Tests/RunCMake/ExternalData/BadSeries1.cmake
new file mode 100644
index 0000000..7d71210
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries1.cmake
@@ -0,0 +1,3 @@
+include(ExternalData)
+set(ExternalData_SERIES_PARSE NotASeriesRegex)
+ExternalData_Expand_Arguments(Data args DATA{Data.txt,:})
diff --git a/Tests/RunCMake/ExternalData/BadSeries2-result.txt b/Tests/RunCMake/ExternalData/BadSeries2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt
new file mode 100644
index 0000000..3a02c25
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt
@@ -0,0 +1,16 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data file referenced by argument
+
+ DATA{Data.txt,:}
+
+ corresponds to path
+
+ Data.txt
+
+ that does not match regular expression
+
+ \(x\)\(y\)\$
+Call Stack \(most recent call first\):
+ .*
+ BadSeries2.cmake:3 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadSeries2.cmake b/Tests/RunCMake/ExternalData/BadSeries2.cmake
new file mode 100644
index 0000000..e81993b
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries2.cmake
@@ -0,0 +1,3 @@
+include(ExternalData)
+set(ExternalData_SERIES_PARSE "(x)(y)$")
+ExternalData_Expand_Arguments(Data args DATA{Data.txt,:})
diff --git a/Tests/RunCMake/ExternalData/BadSeries3-result.txt b/Tests/RunCMake/ExternalData/BadSeries3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt
new file mode 100644
index 0000000..594cb6f6
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Series option ":" not allowed with associated files.
+Call Stack \(most recent call first\):
+ .*
+ BadSeries3.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadSeries3.cmake b/Tests/RunCMake/ExternalData/BadSeries3.cmake
new file mode 100644
index 0000000..b640df8
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadSeries3.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{PairA.txt,PairB.txt,:})
diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalData/Data.txt.md5 b/Tests/RunCMake/ExternalData/Data.txt.md5
new file mode 100644
index 0000000..93b3485
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Data.txt.md5
@@ -0,0 +1 @@
+e8bb14af900b998b5a3df7e21dd07d58
diff --git a/Tests/RunCMake/ExternalData/Directory1-result.txt b/Tests/RunCMake/ExternalData/Directory1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/Directory1-stderr.txt b/Tests/RunCMake/ExternalData/Directory1-stderr.txt
new file mode 100644
index 0000000..85c250f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory1-stderr.txt
@@ -0,0 +1,14 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data file referenced by argument
+
+ DATA{Directory1}
+
+ corresponds to source tree path
+
+ Directory1
+
+ that does not exist as a file \(with or without an extension\)!
+Call Stack \(most recent call first\):
+ .*
+ Directory1.cmake:3 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/Directory1.cmake b/Tests/RunCMake/ExternalData/Directory1.cmake
new file mode 100644
index 0000000..68f1b54
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory1.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Directory1}
+ )
diff --git a/Tests/RunCMake/ExternalData/Directory1/DirData1.txt b/Tests/RunCMake/ExternalData/Directory1/DirData1.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory1/DirData1.txt
diff --git a/Tests/RunCMake/ExternalData/Directory2-result.txt b/Tests/RunCMake/ExternalData/Directory2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/Directory2-stderr.txt b/Tests/RunCMake/ExternalData/Directory2-stderr.txt
new file mode 100644
index 0000000..92c9a2f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory2-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data directory referenced by argument
+
+ DATA{Directory2/}
+
+ must list associated files.
+Call Stack \(most recent call first\):
+ .*
+ Directory2.cmake:3 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/Directory2.cmake b/Tests/RunCMake/ExternalData/Directory2.cmake
new file mode 100644
index 0000000..30b992e
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory2.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Directory2/}
+ )
diff --git a/Tests/RunCMake/ExternalData/Directory2.md5 b/Tests/RunCMake/ExternalData/Directory2.md5
new file mode 100644
index 0000000..93b3485
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory2.md5
@@ -0,0 +1 @@
+e8bb14af900b998b5a3df7e21dd07d58
diff --git a/Tests/RunCMake/ExternalData/Directory2/DirData2.txt b/Tests/RunCMake/ExternalData/Directory2/DirData2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory2/DirData2.txt
diff --git a/Tests/RunCMake/ExternalData/Directory3-result.txt b/Tests/RunCMake/ExternalData/Directory3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/Directory3-stderr.txt b/Tests/RunCMake/ExternalData/Directory3-stderr.txt
new file mode 100644
index 0000000..56a341e
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory3-stderr.txt
@@ -0,0 +1,14 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data file referenced by argument
+
+ DATA{Directory3/\*}
+
+ corresponds to source tree path
+
+ Directory3/.
+
+ that does not exist as a file \(with or without an extension\)!
+Call Stack \(most recent call first\):
+ .*
+ Directory3.cmake:3 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/Directory3.cmake b/Tests/RunCMake/ExternalData/Directory3.cmake
new file mode 100644
index 0000000..55d8be9
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory3.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Directory3/*}
+ )
diff --git a/Tests/RunCMake/ExternalData/Directory3/DirData3.txt b/Tests/RunCMake/ExternalData/Directory3/DirData3.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory3/DirData3.txt
diff --git a/Tests/RunCMake/ExternalData/Directory4-result.txt b/Tests/RunCMake/ExternalData/Directory4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/Directory4-stderr.txt b/Tests/RunCMake/ExternalData/Directory4-stderr.txt
new file mode 100644
index 0000000..dcb8522
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory4-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Series option ":" not allowed with directories.
+Call Stack \(most recent call first\):
+ .*
+ Directory4.cmake:3 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/Directory4.cmake b/Tests/RunCMake/ExternalData/Directory4.cmake
new file mode 100644
index 0000000..7d3d638
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory4.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Directory4/,:}
+ )
diff --git a/Tests/RunCMake/ExternalData/Directory4/DirData4.txt b/Tests/RunCMake/ExternalData/Directory4/DirData4.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory4/DirData4.txt
diff --git a/Tests/RunCMake/ExternalData/Directory5-result.txt b/Tests/RunCMake/ExternalData/Directory5-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory5-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/Directory5-stderr.txt b/Tests/RunCMake/ExternalData/Directory5-stderr.txt
new file mode 100644
index 0000000..8e54aec
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory5-stderr.txt
@@ -0,0 +1,14 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data directory referenced by argument
+
+ DATA{Directory5/}
+
+ corresponds to source tree path
+
+ Directory5
+
+ that does not exist as a directory!
+Call Stack \(most recent call first\):
+ .*
+ Directory5.cmake:3 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/Directory5.cmake b/Tests/RunCMake/ExternalData/Directory5.cmake
new file mode 100644
index 0000000..931589e
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/Directory5.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{Directory5/}
+ )
diff --git a/Tests/RunCMake/ExternalData/LinkContentMD5-stdout.txt b/Tests/RunCMake/ExternalData/LinkContentMD5-stdout.txt
new file mode 100644
index 0000000..f77fca9
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/LinkContentMD5-stdout.txt
@@ -0,0 +1,3 @@
+-- Linked ToLink.txt.md5 to ExternalData MD5/c18ff9804c8deec9eaeb17063cda8b7b
+-- Raw data correctly transformed to content link!
+-- Staged content exists!
diff --git a/Tests/RunCMake/ExternalData/LinkContentMD5.cmake b/Tests/RunCMake/ExternalData/LinkContentMD5.cmake
new file mode 100644
index 0000000..41b4dee
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/LinkContentMD5.cmake
@@ -0,0 +1,22 @@
+include(ExternalData)
+set(ExternalData_LINK_CONTENT MD5)
+set(ExternalData_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR}/ExternalData)
+set(input ${CMAKE_CURRENT_BINARY_DIR}/ToLink.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/ExternalData/ToLink.txt)
+set(staged "${CMAKE_CURRENT_BINARY_DIR}/.ExternalData_MD5_c18ff9804c8deec9eaeb17063cda8b7b")
+file(REMOVE ${staged})
+file(REMOVE ${input}.md5)
+file(WRITE ${input} "To be transformed into a content link.")
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Raw data correctly transformed to content link!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
+if(EXISTS "${staged}")
+ message(STATUS "Staged content exists!")
+else()
+ message(FATAL_ERROR "Staged content missing!")
+endif()
diff --git a/Tests/RunCMake/ExternalData/LinkContentSHA1-stdout.txt b/Tests/RunCMake/ExternalData/LinkContentSHA1-stdout.txt
new file mode 100644
index 0000000..9a8eb2e
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/LinkContentSHA1-stdout.txt
@@ -0,0 +1,3 @@
+-- Linked ToLink.txt.sha1 to ExternalData SHA1/114ee5dda251457fd2df63bec91d3b8db43aba58
+-- Raw data correctly transformed to content link!
+-- Staged content exists!
diff --git a/Tests/RunCMake/ExternalData/LinkContentSHA1.cmake b/Tests/RunCMake/ExternalData/LinkContentSHA1.cmake
new file mode 100644
index 0000000..f78501c
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/LinkContentSHA1.cmake
@@ -0,0 +1,22 @@
+include(ExternalData)
+set(ExternalData_LINK_CONTENT SHA1)
+set(ExternalData_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR}/ExternalData)
+set(input ${CMAKE_CURRENT_BINARY_DIR}/ToLink.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/ExternalData/ToLink.txt)
+set(staged "${CMAKE_CURRENT_BINARY_DIR}/.ExternalData_SHA1_114ee5dda251457fd2df63bec91d3b8db43aba58")
+file(REMOVE ${staged})
+file(REMOVE ${input}.sha1)
+file(WRITE ${input} "To be transformed into a content link.")
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Raw data correctly transformed to content link!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
+if(EXISTS "${staged}")
+ message(STATUS "Staged content exists!")
+else()
+ message(FATAL_ERROR "Staged content missing!")
+endif()
diff --git a/Tests/RunCMake/ExternalData/MissingData-result.txt b/Tests/RunCMake/ExternalData/MissingData-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/MissingData-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/MissingData-stderr.txt b/Tests/RunCMake/ExternalData/MissingData-stderr.txt
new file mode 100644
index 0000000..e794f95
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/MissingData-stderr.txt
@@ -0,0 +1,14 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data file referenced by argument
+
+ DATA{MissingData.txt}
+
+ corresponds to source tree path
+
+ MissingData.txt
+
+ that does not exist as a file \(with or without an extension\)!
+Call Stack \(most recent call first\):
+ .*
+ MissingData.cmake:2 \(ExternalData_Add_Test\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/MissingData.cmake b/Tests/RunCMake/ExternalData/MissingData.cmake
new file mode 100644
index 0000000..b3c8a5c
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/MissingData.cmake
@@ -0,0 +1,5 @@
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{MissingData.txt}
+ )
diff --git a/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt
new file mode 100644
index 0000000..496ad8a
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt
@@ -0,0 +1,6 @@
+CMake Warning at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ ExternalData_LINK_CONTENT cannot be used in-source
+Call Stack \(most recent call first\):
+ .*
+ NoLinkInSource.cmake:8 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/NoLinkInSource-stdout.txt b/Tests/RunCMake/ExternalData/NoLinkInSource-stdout.txt
new file mode 100644
index 0000000..18946f0
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoLinkInSource-stdout.txt
@@ -0,0 +1 @@
+-- Data reference correctly not transformed!
diff --git a/Tests/RunCMake/ExternalData/NoLinkInSource.cmake b/Tests/RunCMake/ExternalData/NoLinkInSource.cmake
new file mode 100644
index 0000000..cbf45eb
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoLinkInSource.cmake
@@ -0,0 +1,14 @@
+include(ExternalData)
+set(ExternalData_LINK_CONTENT MD5)
+set(ExternalData_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+set(input ${CMAKE_CURRENT_BINARY_DIR}/ToLink.txt)
+file(REMOVE ${input}.md5)
+file(WRITE ${input} "To be transformed into a content link.")
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${input}")
+ message(STATUS "Data reference correctly not transformed!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected no transformation.")
+endif()
diff --git a/Tests/RunCMake/ExternalData/NoURLTemplates-result.txt b/Tests/RunCMake/ExternalData/NoURLTemplates-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoURLTemplates-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt
new file mode 100644
index 0000000..ad059d4
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ ExternalData_URL_TEMPLATES is not set!
+Call Stack \(most recent call first\):
+ NoURLTemplates.cmake:2 \(ExternalData_Add_Target\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/NoURLTemplates.cmake b/Tests/RunCMake/ExternalData/NoURLTemplates.cmake
new file mode 100644
index 0000000..8f0e069
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NoURLTemplates.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Add_Target(Data)
diff --git a/Tests/RunCMake/ExternalData/NormalData1-stdout.txt b/Tests/RunCMake/ExternalData/NormalData1-stdout.txt
new file mode 100644
index 0000000..2f2c770
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData1-stdout.txt
@@ -0,0 +1 @@
+-- Data reference correctly transformed!
diff --git a/Tests/RunCMake/ExternalData/NormalData1.cmake b/Tests/RunCMake/ExternalData/NormalData1.cmake
new file mode 100644
index 0000000..d6cc384
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData1.cmake
@@ -0,0 +1,13 @@
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(input Data.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
diff --git a/Tests/RunCMake/ExternalData/NormalData2-stdout.txt b/Tests/RunCMake/ExternalData/NormalData2-stdout.txt
new file mode 100644
index 0000000..2f2c770
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData2-stdout.txt
@@ -0,0 +1 @@
+-- Data reference correctly transformed!
diff --git a/Tests/RunCMake/ExternalData/NormalData2.cmake b/Tests/RunCMake/ExternalData/NormalData2.cmake
new file mode 100644
index 0000000..c979b48
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData2.cmake
@@ -0,0 +1,14 @@
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR}/ExternalData)
+set(input Data.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/ExternalData/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
diff --git a/Tests/RunCMake/ExternalData/NormalData3-stdout.txt b/Tests/RunCMake/ExternalData/NormalData3-stdout.txt
new file mode 100644
index 0000000..2f2c770
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData3-stdout.txt
@@ -0,0 +1 @@
+-- Data reference correctly transformed!
diff --git a/Tests/RunCMake/ExternalData/NormalData3.cmake b/Tests/RunCMake/ExternalData/NormalData3.cmake
new file mode 100644
index 0000000..e991122
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalData3.cmake
@@ -0,0 +1,14 @@
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR}/ExternalData)
+set(input ${CMAKE_CURRENT_SOURCE_DIR}/Data.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/ExternalData/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
diff --git a/Tests/RunCMake/ExternalData/NormalDataSub1-stdout.txt b/Tests/RunCMake/ExternalData/NormalDataSub1-stdout.txt
new file mode 100644
index 0000000..2f2c770
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalDataSub1-stdout.txt
@@ -0,0 +1 @@
+-- Data reference correctly transformed!
diff --git a/Tests/RunCMake/ExternalData/NormalDataSub1.cmake b/Tests/RunCMake/ExternalData/NormalDataSub1.cmake
new file mode 100644
index 0000000..015e94c
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NormalDataSub1.cmake
@@ -0,0 +1,13 @@
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+set(input SubDirectory1/Data.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/SubDirectory1/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
diff --git a/Tests/RunCMake/ExternalData/NotUnderRoot-result.txt b/Tests/RunCMake/ExternalData/NotUnderRoot-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NotUnderRoot-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/NotUnderRoot-stderr.txt b/Tests/RunCMake/ExternalData/NotUnderRoot-stderr.txt
new file mode 100644
index 0000000..1f2eb1c
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NotUnderRoot-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Data file referenced by argument
+
+ DATA{../NotUnderRoot.txt}
+
+ does not lie under the top-level source directory
+
+ .*/Tests/RunCMake/ExternalData
+
+Call Stack \(most recent call first\):
+ .*
+ NotUnderRoot.cmake:2 \(ExternalData_Add_Test\)
diff --git a/Tests/RunCMake/ExternalData/NotUnderRoot.cmake b/Tests/RunCMake/ExternalData/NotUnderRoot.cmake
new file mode 100644
index 0000000..c7942d6
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/NotUnderRoot.cmake
@@ -0,0 +1,5 @@
+include(ExternalData)
+ExternalData_Add_Test(Data
+ NAME Test
+ COMMAND ${CMAKE_COMMAND} -E echo DATA{../NotUnderRoot.txt}
+ )
diff --git a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
new file mode 100644
index 0000000..5ee46c9
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
@@ -0,0 +1,24 @@
+include(RunCMake)
+
+run_cmake(BadHashAlgo1)
+run_cmake(BadOption1)
+run_cmake(BadOption2)
+run_cmake(BadSeries1)
+run_cmake(BadSeries2)
+run_cmake(BadSeries3)
+run_cmake(Directory1)
+run_cmake(Directory2)
+run_cmake(Directory3)
+run_cmake(Directory4)
+run_cmake(Directory5)
+run_cmake(LinkContentMD5)
+run_cmake(LinkContentSHA1)
+run_cmake(MissingData)
+run_cmake(NoLinkInSource)
+run_cmake(NoURLTemplates)
+run_cmake(NormalData1)
+run_cmake(NormalData2)
+run_cmake(NormalData3)
+run_cmake(NormalDataSub1)
+run_cmake(NotUnderRoot)
+run_cmake(SubDirectory1)
diff --git a/Tests/RunCMake/ExternalData/SubDirectory1-stdout.txt b/Tests/RunCMake/ExternalData/SubDirectory1-stdout.txt
new file mode 100644
index 0000000..03924cb
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/SubDirectory1-stdout.txt
@@ -0,0 +1,3 @@
+-- Data reference correctly transformed in parent dir 1!
+-- Data reference correctly transformed in parent dir 2!
+-- Data reference correctly transformed in current dir!
diff --git a/Tests/RunCMake/ExternalData/SubDirectory1.cmake b/Tests/RunCMake/ExternalData/SubDirectory1.cmake
new file mode 100644
index 0000000..2989471
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/SubDirectory1.cmake
@@ -0,0 +1,5 @@
+include(ExternalData)
+set(ExternalData_URL_TEMPLATES
+ "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ )
+add_subdirectory(SubDirectory1)
diff --git a/Tests/RunCMake/ExternalData/SubDirectory1/CMakeLists.txt b/Tests/RunCMake/ExternalData/SubDirectory1/CMakeLists.txt
new file mode 100644
index 0000000..881ff5c
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/SubDirectory1/CMakeLists.txt
@@ -0,0 +1,29 @@
+set(input ../Data.txt)
+set(output ${CMAKE_BINARY_DIR}/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed in parent dir 1!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
+
+set(input ${CMAKE_CURRENT_SOURCE_DIR}/../Data.txt)
+set(output ${CMAKE_BINARY_DIR}/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed in parent dir 2!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
+
+set(input Data.txt)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/Data.txt)
+ExternalData_Expand_Arguments(Data args DATA{${input}})
+if("x${args}" STREQUAL "x${output}")
+ message(STATUS "Data reference correctly transformed in current dir!")
+else()
+ message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
+ "but we expected:\n ${output}")
+endif()
diff --git a/Tests/RunCMake/ExternalData/SubDirectory1/Data.txt.md5 b/Tests/RunCMake/ExternalData/SubDirectory1/Data.txt.md5
new file mode 100644
index 0000000..93b3485
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/SubDirectory1/Data.txt.md5
@@ -0,0 +1 @@
+e8bb14af900b998b5a3df7e21dd07d58
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt
new file mode 100644
index 0000000..271eb6e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at BadInstallPrefix.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<INSTALL_PREFIX>
+
+ INSTALL_PREFIX is a marker for install\(EXPORT\) only. It should never be
+ evaluated.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake
new file mode 100644
index 0000000..fcfc3eb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake
@@ -0,0 +1,3 @@
+add_custom_target(check ALL COMMAND check
+ $<INSTALL_PREFIX>/include
+ VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 8a69675..62bf29b 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -7,3 +7,4 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
+run_cmake(BadInstallPrefix)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt
new file mode 100644
index 0000000..4cd9cdd
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<LINKED:something>
+
+ \$<LINKED:...> may only be used in INCLUDE_DIRECTORIES and
+ COMPILE_DEFINITIONS properties.$
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake
new file mode 100644
index 0000000..542ea76
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake
@@ -0,0 +1,7 @@
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "int main(int, char **) { return 0; }\n")
+
+add_executable(TargetPropertyGeneratorExpressions
+ "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(TargetPropertyGeneratorExpressions "$<LINKED:something>")
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
index 0ee3238..ea48f61 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
@@ -15,3 +15,4 @@ run_cmake(BadInvalidName5)
run_cmake(BadInvalidName6)
run_cmake(BadInvalidName7)
run_cmake(BadInvalidName8)
+run_cmake(BadLinked)
diff --git a/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt b/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
index 948def1..736fe69 100644
--- a/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
+++ b/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
@@ -1,37 +1,30 @@
-CMake Warning at DebugIncludes.cmake:8 \(include_directories\):
- Used includes:
+CMake Debug Log at DebugIncludes.cmake:8 \(include_directories\):
+ Used includes for target lll:
\* .*/Tests/RunCMake/include_directories/one
-
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Warning at DebugIncludes.cmake:8 \(include_directories\):
- Used includes:
-
\* .*/Tests/RunCMake/include_directories/two
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Warning at DebugIncludes.cmake:13 \(set_property\):
- Used includes:
+CMake Debug Log at DebugIncludes.cmake:13 \(set_property\):
+ Used includes for target lll:
\* .*/Tests/RunCMake/include_directories/three
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Warning at DebugIncludes.cmake:18 \(include_directories\):
- Used includes:
+CMake Debug Log at DebugIncludes.cmake:18 \(include_directories\):
+ Used includes for target lll:
\* .*/Tests/RunCMake/include_directories/four
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Warning at DebugIncludes.cmake:25 \(set_property\):
- Used includes:
+CMake Debug Log at DebugIncludes.cmake:25 \(set_property\):
+ Used includes for target lll:
\* .*/Tests/RunCMake/include_directories/five
\* .*/Tests/RunCMake/include_directories/six
diff --git a/Tests/VSExternalInclude/Lib1/CMakeLists.txt b/Tests/VSExternalInclude/Lib1/CMakeLists.txt
index 1cb01c5..9dfac86 100644
--- a/Tests/VSExternalInclude/Lib1/CMakeLists.txt
+++ b/Tests/VSExternalInclude/Lib1/CMakeLists.txt
@@ -1,3 +1,4 @@
+set(CMAKE_SUPPRESS_REGENERATION 1)
project(LIB1)
set(SOURCES lib1.cpp)
diff --git a/Tests/VSExternalInclude/Lib2/CMakeLists.txt b/Tests/VSExternalInclude/Lib2/CMakeLists.txt
index f726c3f..f451354 100644
--- a/Tests/VSExternalInclude/Lib2/CMakeLists.txt
+++ b/Tests/VSExternalInclude/Lib2/CMakeLists.txt
@@ -1,3 +1,4 @@
+set(CMAKE_SUPPRESS_REGENERATION 1)
project(VSEXTERNAL_LIB2)
include_directories(${VSEXTERNAL_LIB2_SOURCE_DIR}/../Lib1)