summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt15
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.c23
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp18
-rw-r--r--Tests/CMakeCommands/target_compile_options/CMakeLists.txt15
-rw-r--r--Tests/CMakeCommands/target_compile_options/consumer.c23
-rw-r--r--Tests/CMakeCommands/target_compile_options/consumer.cpp18
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt14
-rw-r--r--Tests/CMakeCommands/target_include_directories/c_only/c_only.h2
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.c10
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp9
-rw-r--r--Tests/CMakeCommands/target_include_directories/cxx_only/cxx_only.h2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt12
-rw-r--r--Tests/CMakeLists.txt82
-rw-r--r--Tests/CMakeTests/CMakeLists.txt1
-rw-r--r--Tests/CMakeTests/ConfigureFile-DirOutput.cmake5
-rw-r--r--Tests/CMakeTests/ConfigureFile-Relative.cmake4
-rw-r--r--Tests/CMakeTests/ConfigureFileTest.cmake.in28
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt41
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in12
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake144
-rw-r--r--Tests/CPackComponentsForAll/symlink_postinstall_expected.txt57
-rw-r--r--Tests/CPackComponentsPrefix/CMakeLists.txt13
-rw-r--r--Tests/CPackComponentsPrefix/file-development.txt1
-rw-r--r--Tests/CPackComponentsPrefix/file-runtime.txt1
-rw-r--r--Tests/CTestTestVerboseOutput/CMakeLists.txt11
-rw-r--r--Tests/CTestTestVerboseOutput/CTestConfig.cmake7
-rw-r--r--Tests/CTestTestVerboseOutput/nop.c4
-rw-r--r--Tests/CTestTestVerboseOutput/test.cmake.in20
-rw-r--r--Tests/CustomCommandByproducts/CMakeLists.txt21
-rw-r--r--Tests/FindMatlab/basic_checks/CMakeLists.txt57
-rw-r--r--Tests/FindMatlab/cmake_matlab_unit_tests1.m33
-rw-r--r--Tests/FindMatlab/cmake_matlab_unit_tests2.m6
-rw-r--r--Tests/FindMatlab/cmake_matlab_unit_tests3.m5
-rw-r--r--Tests/FindMatlab/cmake_matlab_unit_tests_timeout.m16
-rw-r--r--Tests/FindMatlab/help_text1.m.txt2
-rw-r--r--Tests/FindMatlab/matlab_wrapper1.cpp26
-rw-r--r--Tests/FindMatlab/versions_checks/CMakeLists.txt52
-rw-r--r--Tests/InterfaceLibrary/headerdir/CMakeLists.txt11
-rw-r--r--Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in1
-rw-r--r--Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in (renamed from Tests/JacocoCoverage/Coverage/target/site/jacoco.xml)0
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt1
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake6
-rw-r--r--Tests/Module/ExternalData/DirRecurse/A.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/B.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/C.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub1/A.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub1/B.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub1/C.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub2/Dir/A.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub2/Dir/B.dat.md51
-rw-r--r--Tests/Module/ExternalData/DirRecurse/Sub2/Dir/C.dat.md51
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-NEW-result.txt (renamed from Tests/RunCMake/interface_library/add_dependencies-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-NEW.cmake13
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-OLD.cmake13
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-WARN.cmake11
-rw-r--r--Tests/RunCMake/CMP0057/CMP0057-once_is_ok.cmake8
-rw-r--r--Tests/RunCMake/CMP0057/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0057/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CMP0057/input.txt0
-rw-r--r--Tests/RunCMake/CMakeLists.txt11
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-result.txt1
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt8
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-Xcode.txt9
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions.cmake5
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-result.txt1
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt8
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions.cmake5
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-result.txt1
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt8
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-Xcode.txt9
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories.cmake5
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake20
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/main.cpp5
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex-result.txt1
-rw-r--r--Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake12
-rw-r--r--Tests/RunCMake/File_Generate/OutputConflict-stderr.txt2
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/File_Generate/empty.c8
-rw-r--r--Tests/RunCMake/FindMatlab/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/FindMatlab/MatlabTest1-result.txt1
-rw-r--r--Tests/RunCMake/FindMatlab/MatlabTest1-stderr.txt2
-rw-r--r--Tests/RunCMake/FindMatlab/MatlabTest1.cmake22
-rw-r--r--Tests/RunCMake/FindMatlab/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/FindMatlab/cmake_matlab_unit_tests2.m6
-rw-r--r--Tests/RunCMake/FindMatlab/matlab_wrapper1.cpp26
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake8
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-NEW-by-build-stdout.txt4
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-NEW-by.cmake3
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-NEW-no-build-result.txt1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-NEW-no-build-stderr.txt1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-NEW-no.cmake2
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by-build-stdout.txt4
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake3
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no-build-stdout.txt4
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake2
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by-build-stdout.txt4
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake2
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no-build-stdout.txt4
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt19
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-common.cmake17
-rw-r--r--Tests/RunCMake/Ninja/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake18
-rw-r--r--Tests/RunCMake/configure_file/BadArg-result.txt1
-rw-r--r--Tests/RunCMake/configure_file/BadArg-stderr.txt4
-rw-r--r--Tests/RunCMake/configure_file/BadArg.cmake (renamed from Tests/CMakeTests/ConfigureFile-BadArg.cmake)0
-rw-r--r--Tests/RunCMake/configure_file/DirInput-result.txt1
-rw-r--r--Tests/RunCMake/configure_file/DirInput-stderr.txt8
-rw-r--r--Tests/RunCMake/configure_file/DirInput.cmake (renamed from Tests/CMakeTests/ConfigureFile-DirInput.cmake)0
-rw-r--r--Tests/RunCMake/configure_file/DirOutput-stderr.txt1
-rw-r--r--Tests/RunCMake/configure_file/DirOutput.cmake4
-rw-r--r--Tests/RunCMake/configure_file/DirOutput.txt1
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-result.txt1
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-stderr.txt4
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-COPYONLY.cmake (renamed from Tests/CMakeTests/ConfigureFile-NewLineStyle-COPYONLY.cmake)2
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-NoArg-result.txt1
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-NoArg-stderr.txt5
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-NoArg.cmake (renamed from Tests/CMakeTests/ConfigureFile-NewLineStyle-NoArg.cmake)2
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-ValidArg.cmake (renamed from Tests/CMakeTests/ConfigureFile-NewLineStyle-ValidArg.cmake)2
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-WrongArg-result.txt1
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-WrongArg-stderr.txt5
-rw-r--r--Tests/RunCMake/configure_file/NewLineStyle-WrongArg.cmake (renamed from Tests/CMakeTests/ConfigureFile-NewLineStyle-WrongArg.cmake)2
-rw-r--r--Tests/RunCMake/configure_file/Relative-In.txt1
-rw-r--r--Tests/RunCMake/configure_file/Relative-stderr.txt1
-rw-r--r--Tests/RunCMake/configure_file/Relative.cmake3
-rw-r--r--Tests/RunCMake/configure_file/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-stderr.txt1
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg.cmake1
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-result.txt1
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-stderr.txt1
-rw-r--r--Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean.cmake1
-rw-r--r--Tests/RunCMake/file/GLOB-stderr.txt6
-rw-r--r--Tests/RunCMake/file/GLOB.cmake28
-rw-r--r--Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion-stderr.txt15
-rw-r--r--Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion.cmake23
-rw-r--r--Tests/RunCMake/file/GLOB_RECURSE-stderr.txt6
-rw-r--r--Tests/RunCMake/file/GLOB_RECURSE.cmake28
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/interface_library/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/interface_library/add_dependencies-stderr.txt6
-rw-r--r--Tests/RunCMake/interface_library/add_dependencies.cmake4
-rw-r--r--Tests/XCTest/CMakeLists.txt57
-rw-r--r--Tests/XCTest/CocoaExample/AppDelegate.h6
-rw-r--r--Tests/XCTest/CocoaExample/AppDelegate.m18
-rw-r--r--Tests/XCTest/CocoaExample/Info.plist30
-rw-r--r--Tests/XCTest/CocoaExample/MainMenu.xib680
-rw-r--r--Tests/XCTest/CocoaExample/main.m5
-rw-r--r--Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m13
-rw-r--r--Tests/XCTest/FrameworkExample/FrameworkExample.c6
-rw-r--r--Tests/XCTest/FrameworkExample/FrameworkExample.h1
-rw-r--r--Tests/XCTest/FrameworkExample/Info.plist28
-rw-r--r--Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m16
-rw-r--r--Tests/XCTest/FrameworkExampleTests/Info.plist24
191 files changed, 2350 insertions, 84 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 14d40aa..f96283d 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -26,6 +26,21 @@ target_compile_definitions(consumer
PRIVATE
)
+if (CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
+ target_sources(consumer PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/consumer.c"
+ )
+ target_compile_definitions(consumer
+ PRIVATE
+ CONSUMER_LANG_$<COMPILE_LANGUAGE>
+ LANG_IS_CXX=$<COMPILE_LANGUAGE:CXX>
+ LANG_IS_C=$<COMPILE_LANGUAGE:C>
+ )
+ target_compile_definitions(consumer
+ PRIVATE -DTEST_LANG_DEFINES
+ )
+endif()
+
add_definitions(-DSOME_DEF)
add_library(imp UNKNOWN IMPORTED)
get_target_property(_res imp COMPILE_DEFINITIONS)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.c b/Tests/CMakeCommands/target_compile_definitions/consumer.c
new file mode 100644
index 0000000..5796d96
--- /dev/null
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.c
@@ -0,0 +1,23 @@
+
+#ifdef TEST_LANG_DEFINES
+ #ifdef CONSUMER_LANG_CXX
+ #error Unexpected CONSUMER_LANG_CXX
+ #endif
+
+ #ifndef CONSUMER_LANG_C
+ #error Expected CONSUMER_LANG_C
+ #endif
+
+ #if !LANG_IS_C
+ #error Expected LANG_IS_C
+ #endif
+
+ #if LANG_IS_CXX
+ #error Unexpected LANG_IS_CXX
+ #endif
+#endif
+
+void consumer_c()
+{
+
+}
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index a391114..778f57e 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -15,4 +15,22 @@
#error Expected DASH_D_DEFINE
#endif
+#ifdef TEST_LANG_DEFINES
+ #ifndef CONSUMER_LANG_CXX
+ #error Expected CONSUMER_LANG_CXX
+ #endif
+
+ #ifdef CONSUMER_LANG_C
+ #error Unexpected CONSUMER_LANG_C
+ #endif
+
+ #if !LANG_IS_CXX
+ #error Expected LANG_IS_CXX
+ #endif
+
+ #if LANG_IS_C
+ #error Unexpected LANG_IS_C
+ #endif
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 1d04639..35dd276 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -23,6 +23,21 @@ add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
+if (NOT CMAKE_GENERATOR MATCHES "Visual Studio")
+ target_sources(consumer PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/consumer.c"
+ )
+ target_compile_options(consumer
+ PRIVATE
+ -DCONSUMER_LANG_$<COMPILE_LANGUAGE>
+ -DLANG_IS_CXX=$<COMPILE_LANGUAGE:CXX>
+ -DLANG_IS_C=$<COMPILE_LANGUAGE:C>
+ )
+ target_compile_definitions(consumer
+ PRIVATE -DTEST_LANG_DEFINES
+ )
+endif()
+
target_compile_options(consumer
PRIVATE $<$<CXX_COMPILER_ID:GNU>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
)
diff --git a/Tests/CMakeCommands/target_compile_options/consumer.c b/Tests/CMakeCommands/target_compile_options/consumer.c
new file mode 100644
index 0000000..5796d96
--- /dev/null
+++ b/Tests/CMakeCommands/target_compile_options/consumer.c
@@ -0,0 +1,23 @@
+
+#ifdef TEST_LANG_DEFINES
+ #ifdef CONSUMER_LANG_CXX
+ #error Unexpected CONSUMER_LANG_CXX
+ #endif
+
+ #ifndef CONSUMER_LANG_C
+ #error Expected CONSUMER_LANG_C
+ #endif
+
+ #if !LANG_IS_C
+ #error Expected LANG_IS_C
+ #endif
+
+ #if LANG_IS_CXX
+ #error Unexpected LANG_IS_CXX
+ #endif
+#endif
+
+void consumer_c()
+{
+
+}
diff --git a/Tests/CMakeCommands/target_compile_options/consumer.cpp b/Tests/CMakeCommands/target_compile_options/consumer.cpp
index 1299606..c5882a5 100644
--- a/Tests/CMakeCommands/target_compile_options/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_options/consumer.cpp
@@ -15,4 +15,22 @@
#endif
+#ifdef TEST_LANG_DEFINES
+ #ifndef CONSUMER_LANG_CXX
+ #error Expected CONSUMER_LANG_CXX
+ #endif
+
+ #ifdef CONSUMER_LANG_C
+ #error Unexpected CONSUMER_LANG_C
+ #endif
+
+ #if !LANG_IS_CXX
+ #error Expected LANG_IS_CXX
+ #endif
+
+ #if LANG_IS_C
+ #error Unexpected LANG_IS_C
+ #endif
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 661bbaa..d57556a 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -42,6 +42,20 @@ add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
+if (CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
+ target_sources(consumer PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/consumer.c"
+ )
+ target_include_directories(consumer
+ PRIVATE
+ $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_only>
+ $<$<COMPILE_LANGUAGE:C>:${CMAKE_CURRENT_SOURCE_DIR}/c_only>
+ )
+ target_compile_definitions(consumer
+ PRIVATE -DTEST_LANG_DEFINES
+ )
+endif()
+
target_include_directories(consumer
PRIVATE
$<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
diff --git a/Tests/CMakeCommands/target_include_directories/c_only/c_only.h b/Tests/CMakeCommands/target_include_directories/c_only/c_only.h
new file mode 100644
index 0000000..29f68ee
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/c_only/c_only.h
@@ -0,0 +1,2 @@
+
+#define C_ONLY_DEFINE
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.c b/Tests/CMakeCommands/target_include_directories/consumer.c
new file mode 100644
index 0000000..8821f5b
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/consumer.c
@@ -0,0 +1,10 @@
+
+#ifdef TEST_LANG_DEFINES
+ #include "c_only.h"
+
+ #ifndef C_ONLY_DEFINE
+ #error Expected C_ONLY_DEFINE
+ #endif
+#endif
+
+int consumer_c() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 7e3443e..649510c 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -4,6 +4,9 @@
#include "interfaceinclude.h"
#include "relative_dir.h"
#include "consumer.h"
+#ifdef TEST_LANG_DEFINES
+ #include "cxx_only.h"
+#endif
#ifdef PRIVATEINCLUDE_DEFINE
#error Unexpected PRIVATEINCLUDE_DEFINE
@@ -29,4 +32,10 @@
#error Expected CONSUMER_DEFINE
#endif
+#ifdef TEST_LANG_DEFINES
+ #ifndef CXX_ONLY_DEFINE
+ #error Expected CXX_ONLY_DEFINE
+ #endif
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/cxx_only/cxx_only.h b/Tests/CMakeCommands/target_include_directories/cxx_only/cxx_only.h
new file mode 100644
index 0000000..67289a4
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/cxx_only/cxx_only.h
@@ -0,0 +1,2 @@
+
+#define CXX_ONLY_DEFINE
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 818b8c9..741c73e 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -22,8 +22,18 @@ generate_export_header(staticlib1)
add_library(staticlib2 STATIC staticlib2.cpp)
generate_export_header(staticlib2)
target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
+
+# Try adding a private link item to be propagated out of a static lib.
+set(private_link "")
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
- target_link_libraries(staticlib1 LINK_PRIVATE "-Wl,-v")
+ if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ set(private_link "-Wl,-V")
+ else()
+ set(private_link "-Wl,-v")
+ endif()
+endif()
+if(private_link)
+ target_link_libraries(staticlib1 LINK_PRIVATE "${private_link}")
endif()
add_executable(staticlib_exe staticlib_exe.cpp)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 08765de..5944d08 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -172,6 +172,7 @@ if(BUILD_TESTING)
ON)
mark_as_advanced(CTEST_TEST_CPACK)
set(CTEST_TEST_OSX_ARCH 0)
+ set(CMake_TEST_XCODE_VERSION 0)
if(APPLE)
execute_process(
COMMAND sw_vers -productVersion
@@ -185,6 +186,17 @@ if(BUILD_TESTING)
else()
set(CTEST_TEST_OSX_ARCH 1)
endif()
+ if(XCODE_VERSION)
+ set(CMake_TEST_XCODE_VERSION "${XCODE_VERSION}")
+ else()
+ execute_process(
+ COMMAND xcodebuild -version
+ OUTPUT_VARIABLE _version ERROR_VARIABLE _version
+ )
+ if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)")
+ set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}")
+ endif()
+ endif()
endif()
# Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
@@ -560,7 +572,21 @@ if(BUILD_TESTING)
--test-command Simple)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator")
endif ()
-
+ # check for the Qbs generator
+ if ("${cmakeOutput}" MATCHES Qbs)
+ add_test(Simple_QbsGenerator ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/Simple_QbsGenerator"
+ --build-two-config
+ --build-generator "Qbs - Unix Makefiles"
+ --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
+ --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
+ --build-project Simple
+ --build-options ${build_options}
+ --test-command Simple)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_QbsGenerator")
+ endif ()
endif()
# test for correct sub-project generation
@@ -836,6 +862,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set(CTEST_RUN_CPackComponents ${CTEST_TEST_CPACK})
set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK})
set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK})
+ set(CTEST_RUN_CPackComponentsPrefix ${CTEST_TEST_CPACK})
# Do not try to build RPM
if (NOT RPMBUILD_EXECUTABLE)
@@ -964,6 +991,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
${build_generator_args}
--build-project CPackComponentsForAll
--build-options ${build_options}
+ -DCPACK_GENERATOR:STRING=${CPackGen}
-DCPACK_BINARY_${CPackGen}:BOOL=ON
${CPackRun_CPackComponentWay}
${CPackComponentsForAll_BUILD_OPTIONS}
@@ -1009,6 +1037,33 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackTestAllGenerators")
endif()
+ if(CTEST_RUN_CPackComponentsPrefix)
+ set(CPackComponents_BUILD_OPTIONS)
+ if(APPLE)
+ set(CPackComponents_BUILD_OPTIONS -DCPACK_BINARY_DRAGNDROP:BOOL=ON)
+ endif()
+ if(NOT NSIS_MAKENSIS_EXECUTABLE)
+ set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS}
+ -DCPACK_BINARY_NSIS:BOOL=OFF)
+ endif()
+
+ add_test(CPackComponentsPrefix ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/CPackComponentsPrefix"
+ "${CMake_BINARY_DIR}/Tests/CPackComponentsPrefix"
+ ${build_generator_args}
+ --build-project CPackComponentsPrefix
+ --build-two-config
+ --build-target package
+ --build-options ${build_options}
+ -DCPACK_BINARY_DEB:BOOL=${CPACK_BINARY_DEB}
+ -DCPACK_BINARY_RPM:BOOL=${CPACK_BINARY_RPM}
+ -DCPACK_BINARY_ZIP:BOOL=ON
+ ${CPackComponents_BUILD_OPTIONS}
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponentsPrefix")
+ endif()
+
if(CTEST_package_X11_TEST)
set(X11_build_target_arg --build-target package)
else()
@@ -1256,6 +1311,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
add_subdirectory(FindJsonCpp)
endif()
+ # Matlab module
+ if(CMake_TEST_FindMatlab)
+ ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
+ ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
+ endif()
+
find_package(GTK2 QUIET)
if(GTK2_FOUND)
add_subdirectory(FindGTK2)
@@ -1487,6 +1548,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
)
endif()
+ if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 5
+ AND OSX_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
+ set(XCTest_BUILD_OPTIONS -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_MATCH_1})
+ ADD_TEST_MACRO(XCTest ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> -V)
+ endif()
+
add_test(linkorder1 ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/LinkLineOrder"
@@ -2409,6 +2476,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
"${CMake_BINARY_DIR}/Testing/JacocoCoverage/DartConfiguration.tcl")
file(COPY "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/Coverage"
DESTINATION "${CMake_BINARY_DIR}/Testing/JacocoCoverage")
+ configure_file("${CMake_BINARY_DIR}/Testing/JacocoCoverage/Coverage/target/site/jacoco.xml.in"
+ "${CMake_BINARY_DIR}/Testing/JacocoCoverage/Coverage/target/site/jacoco.xml")
add_test(NAME CTestJacocoCoverage
COMMAND cmake -E chdir
${CMake_BINARY_DIR}/Testing/JacocoCoverage
@@ -2559,6 +2628,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--output-log "${CMake_BINARY_DIR}/Tests/CTestTestParallel/testOutput.log"
)
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestTestVerboseOutput/test.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestVerboseOutput/test.cmake" @ONLY ESCAPE_QUOTES)
+ add_test(CTestTestVerboseOutput ${CMAKE_CTEST_COMMAND}
+ -S "${CMake_BINARY_DIR}/Tests/CTestTestVerboseOutput/test.cmake" -VV
+ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestVerboseOutput/testOutput.log"
+ -C "\${CTestTest_CONFIG}"
+ )
+ set_property(TEST CTestTestVerboseOutput PROPERTY PASS_REGULAR_EXPRESSION
+ "Environment variables:.*foo=bar.*this=that"
+ )
+
configure_file(
"${CMake_SOURCE_DIR}/Tests/CTestTestSkipReturnCode/test.cmake.in"
"${CMake_BINARY_DIR}/Tests/CTestTestSkipReturnCode/test.cmake"
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index ce36830..d5524c3 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -19,7 +19,6 @@ AddCMakeTest(GetFilenameComponentRealpath "")
AddCMakeTest(Version "")
AddCMakeTest(Message "")
AddCMakeTest(File "")
-AddCMakeTest(ConfigureFile "")
AddCMakeTest(SeparateArguments "")
AddCMakeTest(ImplicitLinkInfo "")
AddCMakeTest(ModuleNotices "")
diff --git a/Tests/CMakeTests/ConfigureFile-DirOutput.cmake b/Tests/CMakeTests/ConfigureFile-DirOutput.cmake
deleted file mode 100644
index d682a2d..0000000
--- a/Tests/CMakeTests/ConfigureFile-DirOutput.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-DirOutput.txt "DirOutput test file\n")
-file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ConfigureFile-DirOutput)
-configure_file(ConfigureFile-DirOutput.txt ConfigureFile-DirOutput)
-file(READ ${CMAKE_CURRENT_BINARY_DIR}/ConfigureFile-DirOutput/ConfigureFile-DirOutput.txt out)
-message("${out}")
diff --git a/Tests/CMakeTests/ConfigureFile-Relative.cmake b/Tests/CMakeTests/ConfigureFile-Relative.cmake
deleted file mode 100644
index 532580a..0000000
--- a/Tests/CMakeTests/ConfigureFile-Relative.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-Relative-In.txt "Relative test file\n")
-configure_file(ConfigureFile-Relative-In.txt ConfigureFile-Relative-Out.txt)
-file(READ ${CMAKE_CURRENT_BINARY_DIR}/ConfigureFile-Relative-Out.txt out)
-message("${out}")
diff --git a/Tests/CMakeTests/ConfigureFileTest.cmake.in b/Tests/CMakeTests/ConfigureFileTest.cmake.in
deleted file mode 100644
index 6cc61d9..0000000
--- a/Tests/CMakeTests/ConfigureFileTest.cmake.in
+++ /dev/null
@@ -1,28 +0,0 @@
-set(DirInput-RESULT 1)
-set(DirInput-STDERR "is a directory")
-set(DirOutput-RESULT 0)
-set(DirOutput-STDERR "DirOutput test file")
-set(Relative-RESULT 0)
-set(Relative-STDERR "Relative test file")
-set(BadArg-RESULT 1)
-set(BadArg-STDERR "called with incorrect number of arguments")
-set(NewLineStyle-NoArg-RESULT 1)
-set(NewLineStyle-NoArg-STDERR "NEWLINE_STYLE must set a style:")
-set(NewLineStyle-WrongArg-RESULT 1)
-set(NewLineStyle-WrongArg-STDERR "NEWLINE_STYLE sets an unknown style")
-set(NewLineStyle-ValidArg-RESULT 0)
-set(NewLineStyle-ValidArg-STDERR )
-set(NewLineStyle-COPYONLY-RESULT 1)
-set(NewLineStyle-COPYONLY-STDERR "COPYONLY could not be used in combination")
-
-include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
-check_cmake_test(ConfigureFile
- DirInput
- DirOutput
- Relative
- BadArg
- NewLineStyle-NoArg
- NewLineStyle-WrongArg
- NewLineStyle-ValidArg
- NewLineStyle-COPYONLY
- )
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index 51af297..1cc34b0 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -49,6 +49,44 @@ install(FILES mylib.h
DESTINATION include
COMPONENT headers)
+if("${CPACK_GENERATOR}" MATCHES "RPM")
+ # Package symbolic links
+ install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two/depth_three COMPONENT libraries)
+ install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_two/depth_two/different_relocatable/bar COMPONENT libraries)
+ install(DIRECTORY DESTINATION other_relocatable/depth_two COMPONENT libraries)
+ install(DIRECTORY DESTINATION non_relocatable/depth_two COMPONENT libraries)
+ # test symbolic links to same dir
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink depth_three symlink_samedir_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_samedir_path DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+ # test symbolic links to same dir with current dir ./ prefix
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ./depth_three symlink_samedir_path_current_dir)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_samedir_path_current_dir DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+ # test symbolic links to same dir with longer relative path
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../../${CMAKE_INSTALL_LIBDIR}/.././${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/./depth_two/depth_three symlink_samedir_path_longer)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_samedir_path_longer DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+ # test symbolic links to sub dir
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two/depth_three symlink_subdir_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_subdir_path DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one COMPONENT libraries)
+ # test symbolic links to parent dir
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink .././../../../${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/./depth_two symlink_parentdir_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_parentdir_path DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two/depth_three COMPONENT libraries)
+ # test symbolic link to another relocatable path
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink .././.././../other_relocatable/./depth_two symlink_other_relocatable_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_other_relocatable_path DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_two/depth_two COMPONENT libraries)
+ # test symbolic link to non relocatable path
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink .././../../non_relocatable/./depth_two symlink_to_non_relocatable_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_to_non_relocatable_path DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_two/depth_two COMPONENT libraries)
+ # test symbolic link from non relocatable path
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink .././../${CMAKE_INSTALL_LIBDIR}/inside_relocatable_two/depth_two symlink_from_non_relocatable_path)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_from_non_relocatable_path DESTINATION non_relocatable/depth_two COMPONENT libraries)
+ # test symbolic link relocatable path to its relocatable subpath
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../inside_relocatable_two/depth_two/different_relocatable/bar symlink_relocatable_subpath)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_relocatable_subpath DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+ # test symbolic link to location outside package
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ./outside_package symlink_outside_package)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_outside_package DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+endif()
+
# CPack boilerplate for this project
set(CPACK_PACKAGE_NAME "MyLib")
set(CPACK_PACKAGE_CONTACT "None")
@@ -114,7 +152,8 @@ set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
# can not be used in CPack scripts due to CMAKE_SIZEOF_VOID_P
# variable not being set
set(CPACK_RPM_RELOCATION_PATHS "${CMAKE_INSTALL_INCLUDEDIR}"
- "${CMAKE_INSTALL_LIBDIR}" "${CMAKE_INSTALL_BINDIR}")
+ "${CMAKE_INSTALL_LIBDIR}" "${CMAKE_INSTALL_BINDIR}" "other_relocatable"
+ "${CMAKE_INSTALL_LIBDIR}/inside_relocatable_two/depth_two/different_relocatable")
# We may use the CPack specific config file in order
# to tailor CPack behavior on a CPack generator specific way
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
index e4780d3..ac9b552 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
@@ -22,12 +22,16 @@ if(CPACK_GENERATOR MATCHES "RPM")
# test cross-built rpm
set(CPACK_RPM_applications_PACKAGE_ARCHITECTURE "armv7hf")
- # test package summary override
+ # test package summary override - headers rpm is generated in the middle
set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
- set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary")
+ set(CPACK_RPM_headers_PACKAGE_SUMMARY "headers summary")
- # test package description override
- set(CPACK_RPM_libraries_PACKAGE_DESCRIPTION "libraries description")
+ # test package description override - headers rpm is generated in the middle
+ set(CPACK_RPM_headers_PACKAGE_DESCRIPTION "headers description")
+
+ # test package do not use CPACK_PACKAGING_INSTALL_PREFIX
+ # as relocation path
+ set(CPACK_RPM_NO_libraries_INSTALL_PREFIX_RELOCATION true)
endif()
if(CPACK_GENERATOR MATCHES "DEB")
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index c7ec709..e747052 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -1,3 +1,7 @@
+# prevent older policies from interfearing with this script
+cmake_policy(PUSH)
+cmake_policy(VERSION ${CMAKE_VERSION})
+
message(STATUS "=============================================================================")
message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
message(STATUS "")
@@ -132,12 +136,13 @@ if(CPackGen MATCHES "RPM")
endif()
set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
- set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary")
- set(CPACK_RPM_libraries_PACKAGE_DESCRIPTION "libraries description")
+ set(CPACK_RPM_headers_PACKAGE_SUMMARY "headers summary")
+ set(CPACK_RPM_headers_PACKAGE_DESCRIPTION "headers description")
set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION
"An extremely useful application that makes use of MyLib")
- set(CPACK_COMPONENT_HEADERS_DESCRIPTION
- "C/C\\+\\+ header files for use with MyLib")
+ set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
+ "Static libraries used to build programs with MyLib")
+ set(LIB_SUFFIX "6?4?")
# test package info
if(${CPackComponentWay} STREQUAL "IgnoreGroup")
@@ -158,37 +163,69 @@ if(CPackGen MATCHES "RPM")
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${RPM_EXECUTABLE} -pqa ${check_file}
+ RESULT_VARIABLE check_package_architecture_result
+ OUTPUT_VARIABLE check_package_architecture
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file}
OUTPUT_VARIABLE check_package_content
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(whitespaces "[\\t\\n\\r ]*")
+
if(check_file_libraries_match)
- set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*")
- set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*")
- set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
- set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_applications_PACKAGE_ARCHITECTURE}")
+ set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*${CPACK_COMPONENT_LIBRARIES_DESCRIPTION}.*")
+ set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/other_relocatable${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/inside_relocatable_two/depth_two/different_relocatable")
+ set(check_file_match_expected_architecture "") # we don't explicitly set this value so it is different on each platform - ignore it
set(spec_regex "*libraries*")
- set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/lib.*\n/usr/foo/bar/lib.*/libmylib.a$")
+ set(check_content_list "^/usr/foo/bar/lib${LIB_SUFFIX}
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/depth_three
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/depth_three/symlink_parentdir_path
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_outside_package
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_relocatable_subpath
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_samedir_path
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_samedir_path_current_dir
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_samedir_path_longer
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/symlink_subdir_path
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two/depth_two
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two/depth_two/different_relocatable
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two/depth_two/different_relocatable/bar
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two/depth_two/symlink_other_relocatable_path
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_two/depth_two/symlink_to_non_relocatable_path
+/usr/foo/bar/lib${LIB_SUFFIX}/libmylib.a
+/usr/foo/bar/non_relocatable
+/usr/foo/bar/non_relocatable/depth_two
+/usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path
+/usr/foo/bar/other_relocatable
+/usr/foo/bar/other_relocatable/depth_two$")
elseif(check_file_headers_match)
- set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
- set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*")
- set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
- set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_libraries_PACKAGE_ARCHITECTURE}")
+ set(check_file_match_expected_summary ".*${CPACK_RPM_headers_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*${CPACK_RPM_headers_PACKAGE_DESCRIPTION}.*")
+ set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(check_file_match_expected_architecture "noarch")
set(spec_regex "*headers*")
set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$")
elseif(check_file_applications_match)
set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*")
- set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
- set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_headers_PACKAGE_ARCHITECTURE}")
+ set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ set(check_file_match_expected_architecture "armv7hf")
set(spec_regex "*applications*")
- set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/bin\n/usr/foo/bar/bin/mylibapp$")
+ set(check_content_list "^/usr/foo/bar
+/usr/foo/bar/bin
+/usr/foo/bar/bin/mylibapp$")
elseif(check_file_Unspecified_match)
set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
set(check_file_match_expected_description ".*DESCRIPTION.*")
- set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
- set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_Unspecified_PACKAGE_ARCHITECTURE}")
+ set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ set(check_file_match_expected_architecture "") # we don't explicitly set this value so it is different on each platform - ignore it
set(spec_regex "*Unspecified*")
set(check_content_list "^/usr/foo/bar
/usr/foo/bar/bin
@@ -228,9 +265,22 @@ if(CPackGen MATCHES "RPM")
message(FATAL_ERROR "error: '${check_file}' rpm package relocation path does not match expected value - regex '${check_file_match_expected_relocation_path}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'")
endif()
- string(REGEX MATCH ${check_file_match_expected_architecture} check_file_match_architecture ${check_file_content})
- if (NOT check_file_match_architecture)
+ #######################
+ # test package architecture
+ #######################
+ string(REGEX MATCH "Architecture${whitespaces}:" check_info_contains_arch ${check_file_content})
+ if(check_info_contains_arch) # test for rpm versions that contain architecture in package info (e.g. 4.11.x)
+ string(REGEX MATCH "Architecture${whitespaces}:${whitespaces}${check_file_match_expected_architecture}" check_file_match_architecture ${check_file_content})
+ if(NOT check_file_match_architecture)
message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'")
+ endif()
+ elseif(NOT check_package_architecture_result) # test result only on platforms that support -pqa rpm query
+ # test for rpm versions that do not contain architecture in package info (e.g. 4.8.x)
+ string(REGEX MATCH ".*${check_file_match_expected_architecture}" check_file_match_architecture "${check_package_architecture}")
+ if(NOT check_file_match_architecture)
+ message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_package_architecture}'; generated spec file: '${spec_file_content}'")
+ endif()
+ # else rpm version too old (e.g. 4.4.x) - skip test
endif()
#######################
@@ -248,5 +298,59 @@ if(CPackGen MATCHES "RPM")
message(FATAL_ERROR "error: '${check_file}' rpm package content does not match expected value - regex '${check_content_list}'; RPM output: '${check_package_content}'; generated spec file: '${spec_file_content}'")
endif()
endforeach()
+
+ #######################
+ # verify generated symbolic links
+ #######################
+ file(GLOB_RECURSE symlink_files RELATIVE "${CPackComponentsForAll_BINARY_DIR}" "${CPackComponentsForAll_BINARY_DIR}/*/symlink_*")
+
+ foreach(check_symlink IN LISTS symlink_files)
+ get_filename_component(symlink_name "${check_symlink}" NAME)
+ execute_process(COMMAND ls -la "${check_symlink}"
+ WORKING_DIRECTORY "${CPackComponentsForAll_BINARY_DIR}"
+ OUTPUT_VARIABLE SYMLINK_POINT_
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if("${symlink_name}" STREQUAL "symlink_samedir_path"
+ OR "${symlink_name}" STREQUAL "symlink_samedir_path_current_dir"
+ OR "${symlink_name}" STREQUAL "symlink_samedir_path_longer")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}depth_three$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_subdir_path")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}depth_two/depth_three$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_parentdir_path")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}../$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_to_non_relocatable_path")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/non_relocatable/depth_two$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_outside_package")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}outside_package$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_other_relocatable_path"
+ OR "${symlink_name}" STREQUAL "symlink_from_non_relocatable_path"
+ OR "${symlink_name}" STREQUAL "symlink_relocatable_subpath")
+ # these links were not canged - post install script only - ignore them
+ else()
+ message(FATAL_ERROR "error: unexpected rpm symbolic link '${check_symlink}'")
+ endif()
+
+ if(NOT check_symlink)
+ message(FATAL_ERROR "symlink points to unexpected location '${SYMLINK_POINT_}'")
+ endif()
+ endforeach()
+
+ # verify post install symlink relocation script
+ file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/*libraries*.spec")
+ file(READ ${spec_file} spec_file_content)
+ file(READ "${CMAKE_CURRENT_LIST_DIR}/symlink_postinstall_expected.txt" symlink_postinstall_expected)
+ # prepare regex
+ string(STRIP "${symlink_postinstall_expected}" symlink_postinstall_expected)
+ string(REPLACE "[" "\\[" symlink_postinstall_expected "${symlink_postinstall_expected}")
+ string(REPLACE "$" "\\$" symlink_postinstall_expected "${symlink_postinstall_expected}")
+ string(REPLACE "lib" "lib${LIB_SUFFIX}" symlink_postinstall_expected "${symlink_postinstall_expected}")
+ # compare
+ string(REGEX MATCH ".*${symlink_postinstall_expected}.*" symlink_postinstall_expected_matches "${spec_file_content}")
+ if(NOT symlink_postinstall_expected_matches)
+ message(FATAL_ERROR "error: unexpected rpm symbolic link postinstall script! generated spec file: '${spec_file_content}'")
+ endif()
endif()
endif()
+
+cmake_policy(POP)
diff --git a/Tests/CPackComponentsForAll/symlink_postinstall_expected.txt b/Tests/CPackComponentsForAll/symlink_postinstall_expected.txt
new file mode 100644
index 0000000..ba46792
--- /dev/null
+++ b/Tests/CPackComponentsForAll/symlink_postinstall_expected.txt
@@ -0,0 +1,57 @@
+if [ "$RPM_INSTALL_PREFIX0" != "/usr/foo/bar/lib" ]; then
+ if [ "$RPM_INSTALL_PREFIX1" != "/usr/foo/bar/other_relocatable" ]; then
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_1" ]; then
+ ln -s "$RPM_INSTALL_PREFIX1/depth_two" "$RPM_INSTALL_PREFIX0/inside_relocatable_two/depth_two/symlink_other_relocatable_path"
+ CPACK_RPM_RELOCATED_SYMLINK_1=true
+ fi
+ fi
+ if [ "$RPM_INSTALL_PREFIX2" != "/usr/foo/bar/lib/inside_relocatable_two/depth_two/different_relocatable" ]; then
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "$RPM_INSTALL_PREFIX2/bar" "$RPM_INSTALL_PREFIX0/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+ CPACK_RPM_RELOCATED_SYMLINK_0=true
+ fi
+ fi
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "$RPM_INSTALL_PREFIX0/inside_relocatable_two/depth_two/different_relocatable/bar" "$RPM_INSTALL_PREFIX0/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+ CPACK_RPM_RELOCATED_SYMLINK_0=true
+ fi
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "/usr/foo/bar/lib/inside_relocatable_two/depth_two/different_relocatable/bar" "$RPM_INSTALL_PREFIX0/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+ CPACK_RPM_RELOCATED_SYMLINK_0=true
+ fi
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_1" ]; then
+ ln -s "/usr/foo/bar/other_relocatable/depth_two" "$RPM_INSTALL_PREFIX0/inside_relocatable_two/depth_two/symlink_other_relocatable_path"
+ CPACK_RPM_RELOCATED_SYMLINK_1=true
+ fi
+fi
+if [ "$RPM_INSTALL_PREFIX1" != "/usr/foo/bar/other_relocatable" ]; then
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_1" ]; then
+ ln -s "$RPM_INSTALL_PREFIX1/depth_two" "/usr/foo/bar/lib/inside_relocatable_two/depth_two/symlink_other_relocatable_path"
+ CPACK_RPM_RELOCATED_SYMLINK_1=true
+ fi
+fi
+if [ "$RPM_INSTALL_PREFIX2" != "/usr/foo/bar/lib/inside_relocatable_two/depth_two/different_relocatable" ]; then
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "$RPM_INSTALL_PREFIX2/bar" "/usr/foo/bar/lib/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+ CPACK_RPM_RELOCATED_SYMLINK_0=true
+ fi
+fi
+if [ "$RPM_INSTALL_PREFIX0" != "/usr/foo/bar/lib" ]; then
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "$RPM_INSTALL_PREFIX0/inside_relocatable_two/depth_two/different_relocatable/bar" "/usr/foo/bar/lib/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+ CPACK_RPM_RELOCATED_SYMLINK_0=true
+ fi
+ if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_2" ]; then
+ ln -s "$RPM_INSTALL_PREFIX0/inside_relocatable_two/depth_two" "/usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path"
+ CPACK_RPM_RELOCATED_SYMLINK_2=true
+ fi
+fi
+if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_0" ]; then
+ ln -s "/usr/foo/bar/lib/inside_relocatable_two/depth_two/different_relocatable/bar" "/usr/foo/bar/lib/inside_relocatable_one/depth_two/symlink_relocatable_subpath"
+fi
+if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_1" ]; then
+ ln -s "/usr/foo/bar/other_relocatable/depth_two" "/usr/foo/bar/lib/inside_relocatable_two/depth_two/symlink_other_relocatable_path"
+fi
+if [ -z "$CPACK_RPM_RELOCATED_SYMLINK_2" ]; then
+ ln -s "/usr/foo/bar/lib/inside_relocatable_two/depth_two" "/usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path"
+fi
diff --git a/Tests/CPackComponentsPrefix/CMakeLists.txt b/Tests/CPackComponentsPrefix/CMakeLists.txt
new file mode 100644
index 0000000..207dae8
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.2)
+project(CPackComponentsPrefix NONE)
+
+install(FILES file-runtime.txt
+ DESTINATION bin COMPONENT Runtime)
+install(FILES file-development.txt
+ DESTINATION lib COMPONENT Development)
+
+set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1)
+set(CPACK_COMPONENTS_ALL Development)
+set(CPACK_ARCHIVE_COMPONENT_INSTALL 1)
+set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/My-1.0")
+include(CPack)
diff --git a/Tests/CPackComponentsPrefix/file-development.txt b/Tests/CPackComponentsPrefix/file-development.txt
new file mode 100644
index 0000000..df22d2f
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/file-development.txt
@@ -0,0 +1 @@
+This file is installed with the Development component.
diff --git a/Tests/CPackComponentsPrefix/file-runtime.txt b/Tests/CPackComponentsPrefix/file-runtime.txt
new file mode 100644
index 0000000..135c13d
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/file-runtime.txt
@@ -0,0 +1 @@
+This file is installed with the Runtime component.
diff --git a/Tests/CTestTestVerboseOutput/CMakeLists.txt b/Tests/CTestTestVerboseOutput/CMakeLists.txt
new file mode 100644
index 0000000..4cdd29c
--- /dev/null
+++ b/Tests/CTestTestVerboseOutput/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 2.6)
+project(CTestTestVerboseOutput)
+include(CTest)
+
+add_executable(nop nop.c)
+
+add_test(NAME TestWithProperties COMMAND nop)
+set_property(TEST TestWithProperties PROPERTY ENVIRONMENT
+ "foo=bar"
+ "this=that"
+)
diff --git a/Tests/CTestTestVerboseOutput/CTestConfig.cmake b/Tests/CTestTestVerboseOutput/CTestConfig.cmake
new file mode 100644
index 0000000..4f96c79
--- /dev/null
+++ b/Tests/CTestTestVerboseOutput/CTestConfig.cmake
@@ -0,0 +1,7 @@
+set(CTEST_PROJECT_NAME "CTestTestVerboseOutput")
+set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+set(CTEST_DART_SERVER_VERSION "2")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Tests/CTestTestVerboseOutput/nop.c b/Tests/CTestTestVerboseOutput/nop.c
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/CTestTestVerboseOutput/nop.c
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/CTestTestVerboseOutput/test.cmake.in b/Tests/CTestTestVerboseOutput/test.cmake.in
new file mode 100644
index 0000000..7f49548
--- /dev/null
+++ b/Tests/CTestTestVerboseOutput/test.cmake.in
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 2.4)
+
+# Settings:
+set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
+set(CTEST_SITE "@SITE@")
+set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-VerboseOutput")
+
+set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestVerboseOutput")
+set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestVerboseOutput")
+set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
+set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
+
+CTEST_START(Experimental)
+CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
diff --git a/Tests/CustomCommandByproducts/CMakeLists.txt b/Tests/CustomCommandByproducts/CMakeLists.txt
index 884f8c2..3289e8f 100644
--- a/Tests/CustomCommandByproducts/CMakeLists.txt
+++ b/Tests/CustomCommandByproducts/CMakeLists.txt
@@ -102,6 +102,27 @@ add_library(ExternalLibrary STATIC IMPORTED)
set_property(TARGET ExternalLibrary PROPERTY IMPORTED_LOCATION ${ExternalLibrary_LIBRARY})
add_dependencies(ExternalLibrary ExternalTarget)
+# Generate the library file of an imported target as a byproduct
+# of an external project. The byproduct uses <BINARY_DIR> that is substituted
+# by the real binary path
+if(CMAKE_CONFIGURATION_TYPES)
+ set(cfg /${CMAKE_CFG_INTDIR})
+else()
+ set(cfg)
+endif()
+include(ExternalProject)
+ExternalProject_Add(ExtTargetSubst
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/External"
+ DOWNLOAD_COMMAND ""
+ INSTALL_COMMAND ""
+ BUILD_BYPRODUCTS "<BINARY_DIR>${cfg}/${CMAKE_STATIC_LIBRARY_PREFIX}ExternalLibrary${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ )
+ExternalProject_Get_Property(ExtTargetSubst binary_dir)
+add_library(ExternalLibraryWithSubstitution STATIC IMPORTED)
+set_property(TARGET ExternalLibraryWithSubstitution PROPERTY IMPORTED_LOCATION
+ ${binary_dir}${cfg}/${CMAKE_STATIC_LIBRARY_PREFIX}ExternalLibrary${CMAKE_STATIC_LIBRARY_SUFFIX})
+add_dependencies(ExternalLibraryWithSubstitution ExtTargetSubst)
+
# Add an executable consuming all the byproducts.
add_executable(CustomCommandByproducts
CustomCommandByproducts.c
diff --git a/Tests/FindMatlab/basic_checks/CMakeLists.txt b/Tests/FindMatlab/basic_checks/CMakeLists.txt
new file mode 100644
index 0000000..acf71ea
--- /dev/null
+++ b/Tests/FindMatlab/basic_checks/CMakeLists.txt
@@ -0,0 +1,57 @@
+
+cmake_minimum_required (VERSION 2.8.12)
+enable_testing()
+project(basic_checks)
+
+set(MATLAB_FIND_DEBUG TRUE)
+
+# the success of the following command is dependent on the current configuration:
+# - on 32bits builds (cmake is building with 32 bits), it looks for 32 bits Matlab
+# - on 64bits builds (cmake is building with 64 bits), it looks for 64 bits Matlab
+find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY MAIN_PROGRAM)
+
+
+
+matlab_add_mex(
+ # target name
+ NAME cmake_matlab_test_wrapper1
+ # output name
+ OUTPUT_NAME cmake_matlab_mex1
+ SRC ${CMAKE_CURRENT_SOURCE_DIR}/../matlab_wrapper1.cpp
+ DOCUMENTATION ${CMAKE_CURRENT_SOURCE_DIR}/../help_text1.m.txt
+ )
+
+
+matlab_add_unit_test(
+ NAME ${PROJECT_NAME}_matlabtest-1
+ TIMEOUT 30
+ UNITTEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_matlab_unit_tests1.m
+ ADDITIONAL_PATH $<TARGET_FILE_DIR:cmake_matlab_test_wrapper1>
+ )
+
+matlab_add_unit_test(
+ NAME ${PROJECT_NAME}_matlabtest-2
+ TIMEOUT 15
+ UNITTEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_matlab_unit_tests_timeout.m
+ ADDITIONAL_PATH $<TARGET_FILE_DIR:cmake_matlab_test_wrapper1>
+ )
+set_tests_properties(${PROJECT_NAME}_matlabtest-2 PROPERTIES WILL_FAIL TRUE)
+
+
+# testing the test without the unittest framework of Matlab
+matlab_add_unit_test(
+ NAME ${PROJECT_NAME}_matlabtest-3
+ TIMEOUT 30
+ NO_UNITTEST_FRAMEWORK
+ UNITTEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_matlab_unit_tests2.m
+ ADDITIONAL_PATH $<TARGET_FILE_DIR:cmake_matlab_test_wrapper1>
+ )
+
+matlab_add_unit_test(
+ NAME ${PROJECT_NAME}_matlabtest-4
+ TIMEOUT 30
+ NO_UNITTEST_FRAMEWORK
+ UNITTEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_matlab_unit_tests3.m
+ ADDITIONAL_PATH $<TARGET_FILE_DIR:cmake_matlab_test_wrapper1>
+ )
+set_tests_properties(${PROJECT_NAME}_matlabtest-4 PROPERTIES WILL_FAIL TRUE)
diff --git a/Tests/FindMatlab/cmake_matlab_unit_tests1.m b/Tests/FindMatlab/cmake_matlab_unit_tests1.m
new file mode 100644
index 0000000..2371c3a
--- /dev/null
+++ b/Tests/FindMatlab/cmake_matlab_unit_tests1.m
@@ -0,0 +1,33 @@
+
+classdef cmake_matlab_unit_tests1 < matlab.unittest.TestCase
+ % some simple unit test for CMake Matlab wrapper
+ properties
+ end
+
+ methods (Test)
+ function testDummyCall(testCase)
+ % very simple call test
+ cmake_matlab_mex1(rand(3,3));
+ end
+
+ function testDummyCall2(testCase)
+ % very simple call test 2
+ ret = cmake_matlab_mex1(rand(3,3));
+ testCase.verifyEqual(size(ret), size(rand(3,3)));
+
+ testCase.verifyEqual(size(cmake_matlab_mex1(rand(4,3))), [4,3] );
+ end
+
+ function testFailTest(testCase)
+ testCase.verifyError(@() cmake_matlab_mex1(10), 'cmake_matlab:configuration');
+ testCase.verifyError(@() cmake_matlab_mex1([10]), 'cmake_matlab:configuration');
+ end
+
+ function testHelpContent(testCase)
+ % testing the help feature
+ testCase.verifySubstring(evalc('help cmake_matlab_mex1'), 'Dummy matlab extension in cmake');
+ end
+
+
+ end
+end
diff --git a/Tests/FindMatlab/cmake_matlab_unit_tests2.m b/Tests/FindMatlab/cmake_matlab_unit_tests2.m
new file mode 100644
index 0000000..7a8a342
--- /dev/null
+++ b/Tests/FindMatlab/cmake_matlab_unit_tests2.m
@@ -0,0 +1,6 @@
+
+ret = cmake_matlab_mex1(rand(3,3));
+
+if(size(ret) ~= size(rand(3,3)))
+ error('Dimension mismatch!');
+end
diff --git a/Tests/FindMatlab/cmake_matlab_unit_tests3.m b/Tests/FindMatlab/cmake_matlab_unit_tests3.m
new file mode 100644
index 0000000..2639325
--- /dev/null
+++ b/Tests/FindMatlab/cmake_matlab_unit_tests3.m
@@ -0,0 +1,5 @@
+
+cmake_matlab_mex1(10);
+
+% should not reach this point
+exit(0);
diff --git a/Tests/FindMatlab/cmake_matlab_unit_tests_timeout.m b/Tests/FindMatlab/cmake_matlab_unit_tests_timeout.m
new file mode 100644
index 0000000..11d5e9e
--- /dev/null
+++ b/Tests/FindMatlab/cmake_matlab_unit_tests_timeout.m
@@ -0,0 +1,16 @@
+
+classdef cmake_matlab_unit_tests_timeout < matlab.unittest.TestCase
+ % timeout tests
+
+ properties
+ end
+
+ methods (Test)
+ function testCallHangsShouldBeTimedOut(testCase)
+ cmake_matlab_mex1(rand(3,3));
+ disp('Will now wait.');
+ disp('Testing the cmake Matlab package timeout - do not kill');
+ pause(20); % supposed to be killed after 15s
+ end
+ end
+end
diff --git a/Tests/FindMatlab/help_text1.m.txt b/Tests/FindMatlab/help_text1.m.txt
new file mode 100644
index 0000000..a924355
--- /dev/null
+++ b/Tests/FindMatlab/help_text1.m.txt
@@ -0,0 +1,2 @@
+% Dummy matlab extension in cmake
+function ret = cmake_matlab_mex1(X)
diff --git a/Tests/FindMatlab/matlab_wrapper1.cpp b/Tests/FindMatlab/matlab_wrapper1.cpp
new file mode 100644
index 0000000..4149bb9
--- /dev/null
+++ b/Tests/FindMatlab/matlab_wrapper1.cpp
@@ -0,0 +1,26 @@
+
+// simple workaround to some compiler specific problems
+// see http://stackoverflow.com/questions/22367516/mex-compile-error-unknown-type-name-char16-t/23281916#23281916
+#include <algorithm>
+
+#include "mex.h"
+
+// this test should return a matrix of 10 x 10 and should check some of the arguments
+
+void mexFunction(const int nlhs, mxArray *plhs[], const int nrhs, const mxArray *prhs[])
+{
+ if(nrhs != 1)
+ {
+ mexErrMsgTxt("Incorrect arguments");
+ }
+
+ size_t dim1 = mxGetM(prhs[0]);
+ size_t dim2 = mxGetN(prhs[0]);
+
+ if(dim1 == 1 || dim2 == 1)
+ {
+ mexErrMsgIdAndTxt("cmake_matlab:configuration", "Incorrect arguments");
+ }
+
+ plhs[0] = mxCreateNumericMatrix(dim1, dim2, mxGetClassID(prhs[0]), mxREAL);
+}
diff --git a/Tests/FindMatlab/versions_checks/CMakeLists.txt b/Tests/FindMatlab/versions_checks/CMakeLists.txt
new file mode 100644
index 0000000..5d20685
--- /dev/null
+++ b/Tests/FindMatlab/versions_checks/CMakeLists.txt
@@ -0,0 +1,52 @@
+
+cmake_minimum_required (VERSION 2.8.12)
+enable_testing()
+project(versions_checks)
+
+set(MATLAB_FIND_DEBUG TRUE)
+set(MATLAB_ADDITIONAL_VERSIONS
+ "dummy=14.9")
+
+# the success of the following command is dependent on the current configuration
+# in this case, we are only interested in the version macros
+find_package(Matlab)
+
+
+
+if(NOT COMMAND matlab_get_version_from_release_name)
+ message(FATAL_ERROR "The macro matlab_get_version_from_release_name should be defined")
+endif()
+
+if(NOT COMMAND matlab_get_release_name_from_version)
+ message(FATAL_ERROR "The macro matlab_get_release_name_from_version should be defined")
+endif()
+
+
+# matlab_get_release_name_from_version
+matlab_get_release_name_from_version("7.13" release_name)
+if(NOT release_name STREQUAL "R2011b")
+ message(FATAL_ERROR "version 7.13 does not give release R2011b : '${release_name}' != R2011b")
+endif()
+
+matlab_get_release_name_from_version("14.9" release_name)
+if(NOT release_name STREQUAL "dummy")
+ message(FATAL_ERROR "version 14.9 does not give release dummy : '${release_name}' != dummy")
+endif()
+
+matlab_get_release_name_from_version("14.10" release_name)
+if(NOT release_name STREQUAL "")
+ message(FATAL_ERROR "version 14.10 does not give empty release: '${release_name}' != ''")
+endif()
+
+
+# matlab_get_version_from_release_name
+matlab_get_version_from_release_name("R2011a" version)
+if(NOT version STREQUAL "7.12")
+ message(FATAL_ERROR "Release R2011a does not give version 7.12 : '${version}' != 7.12")
+endif()
+
+matlab_get_version_from_release_name("dummy" version)
+#message(FATAL_ERROR "versionversion = ${version}")
+if(NOT version STREQUAL "14.9")
+ message(FATAL_ERROR "Release dummy does not give version 14.9 : '${version}' != 14.9")
+endif()
diff --git a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
index 98f521e..826a9ed 100644
--- a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
@@ -3,6 +3,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
add_library(headeriface INTERFACE)
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h"
- "#define IFACE_HEADER_BUILDDIR\n"
-)
+add_custom_target(headeriface_gen
+ COMMENT "Generating iface_header_builddir.h"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_header_builddir.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h
+ VERBATIM
+ )
+add_dependencies(headeriface headeriface_gen)
diff --git a/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in
new file mode 100644
index 0000000..42dd6df
--- /dev/null
+++ b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in
@@ -0,0 +1 @@
+#define IFACE_HEADER_BUILDDIR
diff --git a/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in
index 49c3e87..49c3e87 100644
--- a/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml
+++ b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
index 6c5e59c..b6e24d2 100644
--- a/Tests/Module/ExternalData/CMakeLists.txt
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -44,6 +44,7 @@ ExternalData_Add_Test(Data1
-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}
+ -D DirRecurse=DATA{DirRecurse/,RECURSE:,A.dat,REGEX:[BC].dat}
-D "Semicolons=DATA{Data.dat}\\;DATA{Data.dat}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake
)
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake
index 9845a3b..f60c209 100644
--- a/Tests/Module/ExternalData/Data1Check.cmake
+++ b/Tests/Module/ExternalData/Data1Check.cmake
@@ -90,6 +90,12 @@ foreach(n A B C)
message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
endif()
endforeach()
+foreach(n A Sub1/A Sub2/Dir/A B Sub1/B Sub2/Dir/B C Sub1/C Sub2/Dir/C)
+ set(file "${DirRecurse}/${n}.dat")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
list(LENGTH Semicolons len)
if("${len}" EQUAL 2)
foreach(file ${Semicolons})
diff --git a/Tests/Module/ExternalData/DirRecurse/A.dat.md5 b/Tests/Module/ExternalData/DirRecurse/A.dat.md5
new file mode 100644
index 0000000..4a78fc7
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/A.dat.md5
@@ -0,0 +1 @@
+9d980b06c2f0fec3d4872d68175b9822
diff --git a/Tests/Module/ExternalData/DirRecurse/B.dat.md5 b/Tests/Module/ExternalData/DirRecurse/B.dat.md5
new file mode 100644
index 0000000..4557a21
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/B.dat.md5
@@ -0,0 +1 @@
+8f4add4581551facf27237e6577fd662
diff --git a/Tests/Module/ExternalData/DirRecurse/C.dat.md5 b/Tests/Module/ExternalData/DirRecurse/C.dat.md5
new file mode 100644
index 0000000..a7f23dd
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/C.dat.md5
@@ -0,0 +1 @@
+c1030719c95f3435d8abc39c0d442946
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub1/A.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub1/A.dat.md5
new file mode 100644
index 0000000..4a78fc7
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub1/A.dat.md5
@@ -0,0 +1 @@
+9d980b06c2f0fec3d4872d68175b9822
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub1/B.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub1/B.dat.md5
new file mode 100644
index 0000000..4557a21
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub1/B.dat.md5
@@ -0,0 +1 @@
+8f4add4581551facf27237e6577fd662
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub1/C.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub1/C.dat.md5
new file mode 100644
index 0000000..a7f23dd
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub1/C.dat.md5
@@ -0,0 +1 @@
+c1030719c95f3435d8abc39c0d442946
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/A.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/A.dat.md5
new file mode 100644
index 0000000..4a78fc7
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/A.dat.md5
@@ -0,0 +1 @@
+9d980b06c2f0fec3d4872d68175b9822
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/B.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/B.dat.md5
new file mode 100644
index 0000000..4557a21
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/B.dat.md5
@@ -0,0 +1 @@
+8f4add4581551facf27237e6577fd662
diff --git a/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/C.dat.md5 b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/C.dat.md5
new file mode 100644
index 0000000..a7f23dd
--- /dev/null
+++ b/Tests/Module/ExternalData/DirRecurse/Sub2/Dir/C.dat.md5
@@ -0,0 +1 @@
+c1030719c95f3435d8abc39c0d442946
diff --git a/Tests/RunCMake/interface_library/add_dependencies-result.txt b/Tests/RunCMake/CMP0057/CMP0057-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/add_dependencies-result.txt
+++ b/Tests/RunCMake/CMP0057/CMP0057-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0057/CMP0057-NEW-stderr.txt b/Tests/RunCMake/CMP0057/CMP0057-NEW-stderr.txt
new file mode 100644
index 0000000..9607d54
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0057-NEW.cmake:8 \(add_custom_command\):
+ "input.txt" can only be specified as a custom command MAIN_DEPENDENCY once.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0057/CMP0057-NEW.cmake b/Tests/RunCMake/CMP0057/CMP0057-NEW.cmake
new file mode 100644
index 0000000..22dbfb3
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-NEW.cmake
@@ -0,0 +1,13 @@
+cmake_policy(SET CMP0057 NEW)
+
+add_custom_command(OUTPUT out1
+ COMMAND ${CMAKE_COMMAND} -E echo out1
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_command(OUTPUT out2
+ COMMAND ${CMAKE_COMMAND} -E echo out2
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_target(mytarget1 ALL DEPENDS out1 out2)
diff --git a/Tests/RunCMake/CMP0057/CMP0057-OLD.cmake b/Tests/RunCMake/CMP0057/CMP0057-OLD.cmake
new file mode 100644
index 0000000..ccf4fcb
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-OLD.cmake
@@ -0,0 +1,13 @@
+cmake_policy(SET CMP0057 OLD)
+
+add_custom_command(OUTPUT out1
+ COMMAND ${CMAKE_COMMAND} -E echo out1
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_command(OUTPUT out2
+ COMMAND ${CMAKE_COMMAND} -E echo out2
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_target(mytarget1 ALL DEPENDS out1 out2)
diff --git a/Tests/RunCMake/CMP0057/CMP0057-WARN-stderr.txt b/Tests/RunCMake/CMP0057/CMP0057-WARN-stderr.txt
new file mode 100644
index 0000000..da3a1cb
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-WARN-stderr.txt
@@ -0,0 +1,9 @@
+CMake Warning \(dev\) at CMP0057-WARN.cmake:6 \(add_custom_command\):
+ Policy CMP0057 is not set: Disallow multiple MAIN_DEPENDENCY specifications
+ for the same file. Run "cmake --help-policy CMP0057" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ "input.txt" can only be specified as a custom command MAIN_DEPENDENCY once.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0057/CMP0057-WARN.cmake b/Tests/RunCMake/CMP0057/CMP0057-WARN.cmake
new file mode 100644
index 0000000..1837968
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-WARN.cmake
@@ -0,0 +1,11 @@
+add_custom_command(OUTPUT out1
+ COMMAND ${CMAKE_COMMAND} -E echo out1
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_command(OUTPUT out2
+ COMMAND ${CMAKE_COMMAND} -E echo out2
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_target(mytarget1 ALL DEPENDS out1 out2)
diff --git a/Tests/RunCMake/CMP0057/CMP0057-once_is_ok.cmake b/Tests/RunCMake/CMP0057/CMP0057-once_is_ok.cmake
new file mode 100644
index 0000000..8ce02f9
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMP0057-once_is_ok.cmake
@@ -0,0 +1,8 @@
+cmake_policy(SET CMP0057 NEW)
+
+add_custom_command(OUTPUT out1
+ COMMAND ${CMAKE_COMMAND} -E echo out1
+ MAIN_DEPENDENCY input.txt
+)
+
+add_custom_target(mytarget1 ALL DEPENDS out1)
diff --git a/Tests/RunCMake/CMP0057/CMakeLists.txt b/Tests/RunCMake/CMP0057/CMakeLists.txt
new file mode 100644
index 0000000..ef2163c
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.1)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
new file mode 100644
index 0000000..f79235f
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
@@ -0,0 +1,7 @@
+include(RunCMake)
+
+run_cmake(CMP0057-OLD)
+run_cmake(CMP0057-NEW)
+run_cmake(CMP0057-WARN)
+
+run_cmake(CMP0057-once_is_ok)
diff --git a/Tests/RunCMake/CMP0057/input.txt b/Tests/RunCMake/CMP0057/input.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CMP0057/input.txt
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index ffda31f..7b9c810 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -63,6 +63,10 @@ add_RunCMake_test(CMP0051)
add_RunCMake_test(CMP0053)
add_RunCMake_test(CMP0054)
add_RunCMake_test(CMP0055)
+add_RunCMake_test(CMP0057)
+if(CMAKE_GENERATOR STREQUAL "Ninja")
+ add_RunCMake_test(Ninja)
+endif()
add_RunCMake_test(CTest)
if(NOT CMake_TEST_EXTERNAL_CMAKE)
@@ -209,3 +213,10 @@ add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths)
if(RPMBUILD_EXECUTABLE)
add_RunCMake_test(CPackRPM)
endif()
+
+add_RunCMake_test(COMPILE_LANGUAGE-genex)
+
+# Matlab module related tests
+if(CMake_TEST_FindMatlab)
+ add_RunCMake_test(FindMatlab)
+endif()
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CMakeLists.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CMakeLists.txt
new file mode 100644
index 0000000..ef2163c
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.1)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-result.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt
new file mode 100644
index 0000000..73b66ac
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-VS.txt
@@ -0,0 +1,8 @@
+CMake Error at CompileDefinitions.cmake:5 \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-Xcode.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-Xcode.txt
new file mode 100644
index 0000000..a1ed633
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions-stderr-Xcode.txt
@@ -0,0 +1,9 @@
+CMake Error at CompileDefinitions.cmake:5 \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may only be used with COMPILE_OPTIONS with the
+ Xcode generator.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions.cmake
new file mode 100644
index 0000000..7935d88
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileDefinitions.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_executable(main main.cpp)
+target_compile_definitions(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-DANYTHING>)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-result.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt
new file mode 100644
index 0000000..e9e8e9f
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions-stderr-VS.txt
@@ -0,0 +1,8 @@
+CMake Error at CompileOptions.cmake:5 \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions.cmake
new file mode 100644
index 0000000..6c92abc
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/CompileOptions.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_executable(main main.cpp)
+target_compile_options(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-DANYTHING>)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-result.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt
new file mode 100644
index 0000000..ec15068
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-VS.txt
@@ -0,0 +1,8 @@
+CMake Error at IncludeDirectories.cmake:5 \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-Xcode.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-Xcode.txt
new file mode 100644
index 0000000..fdf92b2
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories-stderr-Xcode.txt
@@ -0,0 +1,9 @@
+CMake Error at IncludeDirectories.cmake:5 \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may only be used with COMPILE_OPTIONS with the
+ Xcode generator.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories.cmake
new file mode 100644
index 0000000..31771f6
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/IncludeDirectories.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_executable(main main.cpp)
+target_include_directories(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:anydir>)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake
new file mode 100644
index 0000000..5e0a5f5
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake
@@ -0,0 +1,20 @@
+include(RunCMake)
+
+if (RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake-stderr-file CompileOptions-stderr-VS.txt)
+ run_cmake(CompileOptions)
+endif()
+if (RunCMake_GENERATOR STREQUAL "Xcode")
+ set(RunCMake-stderr-file CompileDefinitions-stderr-Xcode.txt)
+ run_cmake(CompileDefinitions)
+elseif (RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake-stderr-file CompileDefinitions-stderr-VS.txt)
+ run_cmake(CompileDefinitions)
+endif()
+if (RunCMake_GENERATOR STREQUAL "Xcode")
+ set(RunCMake-stderr-file IncludeDirectories-stderr-Xcode.txt)
+ run_cmake(IncludeDirectories)
+elseif (RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake-stderr-file IncludeDirectories-stderr-VS.txt)
+ run_cmake(IncludeDirectories)
+endif()
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/main.cpp b/Tests/RunCMake/COMPILE_LANGUAGE-genex/main.cpp
new file mode 100644
index 0000000..31a1337
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/main.cpp
@@ -0,0 +1,5 @@
+
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-result.txt b/Tests/RunCMake/ExternalData/BadRecurse1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt
new file mode 100644
index 0000000..aedc330
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Recurse option "RECURSE:" allowed only with directories.
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse1.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1.cmake b/Tests/RunCMake/ExternalData/BadRecurse1.cmake
new file mode 100644
index 0000000..f70b9f9
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Series.txt,:,RECURSE:})
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-result.txt b/Tests/RunCMake/ExternalData/BadRecurse2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt
new file mode 100644
index 0000000..3f809ca
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Recurse option "RECURSE:" allowed only with directories.
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse2.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2.cmake b/Tests/RunCMake/ExternalData/BadRecurse2.cmake
new file mode 100644
index 0000000..c4dc35d
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Data.txt,RECURSE:})
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-result.txt b/Tests/RunCMake/ExternalData/BadRecurse3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt
new file mode 100644
index 0000000..37740e0
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Unknown option "RECURSE:x" in argument
+
+ DATA{Directory1/,RECURSE:x,Data.dat}
+
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse3.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3.cmake b/Tests/RunCMake/ExternalData/BadRecurse3.cmake
new file mode 100644
index 0000000..9a22f62
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Directory1/,RECURSE:x,Data.dat})
diff --git a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
index 241fa1f..b5ab22d 100644
--- a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
@@ -9,6 +9,9 @@ run_cmake(BadCustom4)
run_cmake(BadHashAlgo1)
run_cmake(BadOption1)
run_cmake(BadOption2)
+run_cmake(BadRecurse1)
+run_cmake(BadRecurse2)
+run_cmake(BadRecurse3)
run_cmake(BadSeries1)
run_cmake(BadSeries2)
run_cmake(BadSeries3)
diff --git a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex-result.txt b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake
new file mode 100644
index 0000000..e2b081d
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake
@@ -0,0 +1,12 @@
+
+enable_language(CXX C)
+
+add_library(empty empty.cpp empty.c)
+target_compile_options(empty
+ PRIVATE LANG_IS_$<COMPILE_LANGUAGE>
+)
+
+file(GENERATE
+ OUTPUT opts-$<COMPILE_LANGUAGE>.txt
+ CONTENT "$<TARGET_PROPERTY:empty,COMPILE_OPTIONS>\n"
+)
diff --git a/Tests/RunCMake/File_Generate/OutputConflict-stderr.txt b/Tests/RunCMake/File_Generate/OutputConflict-stderr.txt
index dbd39de..0abb7df 100644
--- a/Tests/RunCMake/File_Generate/OutputConflict-stderr.txt
+++ b/Tests/RunCMake/File_Generate/OutputConflict-stderr.txt
@@ -1,5 +1,5 @@
CMake Error in CMakeLists.txt:
Evaluation file to be written multiple times for different configurations
- with different content:
+ or languages with different content:
.*output.txt
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index 97f93d5..db344ef 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -17,6 +17,16 @@ if (NOT file_contents MATCHES "generated.cpp.rule")
message(SEND_ERROR "Rule file not in target sources! ${file_contents}")
endif()
+if (NOT RunCMake_GENERATOR MATCHES "Visual Studio")
+ run_cmake(COMPILE_LANGUAGE-genex)
+ foreach(l CXX C)
+ file(READ "${RunCMake_BINARY_DIR}/COMPILE_LANGUAGE-genex-build/opts-${l}.txt" l_defs)
+ if (NOT l_defs STREQUAL "LANG_IS_${l}\n")
+ message(FATAL_ERROR "File content does not match: ${l_defs}")
+ endif()
+ endforeach()
+endif()
+
set(timeformat "%Y%j%H%M%S")
file(REMOVE "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt")
diff --git a/Tests/RunCMake/File_Generate/empty.c b/Tests/RunCMake/File_Generate/empty.c
new file mode 100644
index 0000000..563eef0
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/empty.c
@@ -0,0 +1,8 @@
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int empty_c()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/FindMatlab/CMakeLists.txt b/Tests/RunCMake/FindMatlab/CMakeLists.txt
new file mode 100644
index 0000000..1b9a957
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/CMakeLists.txt
@@ -0,0 +1,3 @@
+
+cmake_minimum_required(VERSION 2.8.12)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1-result.txt b/Tests/RunCMake/FindMatlab/MatlabTest1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/MatlabTest1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1-stderr.txt b/Tests/RunCMake/FindMatlab/MatlabTest1-stderr.txt
new file mode 100644
index 0000000..95a787f
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/MatlabTest1-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*FindMatlab.cmake:[0-9]+ \(message\):
+ \[MATLAB\] This functionality needs the MAIN_PROGRAM component \(not default\)
diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake
new file mode 100644
index 0000000..1cbc1c2
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake
@@ -0,0 +1,22 @@
+
+cmake_minimum_required (VERSION 2.8.12)
+enable_testing()
+project(test_should_fail)
+
+find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY)
+
+matlab_add_mex(
+ # target name
+ NAME cmake_matlab_test_wrapper1
+ # output name
+ OUTPUT_NAME cmake_matlab_mex1
+ SRC ${CMAKE_CURRENT_SOURCE_DIR}/matlab_wrapper1.cpp
+ )
+
+# this command should raise a FATAL_ERROR, component MAIN_PROGRAM is missing
+matlab_add_unit_test(
+ NAME ${PROJECT_NAME}_matlabtest-1
+ TIMEOUT 1
+ UNITTEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake_matlab_unit_tests2.m
+ ADDITIONAL_PATH $<TARGET_FILE_DIR:cmake_matlab_test_wrapper1>
+ )
diff --git a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake
new file mode 100644
index 0000000..33dbb77
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+
+include(RunCMake)
+run_cmake(MatlabTest1)
diff --git a/Tests/RunCMake/FindMatlab/cmake_matlab_unit_tests2.m b/Tests/RunCMake/FindMatlab/cmake_matlab_unit_tests2.m
new file mode 100644
index 0000000..7a8a342
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/cmake_matlab_unit_tests2.m
@@ -0,0 +1,6 @@
+
+ret = cmake_matlab_mex1(rand(3,3));
+
+if(size(ret) ~= size(rand(3,3)))
+ error('Dimension mismatch!');
+end
diff --git a/Tests/RunCMake/FindMatlab/matlab_wrapper1.cpp b/Tests/RunCMake/FindMatlab/matlab_wrapper1.cpp
new file mode 100644
index 0000000..4149bb9
--- /dev/null
+++ b/Tests/RunCMake/FindMatlab/matlab_wrapper1.cpp
@@ -0,0 +1,26 @@
+
+// simple workaround to some compiler specific problems
+// see http://stackoverflow.com/questions/22367516/mex-compile-error-unknown-type-name-char16-t/23281916#23281916
+#include <algorithm>
+
+#include "mex.h"
+
+// this test should return a matrix of 10 x 10 and should check some of the arguments
+
+void mexFunction(const int nlhs, mxArray *plhs[], const int nrhs, const mxArray *prhs[])
+{
+ if(nrhs != 1)
+ {
+ mexErrMsgTxt("Incorrect arguments");
+ }
+
+ size_t dim1 = mxGetM(prhs[0]);
+ size_t dim2 = mxGetN(prhs[0]);
+
+ if(dim1 == 1 || dim2 == 1)
+ {
+ mexErrMsgIdAndTxt("cmake_matlab:configuration", "Incorrect arguments");
+ }
+
+ plhs[0] = mxCreateNumericMatrix(dim1, dim2, mxGetClassID(prhs[0]), mxREAL);
+}
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt
new file mode 100644
index 0000000..789b4d0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-add_custom_command.cmake:6 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake
new file mode 100644
index 0000000..f4ba261
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake
@@ -0,0 +1,8 @@
+
+enable_language(C)
+
+add_library(empty empty.c)
+
+add_custom_command(TARGET empty PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<COMPILE_LANGUAGE>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt
new file mode 100644
index 0000000..400fbc0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-add_custom_target.cmake:4 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake
new file mode 100644
index 0000000..4102623
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake
@@ -0,0 +1,6 @@
+
+enable_language(C)
+
+add_custom_target(empty
+ COMMAND ${CMAKE_COMMAND} -E echo $<COMPILE_LANGUAGE>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt
new file mode 100644
index 0000000..e45bb02
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-add_executable.cmake:4 \(add_executable\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake
new file mode 100644
index 0000000..5c2ff35
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+
+add_executable(empty empty.$<COMPILE_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt
new file mode 100644
index 0000000..c9ee6fe
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-add_library.cmake:4 \(add_library\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake
new file mode 100644
index 0000000..dd9f824
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+
+add_library(empty empty.$<COMPILE_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt
new file mode 100644
index 0000000..9955f5d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-add_test.cmake:5 \(add_test\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake
new file mode 100644
index 0000000..deedf65
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake
@@ -0,0 +1,5 @@
+
+include(CTest)
+enable_testing()
+
+add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<COMPILE_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt
new file mode 100644
index 0000000..eca700f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake
new file mode 100644
index 0000000..92c20e3
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake
@@ -0,0 +1,5 @@
+
+install(FILES
+ empty.$<COMPILE_LANGUAGE>
+ DESTINATION src
+)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt
new file mode 100644
index 0000000..2d324e2
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at COMPILE_LANGUAGE-target_sources.cmake:5 \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories
+ compile definitions, compile options and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake
new file mode 100644
index 0000000..0c78acd
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake
@@ -0,0 +1,5 @@
+
+enable_language(C)
+
+add_library(empty empty.c)
+target_sources(empty PRIVATE empty.$<COMPILE_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-stderr.txt
new file mode 100644
index 0000000..444da45
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at COMPILE_LANGUAGE-unknown-lang.cmake:4 \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> Unknown language.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake
new file mode 100644
index 0000000..cec12a3
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_options(empty PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wall>)
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 6c32393..542b7fc 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -16,6 +16,14 @@ run_cmake(NonValidTarget-C_COMPILER_VERSION)
run_cmake(NonValidTarget-CXX_COMPILER_VERSION)
run_cmake(NonValidTarget-TARGET_PROPERTY)
run_cmake(NonValidTarget-TARGET_POLICY)
+run_cmake(COMPILE_LANGUAGE-add_custom_target)
+run_cmake(COMPILE_LANGUAGE-add_custom_command)
+run_cmake(COMPILE_LANGUAGE-install)
+run_cmake(COMPILE_LANGUAGE-target_sources)
+run_cmake(COMPILE_LANGUAGE-add_executable)
+run_cmake(COMPILE_LANGUAGE-add_library)
+run_cmake(COMPILE_LANGUAGE-add_test)
+run_cmake(COMPILE_LANGUAGE-unknown-lang)
if(LINKER_SUPPORTS_PDB)
run_cmake(NonValidTarget-TARGET_PDB_FILE)
diff --git a/Tests/RunCMake/Ninja/CMP0058-NEW-by-build-stdout.txt b/Tests/RunCMake/Ninja/CMP0058-NEW-by-build-stdout.txt
new file mode 100644
index 0000000..8646a13
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-NEW-by-build-stdout.txt
@@ -0,0 +1,4 @@
+^[^
+]* Generating output1
+[^
+]* Generating output2$
diff --git a/Tests/RunCMake/Ninja/CMP0058-NEW-by.cmake b/Tests/RunCMake/Ninja/CMP0058-NEW-by.cmake
new file mode 100644
index 0000000..0f77930
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-NEW-by.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0058 NEW)
+set(byproducts BYPRODUCTS byproduct1a byproduct1b)
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-result.txt b/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-stderr.txt
new file mode 100644
index 0000000..fa10109
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-NEW-no-build-stderr.txt
@@ -0,0 +1 @@
+ninja: error: 'byproduct1a', needed by 'output2', missing and no known rule to make it
diff --git a/Tests/RunCMake/Ninja/CMP0058-NEW-no.cmake b/Tests/RunCMake/Ninja/CMP0058-NEW-no.cmake
new file mode 100644
index 0000000..582e3d5
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-NEW-no.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0058 NEW)
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-build-stdout.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-build-stdout.txt
new file mode 100644
index 0000000..8646a13
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-build-stdout.txt
@@ -0,0 +1,4 @@
+^[^
+]* Generating output1
+[^
+]* Generating output2$
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
new file mode 100644
index 0000000..92a3a0f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0058 OLD)
+set(byproducts BYPRODUCTS byproduct1a byproduct1b)
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-build-stdout.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-build-stdout.txt
new file mode 100644
index 0000000..8646a13
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-build-stdout.txt
@@ -0,0 +1,4 @@
+^[^
+]* Generating output1
+[^
+]* Generating output2$
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
new file mode 100644
index 0000000..0326e07
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0058 OLD)
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-build-stdout.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-build-stdout.txt
new file mode 100644
index 0000000..8646a13
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-build-stdout.txt
@@ -0,0 +1,4 @@
+^[^
+]* Generating output1
+[^
+]* Generating output2$
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
new file mode 100644
index 0000000..6128167
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
@@ -0,0 +1,2 @@
+set(byproducts BYPRODUCTS byproduct1a byproduct1b)
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-build-stdout.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-build-stdout.txt
new file mode 100644
index 0000000..8646a13
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-build-stdout.txt
@@ -0,0 +1,4 @@
+^[^
+]* Generating output1
+[^
+]* Generating output2$
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
new file mode 100644
index 0000000..439a2d9
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
@@ -0,0 +1,19 @@
+^CMake Warning \(dev\):
+ Policy CMP0058 is not set: Ninja requires custom command byproducts to be
+ explicit. Run "cmake --help-policy CMP0058" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ This project specifies custom command DEPENDS on files in the build tree
+ that are not specified as the OUTPUT or BYPRODUCTS of any
+ add_custom_command or add_custom_target:
+
+ byproduct1a
+ byproduct1b
+
+ For compatibility with versions of CMake that did not have the BYPRODUCTS
+ option, CMake is generating phony rules for such files to convince 'ninja'
+ to build.
+
+ Project authors should add the missing BYPRODUCTS or OUTPUT options to the
+ custom commands that produce these files.
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
new file mode 100644
index 0000000..7bc66ef
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
@@ -0,0 +1 @@
+include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-common.cmake b/Tests/RunCMake/Ninja/CMP0058-common.cmake
new file mode 100644
index 0000000..9274d58
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-common.cmake
@@ -0,0 +1,17 @@
+add_custom_command(
+ OUTPUT output1
+ ${byproducts}
+ COMMAND ${CMAKE_COMMAND} -E touch output1
+ COMMAND ${CMAKE_COMMAND} -E touch byproduct1a
+ COMMAND ${CMAKE_COMMAND} -E touch byproduct1b
+ )
+add_custom_target(Drive1 ALL DEPENDS output1)
+add_custom_command(
+ OUTPUT output2
+ COMMAND ${CMAKE_COMMAND} -E copy output1 output2
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output1
+ ${CMAKE_CURRENT_BINARY_DIR}/byproduct1a
+ ${CMAKE_CURRENT_BINARY_DIR}/byproduct1b
+ )
+add_custom_target(Drive2 ALL DEPENDS output2)
+add_dependencies(Drive2 Drive1)
diff --git a/Tests/RunCMake/Ninja/CMakeLists.txt b/Tests/RunCMake/Ninja/CMakeLists.txt
new file mode 100644
index 0000000..2a0591e
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.2)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
new file mode 100644
index 0000000..64f97bc
--- /dev/null
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -0,0 +1,18 @@
+include(RunCMake)
+
+function(run_CMP0058 case)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0058-${case}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(CMP0058-${case})
+ run_cmake_command(CMP0058-${case}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+run_CMP0058(OLD-no)
+run_CMP0058(OLD-by)
+run_CMP0058(WARN-no)
+run_CMP0058(WARN-by)
+run_CMP0058(NEW-no)
+run_CMP0058(NEW-by)
diff --git a/Tests/RunCMake/configure_file/BadArg-result.txt b/Tests/RunCMake/configure_file/BadArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/BadArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/configure_file/BadArg-stderr.txt b/Tests/RunCMake/configure_file/BadArg-stderr.txt
new file mode 100644
index 0000000..4567d3f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/BadArg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BadArg.cmake:[0-9]+ \(configure_file\):
+ configure_file called with incorrect number of arguments, expected 2
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/CMakeTests/ConfigureFile-BadArg.cmake b/Tests/RunCMake/configure_file/BadArg.cmake
index 769fae1..769fae1 100644
--- a/Tests/CMakeTests/ConfigureFile-BadArg.cmake
+++ b/Tests/RunCMake/configure_file/BadArg.cmake
diff --git a/Tests/RunCMake/configure_file/DirInput-result.txt b/Tests/RunCMake/configure_file/DirInput-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/DirInput-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/configure_file/DirInput-stderr.txt b/Tests/RunCMake/configure_file/DirInput-stderr.txt
new file mode 100644
index 0000000..2e0cd14
--- /dev/null
+++ b/Tests/RunCMake/configure_file/DirInput-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at DirInput.cmake:[0-9]+ \(configure_file\):
+ configure_file input location
+
+ .*/Tests/RunCMake/configure_file/.
+
+ is a directory but a file was expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/CMakeTests/ConfigureFile-DirInput.cmake b/Tests/RunCMake/configure_file/DirInput.cmake
index 920ea28..920ea28 100644
--- a/Tests/CMakeTests/ConfigureFile-DirInput.cmake
+++ b/Tests/RunCMake/configure_file/DirInput.cmake
diff --git a/Tests/RunCMake/configure_file/DirOutput-stderr.txt b/Tests/RunCMake/configure_file/DirOutput-stderr.txt
new file mode 100644
index 0000000..d051f7c
--- /dev/null
+++ b/Tests/RunCMake/configure_file/DirOutput-stderr.txt
@@ -0,0 +1 @@
+^DirOutput test file$
diff --git a/Tests/RunCMake/configure_file/DirOutput.cmake b/Tests/RunCMake/configure_file/DirOutput.cmake
new file mode 100644
index 0000000..aa0fadf
--- /dev/null
+++ b/Tests/RunCMake/configure_file/DirOutput.cmake
@@ -0,0 +1,4 @@
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DirOutput)
+configure_file(DirOutput.txt DirOutput)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/DirOutput/DirOutput.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/configure_file/DirOutput.txt b/Tests/RunCMake/configure_file/DirOutput.txt
new file mode 100644
index 0000000..16388a6
--- /dev/null
+++ b/Tests/RunCMake/configure_file/DirOutput.txt
@@ -0,0 +1 @@
+DirOutput test file
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-result.txt b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-stderr.txt b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-stderr.txt
new file mode 100644
index 0000000..3f66909
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NewLineStyle-COPYONLY.cmake:[0-9]+ \(configure_file\):
+ configure_file COPYONLY could not be used in combination with NEWLINE_STYLE
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/CMakeTests/ConfigureFile-NewLineStyle-COPYONLY.cmake b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY.cmake
index 3b09eb0..c07b8f5 100644
--- a/Tests/CMakeTests/ConfigureFile-NewLineStyle-COPYONLY.cmake
+++ b/Tests/RunCMake/configure_file/NewLineStyle-COPYONLY.cmake
@@ -1,3 +1,3 @@
-set(file_name ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-NewLineStyle.txt)
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
file(WRITE ${file_name} "Data\n")
configure_file(${file_name} ${file_name}.out COPYONLY NEWLINE_STYLE DOS)
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-NoArg-result.txt b/Tests/RunCMake/configure_file/NewLineStyle-NoArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-NoArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-NoArg-stderr.txt b/Tests/RunCMake/configure_file/NewLineStyle-NoArg-stderr.txt
new file mode 100644
index 0000000..3652657
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-NoArg-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at NewLineStyle-NoArg.cmake:[0-9]+ \(configure_file\):
+ configure_file NEWLINE_STYLE must set a style: LF, CRLF, UNIX, DOS, or
+ WIN32
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/CMakeTests/ConfigureFile-NewLineStyle-NoArg.cmake b/Tests/RunCMake/configure_file/NewLineStyle-NoArg.cmake
index 133a67a..b35bde1 100644
--- a/Tests/CMakeTests/ConfigureFile-NewLineStyle-NoArg.cmake
+++ b/Tests/RunCMake/configure_file/NewLineStyle-NoArg.cmake
@@ -1,3 +1,3 @@
-set(file_name ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-NewLineStyle.txt)
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
file(WRITE ${file_name} "Data\n")
configure_file(${file_name} ${file_name}.out NEWLINE_STYLE)
diff --git a/Tests/CMakeTests/ConfigureFile-NewLineStyle-ValidArg.cmake b/Tests/RunCMake/configure_file/NewLineStyle-ValidArg.cmake
index b7e619c..8d9f474 100644
--- a/Tests/CMakeTests/ConfigureFile-NewLineStyle-ValidArg.cmake
+++ b/Tests/RunCMake/configure_file/NewLineStyle-ValidArg.cmake
@@ -1,4 +1,4 @@
-set(file_name ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-NewLineStyle.txt)
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
function(test_eol style in out)
file(WRITE ${file_name} "${in}")
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-result.txt b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-stderr.txt b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-stderr.txt
new file mode 100644
index 0000000..0d6855f
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at NewLineStyle-WrongArg.cmake:[0-9]+ \(configure_file\):
+ configure_file NEWLINE_STYLE sets an unknown style, only LF, CRLF, UNIX,
+ DOS, and WIN32 are supported
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/CMakeTests/ConfigureFile-NewLineStyle-WrongArg.cmake b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg.cmake
index e8887c1..3ae906d 100644
--- a/Tests/CMakeTests/ConfigureFile-NewLineStyle-WrongArg.cmake
+++ b/Tests/RunCMake/configure_file/NewLineStyle-WrongArg.cmake
@@ -1,3 +1,3 @@
-set(file_name ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureFile-NewLineStyle.txt)
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
file(WRITE ${file_name} "Data\n")
configure_file(${file_name} ${file_name}.out NEWLINE_STYLE FOO)
diff --git a/Tests/RunCMake/configure_file/Relative-In.txt b/Tests/RunCMake/configure_file/Relative-In.txt
new file mode 100644
index 0000000..572fe53
--- /dev/null
+++ b/Tests/RunCMake/configure_file/Relative-In.txt
@@ -0,0 +1 @@
+Relative test file
diff --git a/Tests/RunCMake/configure_file/Relative-stderr.txt b/Tests/RunCMake/configure_file/Relative-stderr.txt
new file mode 100644
index 0000000..b94de0d
--- /dev/null
+++ b/Tests/RunCMake/configure_file/Relative-stderr.txt
@@ -0,0 +1 @@
+^Relative test file$
diff --git a/Tests/RunCMake/configure_file/Relative.cmake b/Tests/RunCMake/configure_file/Relative.cmake
new file mode 100644
index 0000000..085991c
--- /dev/null
+++ b/Tests/RunCMake/configure_file/Relative.cmake
@@ -0,0 +1,3 @@
+configure_file(Relative-In.txt Relative-Out.txt)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/Relative-Out.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
index 489652b..de14468 100644
--- a/Tests/RunCMake/configure_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
@@ -7,6 +7,14 @@ run_cmake(UTF16BE-BOM)
run_cmake(UTF32LE-BOM)
run_cmake(UTF32BE-BOM)
run_cmake(UnknownArg)
+run_cmake(DirInput)
+run_cmake(DirOutput)
+run_cmake(Relative)
+run_cmake(BadArg)
+run_cmake(NewLineStyle-NoArg)
+run_cmake(NewLineStyle-WrongArg)
+run_cmake(NewLineStyle-ValidArg)
+run_cmake(NewLineStyle-COPYONLY)
if(RunCMake_GENERATOR MATCHES "Make")
# Use a single build tree for a few tests without cleaning.
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-result.txt b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-stderr.txt b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-stderr.txt
new file mode 100644
index 0000000..9629cfd
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg-stderr.txt
@@ -0,0 +1 @@
+.*file LIST_DIRECTORIES missing bool value\.
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg.cmake b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg.cmake
new file mode 100644
index 0000000..a8e15f2
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-no-arg.cmake
@@ -0,0 +1 @@
+file(GLOB CONTENT_LIST LIST_DIRECTORIES)
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-result.txt b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-stderr.txt b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-stderr.txt
new file mode 100644
index 0000000..9629cfd
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean-stderr.txt
@@ -0,0 +1 @@
+.*file LIST_DIRECTORIES missing bool value\.
diff --git a/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean.cmake b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean.cmake
new file mode 100644
index 0000000..f735433
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-error-LIST_DIRECTORIES-not-boolean.cmake
@@ -0,0 +1 @@
+file(GLOB CONTENT_LIST LIST_DIRECTORIES 13)
diff --git a/Tests/RunCMake/file/GLOB-stderr.txt b/Tests/RunCMake/file/GLOB-stderr.txt
new file mode 100644
index 0000000..c47dc40
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB-stderr.txt
@@ -0,0 +1,6 @@
+content: 6[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 1/empty_dir;.*/test/dir 1/non_empty_dir;.*/test/dir 2/dir 2 file;.*/test/dir 2/empty_dir;.*/test/dir 2/non_empty_dir
+content: 6[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 1/empty_dir;.*/test/dir 1/non_empty_dir;.*/test/dir 2/dir 2 file;.*/test/dir 2/empty_dir;.*/test/dir 2/non_empty_dir
+content: 2[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 2/dir 2 file
diff --git a/Tests/RunCMake/file/GLOB.cmake b/Tests/RunCMake/file/GLOB.cmake
new file mode 100644
index 0000000..3d577e3
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB.cmake
@@ -0,0 +1,28 @@
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/non_empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/non_empty_dir")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/dir 1 file" "test file")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/non_empty_dir/dir 1 subdir file" "test file")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/dir 2 file" "test file")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/non_empty_dir/dir 2 subdir file" "test file")
+
+file(GLOB CONTENT_LIST "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB CONTENT_LIST LIST_DIRECTORIES true "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB CONTENT_LIST LIST_DIRECTORIES false "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
diff --git a/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion-stderr.txt b/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion-stderr.txt
new file mode 100644
index 0000000..f73aa83
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion-stderr.txt
@@ -0,0 +1,15 @@
+.*Cyclic recursion detected while globbing for.*
+.*/test/depth1/depth2/depth3.*
+.*/test/depth1/depth2/depth3/recursion.*
+content: 4[ ]
+.*/test/abc;.*/test/depth1/depth2/depth3/file_symlink;.*/test/depth1/depth2/depth3/recursion/abc;.*/test/depth1/depth2/depth3/recursion/depth1/depth2/depth3/file_symlink
+.*Cyclic recursion detected while globbing for.*
+.*/test/depth1/depth2/depth3.*
+.*/test/depth1/depth2/depth3/recursion.*
+content: 4[ ]
+.*/test/abc;.*/test/depth1/depth2/depth3/file_symlink;.*/test/depth1/depth2/depth3/recursion/abc;.*/test/depth1/depth2/depth3/recursion/depth1/depth2/depth3/file_symlink
+.*Cyclic recursion detected while globbing for.*
+.*/test/depth1/depth2/depth3.*
+.*/test/depth1/depth2/depth3/recursion.*
+content: 11[ ]
+.*/test/abc;.*/test/depth1;.*/test/depth1/depth2;.*/test/depth1/depth2/depth3;.*/test/depth1/depth2/depth3/file_symlink;.*/test/depth1/depth2/depth3/recursion;.*/test/depth1/depth2/depth3/recursion/abc;.*/test/depth1/depth2/depth3/recursion/depth1;.*/test/depth1/depth2/depth3/recursion/depth1/depth2;.*/test/depth1/depth2/depth3/recursion/depth1/depth2/depth3;.*/test/depth1/depth2/depth3/recursion/depth1/depth2/depth3/file_symlink
diff --git a/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion.cmake b/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion.cmake
new file mode 100644
index 0000000..a8c6784
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB_RECURSE-cyclic-recursion.cmake
@@ -0,0 +1,23 @@
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/depth1/depth2/depth3")
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/test" "${CMAKE_CURRENT_BINARY_DIR}/test/depth1/depth2/depth3/recursion")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/abc" "message to write")
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/test/abc" "${CMAKE_CURRENT_BINARY_DIR}/test/depth1/depth2/depth3/file_symlink")
+
+file(GLOB_RECURSE CONTENT_LIST FOLLOW_SYMLINKS "${CMAKE_CURRENT_BINARY_DIR}/test/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB_RECURSE CONTENT_LIST LIST_DIRECTORIES false FOLLOW_SYMLINKS "${CMAKE_CURRENT_BINARY_DIR}/test/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB_RECURSE CONTENT_LIST LIST_DIRECTORIES true FOLLOW_SYMLINKS "${CMAKE_CURRENT_BINARY_DIR}/test/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
diff --git a/Tests/RunCMake/file/GLOB_RECURSE-stderr.txt b/Tests/RunCMake/file/GLOB_RECURSE-stderr.txt
new file mode 100644
index 0000000..5d48e47
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB_RECURSE-stderr.txt
@@ -0,0 +1,6 @@
+content: 4[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 1/non_empty_dir/dir 1 subdir file;.*/test/dir 2/dir 2 file;.*/test/dir 2/non_empty_dir/dir 2 subdir file
+content: 4[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 1/non_empty_dir/dir 1 subdir file;.*/test/dir 2/dir 2 file;.*/test/dir 2/non_empty_dir/dir 2 subdir file
+content: 8[ ]
+.*/test/dir 1/dir 1 file;.*/test/dir 1/empty_dir;.*/test/dir 1/non_empty_dir;.*/test/dir 1/non_empty_dir/dir 1 subdir file;.*/test/dir 2/dir 2 file;.*/test/dir 2/empty_dir;.*/test/dir 2/non_empty_dir;.*/test/dir 2/non_empty_dir/dir 2 subdir file
diff --git a/Tests/RunCMake/file/GLOB_RECURSE.cmake b/Tests/RunCMake/file/GLOB_RECURSE.cmake
new file mode 100644
index 0000000..6db377b
--- /dev/null
+++ b/Tests/RunCMake/file/GLOB_RECURSE.cmake
@@ -0,0 +1,28 @@
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/non_empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/empty_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/non_empty_dir")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/dir 1 file" "test file")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 1/non_empty_dir/dir 1 subdir file" "test file")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/dir 2 file" "test file")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test/dir 2/non_empty_dir/dir 2 subdir file" "test file")
+
+file(GLOB_RECURSE CONTENT_LIST "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB_RECURSE CONTENT_LIST LIST_DIRECTORIES false "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
+
+file(GLOB_RECURSE CONTENT_LIST LIST_DIRECTORIES true "${CMAKE_CURRENT_BINARY_DIR}/test/*/*")
+list(LENGTH CONTENT_LIST CONTENT_COUNT)
+message("content: ${CONTENT_COUNT} ")
+list(SORT CONTENT_LIST)
+message("${CONTENT_LIST}")
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 14819e7..d3dfb1b 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -17,3 +17,13 @@ run_cmake(LOCK-error-no-result-variable)
run_cmake(LOCK-error-no-timeout)
run_cmake(LOCK-error-timeout)
run_cmake(LOCK-error-unknown-option)
+run_cmake(GLOB)
+run_cmake(GLOB_RECURSE)
+# test is valid both for GLOB and GLOB_RECURSE
+run_cmake(GLOB-error-LIST_DIRECTORIES-not-boolean)
+# test is valid both for GLOB and GLOB_RECURSE
+run_cmake(GLOB-error-LIST_DIRECTORIES-no-arg)
+
+if(NOT WIN32 OR CYGWIN)
+ run_cmake(GLOB_RECURSE-cyclic-recursion)
+endif()
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
index 08e81c6..201daa7 100644
--- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
@@ -7,5 +7,4 @@ run_cmake(whitelist)
run_cmake(invalid_signature)
run_cmake(global-interface)
run_cmake(genex_link)
-run_cmake(add_dependencies)
run_cmake(add_custom_command-TARGET)
diff --git a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt b/Tests/RunCMake/interface_library/add_dependencies-stderr.txt
deleted file mode 100644
index c550b68..0000000
--- a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error at add_dependencies.cmake:4 \(add_dependencies\):
- add_dependencies Cannot add target-level dependencies to INTERFACE library
- target "iface".
-
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/add_dependencies.cmake b/Tests/RunCMake/interface_library/add_dependencies.cmake
deleted file mode 100644
index 12cdfb4..0000000
--- a/Tests/RunCMake/interface_library/add_dependencies.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-add_library(foo empty.cpp)
-add_library(iface INTERFACE)
-add_dependencies(iface foo)
diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt
new file mode 100644
index 0000000..e866623
--- /dev/null
+++ b/Tests/XCTest/CMakeLists.txt
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 3.1)
+project(XCTest)
+enable_testing()
+
+find_package(XCTest REQUIRED)
+
+# Framework
+
+add_library(FrameworkExample SHARED
+ FrameworkExample/FrameworkExample.c
+ FrameworkExample/FrameworkExample.h
+ FrameworkExample/Info.plist)
+
+target_include_directories(FrameworkExample PUBLIC .)
+
+set_target_properties(FrameworkExample PROPERTIES
+ FRAMEWORK TRUE
+ VERSION "1.0.0"
+ SOVERSION "1.0.0"
+ FRAMEWORK_VERSION "A"
+ MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist
+ PUBLIC_HEADER FrameworkExample/FrameworkExample.h)
+
+# XCTest for Framework
+
+xctest_add_bundle(FrameworkExampleTests FrameworkExample
+ FrameworkExampleTests/FrameworkExampleTests.m
+ FrameworkExampleTests/Info.plist)
+
+set_target_properties(FrameworkExampleTests PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist
+ )
+
+xctest_add_test(XCTest.FrameworkExample FrameworkExampleTests)
+
+# Cocoa App Bundle
+
+add_executable(CocoaExample MACOSX_BUNDLE
+ CocoaExample/main.m
+ CocoaExample/AppDelegate.m
+ CocoaExample/AppDelegate.h
+ CocoaExample/MainMenu.xib
+)
+
+target_link_libraries(CocoaExample PRIVATE "-framework Foundation")
+target_link_libraries(CocoaExample PRIVATE "-framework AppKit")
+
+set_target_properties(CocoaExample PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist
+ RESOURCE "CocoaExample/MainMenu.xib")
+
+# XCTest for Cocoa App Bundle
+
+xctest_add_bundle(CocoaExampleTests CocoaExample
+ CocoaExampleTests/CocoaExampleTests.m)
+
+xctest_add_test(XCTest.CocoaExample CocoaExampleTests)
diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h
new file mode 100644
index 0000000..4bf4101
--- /dev/null
+++ b/Tests/XCTest/CocoaExample/AppDelegate.h
@@ -0,0 +1,6 @@
+#import <Cocoa/Cocoa.h>
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+
+
+@end
diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m
new file mode 100644
index 0000000..07af62f
--- /dev/null
+++ b/Tests/XCTest/CocoaExample/AppDelegate.m
@@ -0,0 +1,18 @@
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@property (assign) IBOutlet NSWindow *window;
+@end
+
+@implementation AppDelegate
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+ // Insert code here to initialize your application
+}
+
+- (void)applicationWillTerminate:(NSNotification *)aNotification {
+ // Insert code here to tear down your application
+}
+
+@end
diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist
new file mode 100644
index 0000000..5267c63
--- /dev/null
+++ b/Tests/XCTest/CocoaExample/Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>CocoaExample</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>org.cmake.CocoaExample</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>CocoaExample</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib
new file mode 100644
index 0000000..9498a0a
--- /dev/null
+++ b/Tests/XCTest/CocoaExample/MainMenu.xib
@@ -0,0 +1,680 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6233" systemVersion="14A329f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6233"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
+ <connections>
+ <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+ <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider="">
+ <connections>
+ <outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
+ </connections>
+ </customObject>
+ <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
+ <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
+ <items>
+ <menuItem title="CocoaExample" id="1Xt-HY-uBw">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="CocoaExample" systemMenu="apple" id="uQy-DD-JDr">
+ <items>
+ <menuItem title="About CocoaExample" id="5kV-Vb-QxS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
+ <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
+ <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
+ <menuItem title="Services" id="NMo-om-nkz">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
+ <menuItem title="Hide CocoaExample" keyEquivalent="h" id="Olw-nP-bQN">
+ <connections>
+ <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Show All" id="Kd2-mp-pUS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
+ <menuItem title="Quit CocoaExample" keyEquivalent="q" id="4sb-4s-VLi">
+ <connections>
+ <action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="File" id="dMs-cI-mzQ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="File" id="bib-Uj-vzu">
+ <items>
+ <menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
+ <connections>
+ <action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
+ <connections>
+ <action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open Recent" id="tXI-mr-wws">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
+ <items>
+ <menuItem title="Clear Menu" id="vNY-rz-j42">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
+ <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
+ <connections>
+ <action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
+ <connections>
+ <action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
+ <connections>
+ <action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Revert to Saved" id="KaW-ft-85H">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
+ <menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
+ <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+ <connections>
+ <action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
+ <connections>
+ <action selector="print:" target="-1" id="qaZ-4w-aoO"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Edit" id="5QF-Oa-p0T">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Edit" id="W48-6f-4Dl">
+ <items>
+ <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
+ <connections>
+ <action selector="undo:" target="-1" id="M6e-cu-g7V"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
+ <connections>
+ <action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
+ <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
+ <connections>
+ <action selector="cut:" target="-1" id="YJe-68-I9s"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
+ <connections>
+ <action selector="copy:" target="-1" id="G1f-GL-Joy"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
+ <connections>
+ <action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Delete" id="pa3-QI-u2k">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
+ <connections>
+ <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
+ <menuItem title="Find" id="4EN-yA-p0u">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Find" id="1b7-l0-nxx">
+ <items>
+ <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
+ <connections>
+ <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
+ <connections>
+ <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
+ <connections>
+ <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
+ <connections>
+ <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
+ <connections>
+ <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
+ <items>
+ <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
+ <connections>
+ <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
+ <connections>
+ <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
+ <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Substitutions" id="9ic-FL-obx">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
+ <items>
+ <menuItem title="Show Substitutions" id="z6F-FW-3nz">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
+ <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Quotes" id="hQb-2v-fYv">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Dashes" id="rgM-f4-ycn">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Links" id="cwL-P1-jid">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Data Detectors" id="tRr-pd-1PS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Text Replacement" id="HFQ-gK-NFA">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Transformations" id="2oI-Rn-ZJC">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
+ <items>
+ <menuItem title="Make Upper Case" id="vmV-6d-7jI">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Make Lower Case" id="d9M-CD-aMd">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Capitalize" id="UEZ-Bs-lqG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Speech" id="xrE-MZ-jX0">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
+ <items>
+ <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Format" id="jxT-CU-nIS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Format" id="GEO-Iw-cKr">
+ <items>
+ <menuItem title="Font" id="Gi5-1S-RQB">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
+ <items>
+ <menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
+ <connections>
+ <action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
+ <connections>
+ <action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
+ <connections>
+ <action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
+ <connections>
+ <action selector="underline:" target="-1" id="FYS-2b-JAY"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
+ <menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
+ <connections>
+ <action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
+ <connections>
+ <action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
+ <menuItem title="Kern" id="jBQ-r6-VK2">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Kern" id="tlD-Oa-oAM">
+ <items>
+ <menuItem title="Use Default" id="GUa-eO-cwY">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use None" id="cDB-IK-hbR">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Tighten" id="46P-cB-AYj">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Loosen" id="ogc-rX-tC1">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Ligatures" id="o6e-r0-MWq">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
+ <items>
+ <menuItem title="Use Default" id="agt-UL-0e3">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use None" id="J7y-lM-qPV">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use All" id="xQD-1f-W4t">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Baseline" id="OaQ-X3-Vso">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Baseline" id="ijk-EB-dga">
+ <items>
+ <menuItem title="Use Default" id="3Om-Ey-2VK">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Superscript" id="Rqc-34-cIF">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Subscript" id="I0S-gh-46l">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Raise" id="2h7-ER-AoG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Lower" id="1tx-W0-xDw">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
+ <menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
+ <connections>
+ <action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
+ <menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Text" id="Fal-I4-PZk">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Text" id="d9c-me-L2H">
+ <items>
+ <menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
+ <connections>
+ <action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
+ <connections>
+ <action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Justify" id="J5U-5w-g23">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
+ <connections>
+ <action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
+ <menuItem title="Writing Direction" id="H1b-Si-o9J">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
+ <items>
+ <menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ </menuItem>
+ <menuItem id="YGs-j5-SAR">
+ <string key="title"> Default</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
+ </connections>
+ </menuItem>
+ <menuItem id="Lbh-J2-qVU">
+ <string key="title"> Left to Right</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
+ </connections>
+ </menuItem>
+ <menuItem id="jFq-tB-4Kx">
+ <string key="title"> Right to Left</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
+ <menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ </menuItem>
+ <menuItem id="Nop-cj-93Q">
+ <string key="title"> Default</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
+ </connections>
+ </menuItem>
+ <menuItem id="BgM-ve-c93">
+ <string key="title"> Left to Right</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
+ </connections>
+ </menuItem>
+ <menuItem id="RB4-Sm-HuC">
+ <string key="title"> Right to Left</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
+ <menuItem title="Show Ruler" id="vLm-3I-IUL">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="View" id="H8h-7b-M4v">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="View" id="HyV-fh-RgO">
+ <items>
+ <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Window" id="aUF-d1-5bR">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
+ <items>
+ <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
+ <connections>
+ <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Zoom" id="R4o-n2-Eq4">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
+ <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Help" id="wpr-3q-Mcd">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
+ <items>
+ <menuItem title="CocoaExample Help" keyEquivalent="?" id="FKE-Sm-Kum">
+ <connections>
+ <action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ <window title="CocoaExample" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+ <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <rect key="contentRect" x="335" y="390" width="480" height="360"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
+ <view key="contentView" id="EiT-Mj-1SZ">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </view>
+ </window>
+ </objects>
+</document>
diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m
new file mode 100644
index 0000000..8a6799b
--- /dev/null
+++ b/Tests/XCTest/CocoaExample/main.m
@@ -0,0 +1,5 @@
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, const char * argv[]) {
+ return NSApplicationMain(argc, argv);
+}
diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m
new file mode 100644
index 0000000..70d61d6
--- /dev/null
+++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m
@@ -0,0 +1,13 @@
+#import <XCTest/XCTest.h>
+
+@interface CocoaExampleTests : XCTestCase
+
+@end
+
+@implementation CocoaExampleTests
+
+- (void)testExample {
+ XCTAssert(YES, @"Pass");
+}
+
+@end
diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c
new file mode 100644
index 0000000..2da78da
--- /dev/null
+++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c
@@ -0,0 +1,6 @@
+#include "FrameworkExample.h"
+
+int FourtyTwo()
+{
+ return 42;
+}
diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h
new file mode 100644
index 0000000..2e0b499
--- /dev/null
+++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h
@@ -0,0 +1 @@
+int FourtyTwo();
diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist
new file mode 100644
index 0000000..a22acea
--- /dev/null
+++ b/Tests/XCTest/FrameworkExample/Info.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>FrameworkExample</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.cmake.FrameworkExample</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>FrameworkExample</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string></string>
+ <key>NSHumanReadableCopyright</key>
+ <string></string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m
new file mode 100644
index 0000000..7cba23e
--- /dev/null
+++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m
@@ -0,0 +1,16 @@
+#import <XCTest/XCTest.h>
+
+#import "FrameworkExample/FrameworkExample.h"
+
+@interface FrameworkExampleTests : XCTestCase
+
+@end
+
+@implementation FrameworkExampleTests
+
+- (void)testFourtyTwo {
+ // This is an example of a functional test case.
+ XCTAssertEqual(42, FourtyTwo());
+}
+
+@end
diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist
new file mode 100644
index 0000000..293921b
--- /dev/null
+++ b/Tests/XCTest/FrameworkExampleTests/Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>FrameworkExampleTests</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.cmake.FrameworkExampleTests</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>FrameworkExampleTests</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>