diff options
Diffstat (limited to 'Tests')
35 files changed, 309 insertions, 126 deletions
diff --git a/Tests/CMakeInstall.cmake b/Tests/CMakeInstall.cmake index f141b53..dabc852 100644 --- a/Tests/CMakeInstall.cmake +++ b/Tests/CMakeInstall.cmake @@ -33,7 +33,7 @@ if(CMake_TEST_INSTALL) add_test(CMake.Install ${CMake_TEST_INSTALL_CTest} ${CMake_TEST_INSTALL_CONFIG} - --build-and-test ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} + --build-and-test ${CMake_SOURCE_DIR} ${CMake_BINARY_DIR} --build-generator ${CMAKE_GENERATOR} # Not CMAKE_TEST_GENERATOR --build-project CMake --build-makeprogram ${CMAKE_MAKE_PROGRAM} # Not CMAKE_TEST_MAKEPROGRAM diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2c7056d..c056e86 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -129,6 +129,9 @@ IF(BUILD_TESTING) ADD_TEST_MACRO(MathTest MathTest) ADD_TEST_MACRO(Simple Simple) ADD_TEST_MACRO(PreOrder PreOrder) + ADD_TEST_MACRO(MissingSourceFile MissingSourceFile) + SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES + PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file \"MissingSourceFile.c\"") ADD_TEST_MACRO(COnly COnly) ADD_TEST_MACRO(CxxOnly CxxOnly) ADD_TEST_MACRO(IPO COnly/COnly) @@ -150,6 +153,9 @@ IF(BUILD_TESTING) ADD_TEST_MACRO(ExportImport ExportImport) ADD_TEST_MACRO(Unset Unset) ADD_TEST_MACRO(PolicyScope PolicyScope) + ADD_TEST_MACRO(EmptyLibrary EmptyLibrary) + SET_TESTS_PROPERTIES(EmptyLibrary PROPERTIES + PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target:test") ADD_TEST_MACRO(CrossCompile CrossCompile) SET_TESTS_PROPERTIES(CrossCompile PROPERTIES PASS_REGULAR_EXPRESSION "TRY_RUN.. invoked in cross-compiling mode") @@ -404,7 +410,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # --test-command t4 #--test-command "${CMAKE_COMMAND}" #"-DCONFIGURATION=\${CTEST_CONFIGURATION_TYPE}" - #-P "${CMAKE_BINARY_DIR}/Tests/SimpleExclude/run.cmake" + #-P "${CMake_BINARY_DIR}/Tests/SimpleExclude/run.cmake" #) # ADD_TEST(SameName ${CMAKE_CTEST_COMMAND} @@ -1051,7 +1057,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-target install # --build-target package --build-options "-DCMAKE_INSTALL_PREFIX:PATH=${BundleTestInstallDir}" - "-DCMake_SOURCE_DIR:PATH=${CMAKE_SOURCE_DIR}" + "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}" --test-command ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") @@ -1315,6 +1321,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestParallel/testOutput.log" ) + ADD_TEST(CTestTestPrintLabels ${CMAKE_CTEST_COMMAND} --print-labels) + SET_TESTS_PROPERTIES(CTestTestPrintLabels PROPERTIES LABELS "Label1;Label2") + SET_TESTS_PROPERTIES(CTestTestPrintLabels PROPERTIES PASS_REGULAR_EXPRESSION + "All Labels:.* Label1.* Label2") + CONFIGURE_FILE( "${CMake_SOURCE_DIR}/Tests/CTestTestResourceLock/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestResourceLock/test.cmake" @@ -1373,7 +1384,29 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ) SET_TESTS_PROPERTIES(CTestTestTimeout PROPERTIES PASS_REGULAR_EXPRESSION "TestTimeout *\\.+ *\\*\\*\\*Timeout.*CheckChild *\\.+ *Passed") - + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestDepends/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestDepends/test.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestDepends ${CMAKE_CTEST_COMMAND} + -C "\${CTestTest_CONFIG}" + -S "${CMake_BINARY_DIR}/Tests/CTestTestDepends/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestDepends/testOutput.log" + ) + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestCycle/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestCycle/test.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestCycle ${CMAKE_CTEST_COMMAND} + -C "\${CTestTest_CONFIG}" + -S "${CMake_BINARY_DIR}/Tests/CTestTestCycle/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestCycle/testOutput.log" + ) + SET_TESTS_PROPERTIES(CTestTestCycle PROPERTIES + PASS_REGULAR_EXPRESSION "a cycle exists in the test dependency graph") + CONFIGURE_FILE( "${CMake_SOURCE_DIR}/Tests/CTestTestRunScript/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestRunScript/test.cmake" @@ -1410,9 +1443,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(regex "${regex}|Error message was: ") set(regex "${regex}([Cc]ould *n.t resolve host") set(regex "${regex}|[Cc]ould *n.t connect to host") + set(regex "${regex}|Empty reply from server") set(regex "${regex}|The requested URL returned error") set(regex "${regex}|libcurl was built with SSL disabled. https: not supported)") set(regex "${regex}|Submission method .xmlrpc. not compiled into CTest") + set(regex "${regex}|Submission problem") set(regex "${regex}|Submission successful)") set(ctest_coverage_labels_args "") @@ -1470,6 +1505,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log" ) + CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestTestChecksum/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestChecksum/test.cmake" @ONLY + ESCAPE_QUOTES) + ADD_TEST(CTestTestChecksum ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestChecksum/test.cmake" -V + --output-log + "${CMake_BINARY_DIR}/Tests/CTestTestChecksum/testOutput.log" + ) + SET_TESTS_PROPERTIES(CTestTestChecksum PROPERTIES PASS_REGULAR_EXPRESSION + "Submission failed: Checksum failed for file") + # these tests take a long time, make sure they have it # if timeouts have not already been set GET_TEST_PROPERTY(CTestTest TIMEOUT PREVIOUS_TIMEOUT) @@ -1485,36 +1531,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS AND CMAKE_TESTS_CDASH_SERVER) - IF(NOT DEFINED CTEST_RUN_CTestSubmitLargeOutput) - SET(CTEST_RUN_CTestSubmitLargeOutput OFF) - - IF (CMAKE_TESTS_CDASH_SERVER AND "${server}" STREQUAL "localhost") - SET(CTEST_RUN_CTestSubmitLargeOutput ON) - ENDIF (CMAKE_TESTS_CDASH_SERVER AND "${server}" STREQUAL "localhost") - ENDIF(NOT DEFINED CTEST_RUN_CTestSubmitLargeOutput) - - IF(CTEST_RUN_CTestSubmitLargeOutput) - CONFIGURE_FILE( - "${CMake_SOURCE_DIR}/Tests/CTestSubmitLargeOutput/test.cmake.in" - "${CMake_BINARY_DIR}/Tests/CTestSubmitLargeOutput/test.cmake" - @ONLY ESCAPE_QUOTES - ) - ADD_TEST(CTestSubmitLargeOutput ${CMAKE_CTEST_COMMAND} - -S "${CMake_BINARY_DIR}/Tests/CTestSubmitLargeOutput/test.cmake" -V - --output-log "${CMake_BINARY_DIR}/Tests/CTestSubmitLargeOutput/testOutput.log" - ) - - # This test only passes if it fails to submit properly... - # - SET_TESTS_PROPERTIES(CTestSubmitLargeOutput PROPERTIES - PASS_REGULAR_EXPRESSION "Errors occurred during submission") - - # Give this test plenty of time to run on slower machines: - # - SET_TESTS_PROPERTIES(CTestSubmitLargeOutput PROPERTIES - TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - ENDIF(CTEST_RUN_CTestSubmitLargeOutput) - IF (CMAKE_RUN_LONG_TESTS AND TEST_KDE4_STABLE_BRANCH) IF(UNIX) IF(NOT QT4_FOUND) @@ -1555,10 +1571,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ IF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode) SET(CMAKE_SKIP_BOOTSTRAP_TEST 1) ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode) - IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt") + IF(EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") # If there is CMakeLists.txt in the binary tree, assume in-source build SET(CMAKE_SKIP_BOOTSTRAP_TEST 1) - ENDIF(EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt") + ENDIF(EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") SET(bootstrap "") IF(CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST) IF(UNIX) @@ -1620,7 +1636,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ENDIF() IF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode") - INCLUDE(FindJava) + find_package(Java QUIET) IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW) GET_FILENAME_COMPONENT(JNIPATH ${JAVA_COMPILE} PATH) FIND_FILE(JNI_H jni.h @@ -1730,14 +1746,14 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # If this is not an in-source build, provide a target to wipe out # all the test build directories. - IF(NOT EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt") + IF(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in ${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY) ADD_CUSTOM_TARGET(test_clean COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake COMMENT "Removing test build directories." ) - ENDIF(NOT EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt") + ENDIF(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") ADD_TEST(CMakeWizardTest ${CMAKE_CMAKE_COMMAND} -D build_dir:STRING=${CMAKE_CURRENT_BINARY_DIR}/CMakeWizardTest diff --git a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in index 9150aef..73f8b01 100644 --- a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in +++ b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in @@ -149,26 +149,77 @@ if(is_git_checkout AND NOT GIT_EXECUTABLE) # from it: # if(ctest_ini_file) - file(STRINGS "${ctest_ini_file}" lines REGEX "^GITCommand: (.*)$") - string(REGEX REPLACE "^GITCommand: (.*)$" "\\1" exe "${lines}") + file(STRINGS "${ctest_ini_file}" line REGEX "^GITCommand: (.*)$") + string(REGEX REPLACE "^GITCommand: (.*)$" "\\1" line "${line}") + if("${line}" MATCHES "^\"") + string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}") + else() + string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}") + endif() + set(exe "${line}") if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND") set(exe "") endif() + if(exe) + message("info: GIT_EXECUTABLE set by 'GITCommand:' from '${ctest_ini_file}'") + endif() if(NOT exe) - file(STRINGS "${ctest_ini_file}" lines REGEX "^UpdateCommand: (.*)$") - string(REGEX REPLACE "^UpdateCommand: (.*)$" "\\1" exe "${lines}") + file(STRINGS "${ctest_ini_file}" line REGEX "^UpdateCommand: (.*)$") + string(REGEX REPLACE "^UpdateCommand: (.*)$" "\\1" line "${line}") + if("${line}" MATCHES "^\"") + string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}") + else() + string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}") + endif() + set(exe "${line}") if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND") set(exe "") endif() + if(exe) + message("info: GIT_EXECUTABLE set by 'UpdateCommand:' from '${ctest_ini_file}'") + endif() + endif() + else() + message("info: no DartConfiguration.tcl or CTestConfiguration.ini file...") + endif() + + # If we have still not grokked the exe, look in the Update.xml file to see + # if we can parse it from there... + # + if(NOT exe) + file(GLOB_RECURSE update_xml_file "${CMake_BINARY_DIR}/Testing/Update.xml") + if(update_xml_file) + file(STRINGS "${update_xml_file}" line + REGEX "^.*<UpdateCommand>(.*)</UpdateCommand>$" LIMIT_COUNT 1) + string(REPLACE ""\;" "\"" line "${line}") + string(REGEX REPLACE "^.*<UpdateCommand>(.*)</UpdateCommand>$" "\\1" line "${line}") + if("${line}" MATCHES "^\"") + string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}") + else() + string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}") + endif() + if(line) + set(exe "${line}") + endif() + if(exe) + message("info: GIT_EXECUTABLE set by '<UpdateCommand>' from '${update_xml_file}'") + endif() + else() + message("info: no Update.xml file...") endif() endif() if(exe) set(GIT_EXECUTABLE "${exe}") - message("info: set GIT_EXECUTABLE to '${GIT_EXECUTABLE}' based on '${ctest_ini_file}'") + message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'") + message("") + + if(NOT EXISTS "${GIT_EXECUTABLE}") + message(FATAL_ERROR "GIT_EXECUTABLE does not exist...") + endif() else() - message(FATAL_ERROR "could not determine GIT_EXECUTABLE based on '${ctest_ini_file}'...") + message(FATAL_ERROR "could not determine GIT_EXECUTABLE...") endif() endif() diff --git a/Tests/CMakeTests/FindBaseTest.cmake.in b/Tests/CMakeTests/FindBaseTest.cmake.in index 02f7001..47c1692 100644 --- a/Tests/CMakeTests/FindBaseTest.cmake.in +++ b/Tests/CMakeTests/FindBaseTest.cmake.in @@ -55,7 +55,7 @@ if(NOT "${FOO_H_5}" STREQUAL "${_HEADER_FULL}") message(FATAL_ERROR "Did not find \"${_HEADER_FULL}\"\ngot ${FOO_H_5} instead !") endif(NOT "${FOO_H_5}" STREQUAL "${_HEADER_FULL}") -# by explicitely disabling CMAKE_FIND_ROOT_PATH again it shouldn't be found +# by explicitly disabling CMAKE_FIND_ROOT_PATH again it shouldn't be found find_file(FOO_H_6 ${_HEADER} NO_CMAKE_FIND_ROOT_PATH) if(FOO_H_6) message(FATAL_ERROR "${_HEADER} found: ${FOO_H_6}, it should not exist !") diff --git a/Tests/CMakeTests/ModuleNoticesTest.cmake.in b/Tests/CMakeTests/ModuleNoticesTest.cmake.in index 4d295ef..8ecebd3 100644 --- a/Tests/CMakeTests/ModuleNoticesTest.cmake.in +++ b/Tests/CMakeTests/ModuleNoticesTest.cmake.in @@ -3,7 +3,7 @@ # match any additional copyright holder notices. set(notice_regex " #============================================================================= -# Copyright (20[0-9][0-9]-)?20[0-9][0-9] Kitware[^\n]+( +# Copyright (20[0-9][0-9]-)?20[0-9][0-9] [^\n]+( # Copyright (20[0-9][0-9]-)?20[0-9][0-9] [^\n]+)* # # Distributed under the OSI-approved BSD License \\(the \"License\"\\); @@ -13,7 +13,7 @@ set(notice_regex " # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\\. # See the License for more information\\. #============================================================================= -# \\(To distributed this file outside of CMake, substitute the full +# \\(To distribute this file outside of CMake, substitute the full # License text for the above reference.\\) ") string(REPLACE "\n" "\r?\n" notice_regex "${notice_regex}") diff --git a/Tests/CTestSubmitLargeOutput/CMakeLists.txt b/Tests/CTestSubmitLargeOutput/CMakeLists.txt deleted file mode 100644 index 6c30e7a..0000000 --- a/Tests/CTestSubmitLargeOutput/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(SubmitLargeOutput NONE) - -include(CTest) - -add_test(GenerateRandomOutput ${CMAKE_COMMAND} - -P ${CMAKE_CURRENT_SOURCE_DIR}/GenerateRandomOutput.cmake - ) diff --git a/Tests/CTestSubmitLargeOutput/GenerateRandomOutput.cmake b/Tests/CTestSubmitLargeOutput/GenerateRandomOutput.cmake deleted file mode 100644 index c7f4f29..0000000 --- a/Tests/CTestSubmitLargeOutput/GenerateRandomOutput.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# -# This script generates random lines of output. -# -# By default, it generates 100M of output (a million lines of 100 bytes each), -# but you can override that by passing in -D line_count and/or -D line_size... -# - -# Default values: -# -if(NOT DEFINED line_count) - set(line_count 1000000) -endif() - -if(NOT DEFINED line_size) - set(line_size 100) -endif() - -if(NOT DEFINED random_seed) - set(random_seed 1987) -endif() - -# Use RANDOM_SEED once before the loop: -# -string(RANDOM LENGTH ${line_size} RANDOM_SEED ${random_seed} s) - -# Emit line_count lines of random output: -# -foreach(i RANGE 1 ${line_count}) - string(RANDOM LENGTH ${line_size} s) - message(${s}) -endforeach() diff --git a/Tests/CTestSubmitLargeOutput/test.cmake.in b/Tests/CTestSubmitLargeOutput/test.cmake.in deleted file mode 100644 index 17a7c7d..0000000 --- a/Tests/CTestSubmitLargeOutput/test.cmake.in +++ /dev/null @@ -1,27 +0,0 @@ -SET(CTEST_SITE "@SITE@") -SET(CTEST_BUILD_NAME "LargeOutput-@BUILDNAME@") -SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") -SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") - -SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestSubmitLargeOutput") -SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestSubmitLargeOutput/build") -SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") - -CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) - -CTEST_START(Experimental) -CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) -CTEST_READ_CUSTOM_FILES("${CTEST_BINARY_DIRECTORY}") -CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) - -SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1000000000) -SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000000) -SET(CTEST_TEST_TIMEOUT @CMAKE_LONG_TEST_TIMEOUT@) - -CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) - -set(CTEST_DROP_METHOD "@protocol@") -set(CTEST_DROP_SITE "@server@") -set(CTEST_DROP_LOCATION "@path@/submit.php?project=PublicDashboard") - -CTEST_SUBMIT(RETURN_VALUE res) diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in new file mode 100644 index 0000000..c3c41a5 --- /dev/null +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -0,0 +1,28 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.1) + +# Settings: +SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +SET(CTEST_SITE "@SITE@") +SET(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Checksum") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestParallel") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParallel") +SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@") +SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@") +SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@") +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}" RETURN_VALUE res) +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 4) + +SET(CTEST_DROP_METHOD "@protocol@") +SET(CTEST_DROP_SITE "@server@") +SET(CTEST_DROP_LOCATION "@path@/submit.php?project=PublicDashboard") + +CTEST_SUBMIT(RETRY_DELAY 3 RETRY_COUNT 2 INTERNAL_TEST_CHECKSUM RETURN_VALUE res) diff --git a/Tests/CTestTestCycle/CMakeLists.txt b/Tests/CTestTestCycle/CMakeLists.txt new file mode 100644 index 0000000..6ba6b8c --- /dev/null +++ b/Tests/CTestTestCycle/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required (VERSION 2.6) +project(CTestTestCycle) +include(CTest) + +add_executable (simple simple.cxx) +add_test (one simple) +add_test (two simple) +add_test (three simple) + +# Add cyclical test dependency +set_tests_properties(one PROPERTIES DEPENDS "two") +set_tests_properties(two PROPERTIES DEPENDS "three") +set_tests_properties(three PROPERTIES DEPENDS "one") diff --git a/Tests/CTestSubmitLargeOutput/CTestConfig.cmake b/Tests/CTestTestCycle/CTestConfig.cmake index ffd6efc..43e9986 100644 --- a/Tests/CTestSubmitLargeOutput/CTestConfig.cmake +++ b/Tests/CTestTestCycle/CTestConfig.cmake @@ -1,5 +1,6 @@ -set(CTEST_PROJECT_NAME "SubmitLargeOutput") -set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") +set (CTEST_PROJECT_NAME "CTestTestCycle") +set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") +set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "www.cdash.org") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") diff --git a/Tests/CTestTestCycle/simple.cxx b/Tests/CTestTestCycle/simple.cxx new file mode 100644 index 0000000..766b775 --- /dev/null +++ b/Tests/CTestTestCycle/simple.cxx @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in new file mode 100644 index 0000000..a17adca --- /dev/null +++ b/Tests/CTestTestCycle/test.cmake.in @@ -0,0 +1,22 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.1) + +# Settings: +SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +SET(CTEST_SITE "@SITE@") +SET(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Cycle") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCycle") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCycle") +SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@") +SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@") +SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@") +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}" RETURN_VALUE res) +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) diff --git a/Tests/CTestTestDepends/CMakeLists.txt b/Tests/CTestTestDepends/CMakeLists.txt new file mode 100644 index 0000000..26367a6 --- /dev/null +++ b/Tests/CTestTestDepends/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required (VERSION 2.6) +project(CTestTestDepends) +include(CTest) + +add_executable (simple simple.cxx) +add_test (one simple) +add_test (two simple) +add_test (three simple) + +# Add redundant (but not cyclical) dependencies +set_tests_properties(two PROPERTIES DEPENDS "one") +set_tests_properties(three PROPERTIES DEPENDS "one;two") diff --git a/Tests/CTestTestDepends/CTestConfig.cmake b/Tests/CTestTestDepends/CTestConfig.cmake new file mode 100644 index 0000000..e3af7dd --- /dev/null +++ b/Tests/CTestTestDepends/CTestConfig.cmake @@ -0,0 +1,7 @@ +set (CTEST_PROJECT_NAME "CTestTestDepends") +set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") +set (CTEST_DART_SERVER_VERSION "2") +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "www.cdash.org") +set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestDepends/simple.cxx b/Tests/CTestTestDepends/simple.cxx new file mode 100644 index 0000000..766b775 --- /dev/null +++ b/Tests/CTestTestDepends/simple.cxx @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in new file mode 100644 index 0000000..ed4e182 --- /dev/null +++ b/Tests/CTestTestDepends/test.cmake.in @@ -0,0 +1,22 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.1) + +# Settings: +SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +SET(CTEST_SITE "@SITE@") +SET(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Depends") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestDepends") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestDepends") +SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@") +SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@") +SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@") +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}" RETURN_VALUE res) +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index f672a52..793b987 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -275,6 +275,11 @@ execute_process( WORKING_DIRECTORY \"${TOP}\" COMMAND \"${GIT}\" clone \"${REPO}\" dash-source ) + +# Test .git file. +file(RENAME \"${TOP}/dash-source/.git\" \"${TOP}/dash-source/repo.git\") +file(WRITE \"${TOP}/dash-source/.git\" \"gitdir: repo.git\n\") + execute_process( WORKING_DIRECTORY \"${TOP}/dash-source\" COMMAND \"${GIT}\" reset --hard ${revision1} diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt index 7206f1d..8095a1c 100644 --- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt +++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt @@ -76,7 +76,8 @@ endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - "int main() { return 0; }" + "int main() { return 0; } +" ) add_executable( diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake index 8adcafc..ebbb426 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -9,7 +9,7 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= -# (To distributed this file outside of CMake, substitute the full +# (To distribute this file outside of CMake, substitute the full # License text for the above reference.) if(NOT DEFINED CMAKE_Fortran_COMPILER) diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 4fc9fb5..76208d4 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -9,12 +9,16 @@ ADD_SUBDIRECTORY(GeneratedHeader) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL +IF(NOT DEFINED bin_dir) + SET(bin_dir "bin") +ENDIF() + +SET (LIBRARY_OUTPUT_PATH + ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL "Single output directory for building all libraries.") -SET (EXECUTABLE_OUTPUT_PATH - ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL +SET (EXECUTABLE_OUTPUT_PATH + ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL "Single output directory for building all executables.") ################################################################ @@ -220,7 +224,12 @@ ADD_CUSTOM_COMMAND(OUTPUT gen_redirect.c ############################################################################## # Test non-trivial command line arguments in custom commands. SET(EXPECTED_ARGUMENTS) +SET(CHECK_ARGS) +IF(NOT MSVC71) + SET(CHECK_ARGS -DPATH=c:/posix/path) +ENDIF() SET(CHECK_ARGS + ${CHECK_ARGS} c:/posix/path c:\\windows\\path 'single-quotes' @@ -359,13 +368,16 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in @ONLY IMMEDIATE) ADD_EXECUTABLE(check_command_line ${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c) +SET(output_name "check_command_line") +SET_PROPERTY(TARGET check_command_line + PROPERTY OUTPUT_NAME ${output_name}) # SET_TARGET_PROPERTIES(check_command_line PROPERTIES # COMPILE_FLAGS -DCHECK_COMMAND_LINE_VERBOSE) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_line_check COMMAND ${CMAKE_COMMAND} -DMARK_FILE=${CMAKE_CURRENT_BINARY_DIR}/check_mark.txt -P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake - COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line + COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name} ${CHECK_ARGS} "" VERBATIM COMMENT "Checking custom command line escapes (single'quote)" @@ -375,7 +387,7 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/command_line_check ADD_CUSTOM_TARGET(do_check_command_line ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/command_line_check COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes" - COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line + COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name} ${CHECK_ARGS} "" VERBATIM COMMENT "Checking custom target command line escapes ($dollar-signs$)" diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt index bfc8271..5d27890 100644 --- a/Tests/CxxOnly/CMakeLists.txt +++ b/Tests/CxxOnly/CMakeLists.txt @@ -2,7 +2,10 @@ project (CxxOnly CXX) set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix") -add_library(testcxx1 STATIC libcxx1.cxx) +if(WIN32) + set(EXTRA_SRCS test.CPP) +endif() +add_library(testcxx1.my STATIC libcxx1.cxx ${EXTRA_SRCS}) add_library(testcxx2 SHARED libcxx2.cxx) add_executable (CxxOnly cxxonly.cxx) -target_link_libraries(CxxOnly testcxx1 testcxx2) +target_link_libraries(CxxOnly testcxx1.my testcxx2) diff --git a/Tests/CxxOnly/cxxonly.cxx b/Tests/CxxOnly/cxxonly.cxx index 99ccf3b..9cf6f2d 100644 --- a/Tests/CxxOnly/cxxonly.cxx +++ b/Tests/CxxOnly/cxxonly.cxx @@ -1,10 +1,16 @@ #include "libcxx1.h" #include "libcxx2.h" +#ifdef _MSC_VER +extern int testCPP; +#endif #include <stdio.h> int main () { +#ifdef _MSC_VER + testCPP = 1; +#endif if ( LibCxx1Class::Method() != 2.0 ) { printf("Problem with libcxx1\n"); diff --git a/Tests/CxxOnly/test.CPP b/Tests/CxxOnly/test.CPP new file mode 100644 index 0000000..8a3cde2 --- /dev/null +++ b/Tests/CxxOnly/test.CPP @@ -0,0 +1 @@ +int testCPP; diff --git a/Tests/Dependency/Four/CMakeLists.txt b/Tests/Dependency/Four/CMakeLists.txt index ba3711f..df0f162 100644 --- a/Tests/Dependency/Four/CMakeLists.txt +++ b/Tests/Dependency/Four/CMakeLists.txt @@ -1,3 +1,6 @@ +INCLUDE_DIRECTORIES(${Dependency_BINARY_DIR}/Two) ADD_LIBRARY( Four FourSrc.c ) TARGET_LINK_LIBRARIES( Four One Two NoDepA ) +# TwoCustom must build before Four. +ADD_DEPENDENCIES(Four TwoCustom) diff --git a/Tests/Dependency/Four/FourSrc.c b/Tests/Dependency/Four/FourSrc.c index e8fefcd..23a66a4 100644 --- a/Tests/Dependency/Four/FourSrc.c +++ b/Tests/Dependency/Four/FourSrc.c @@ -1,3 +1,4 @@ +#include <two-test.h> /* Requires TwoCustom to be built first. */ void NoDepAFunction(); void OneFunction(); void TwoFunction(); diff --git a/Tests/EmptyLibrary/CMakeLists.txt b/Tests/EmptyLibrary/CMakeLists.txt new file mode 100644 index 0000000..baddbbf --- /dev/null +++ b/Tests/EmptyLibrary/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.6) +project(TestEmptyLibrary) + +add_subdirectory(subdir) diff --git a/Tests/EmptyLibrary/subdir/CMakeLists.txt b/Tests/EmptyLibrary/subdir/CMakeLists.txt new file mode 100644 index 0000000..e273f8d --- /dev/null +++ b/Tests/EmptyLibrary/subdir/CMakeLists.txt @@ -0,0 +1 @@ +add_library(test test.h) diff --git a/Tests/EmptyLibrary/subdir/test.h b/Tests/EmptyLibrary/subdir/test.h new file mode 100644 index 0000000..8511f53 --- /dev/null +++ b/Tests/EmptyLibrary/subdir/test.h @@ -0,0 +1 @@ +extern int dummy; diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 45c1149..a878194 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -20,6 +20,7 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER set(base "${CMAKE_BINARY_DIR}/CMakeExternals") set(binary_base "${base}/Build") set_property(DIRECTORY PROPERTY EP_BASE ${base}) +set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test) if(NOT DEFINED can_build_tutorial_step5) set(can_build_tutorial_step5 1) @@ -96,6 +97,7 @@ ExternalProject_Add(${proj} DOWNLOAD_COMMAND "" INSTALL_COMMAND "" PATCH_COMMAND "" + STEP_TARGETS install update SVN_REPOSITORY "" SVN_REVISION "" TEST_COMMAND "" @@ -115,6 +117,7 @@ if(can_build_tutorial_step5) URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR> TEST_BEFORE_INSTALL 1 + LOG_INSTALL 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local") ExternalProject_Get_Property(${proj} install_dir) @@ -125,6 +128,7 @@ if(can_build_tutorial_step5) URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR> TEST_AFTER_INSTALL 1 + LOG_TEST 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local") endif() @@ -142,6 +146,7 @@ ExternalProject_Add(${proj} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DTEST_LIST:STRING=A::B::C INSTALL_COMMAND "" + LOG_CONFIGURE 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local/TAR") @@ -172,6 +177,7 @@ ExternalProject_Add(${proj} URL_MD5 38c648e817339c356f6be00eeed79bd0 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR> INSTALL_COMMAND "" + LOG_BUILD 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local/TGZ") @@ -411,6 +417,7 @@ if(do_svn_tests) CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> INSTALL_COMMAND "" DEPENDS "SetupLocalSVNRepository" + LOG_DOWNLOAD 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "SVN") endif() @@ -490,6 +497,7 @@ if(do_git_tests) CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> INSTALL_COMMAND "" DEPENDS "SetupLocalGITRepository" + LOG_UPDATE 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "GIT") endif() diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 74cc115..a472bea 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -54,6 +54,10 @@ SET(CMAKE_FIND_APPBUNDLE FIRST) # Set the wrong answer for a find to make sure it re-finds. set(VersionedA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/cmake/zot-4.0) +# Test that CMAKE_IGNORE_PATH can ignore the purposely bad package +# files in the lib/cmake/zot-3.1 directory. +set(CMAKE_IGNORE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/cmake/zot-3.1) + # Look for packages with new-style signatures. FIND_PACKAGE(foo NO_MODULE) FIND_PACKAGE(Foo CONFIGS FooConfig.cmake) diff --git a/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake new file mode 100644 index 0000000..bee2f0e --- /dev/null +++ b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake @@ -0,0 +1,4 @@ +# Claim to be any version to test that CMAKE_IGNORE_PATH hides us. +SET(PACKAGE_VERSION 3.1) +SET(PACKAGE_VERSION_COMPATIBLE 1) +SET(PACKAGE_VERSION_EXACT 1) diff --git a/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake new file mode 100644 index 0000000..2fbd525 --- /dev/null +++ b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake @@ -0,0 +1,2 @@ +# Test config file. +message(WARNING "CMAKE_IGNORE_PATH failed to ignore this file!") diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt index ef55173..5d4f42d 100644 --- a/Tests/FunctionTest/CMakeLists.txt +++ b/Tests/FunctionTest/CMakeLists.txt @@ -166,3 +166,11 @@ ELSE(DEFINED SUBDIR_DEFINED) ENDIF(DEFINED SUBDIR_DEFINED) ADD_EXECUTABLE(FunctionTest functionTest.c) + +# Use the PROJECT_LABEL property: in IDEs, the project label should appear +# in the UI rather than the target name. If this were a good test of the +# property rather than just a smoke test, it would verify that the label +# actually appears in the UI of the IDE... Or at least that the text appears +# somewhere in the generated project files. +SET_PROPERTY(TARGET miniFunctionTest + PROPERTY PROJECT_LABEL "Test de Fonctionnement") diff --git a/Tests/MissingSourceFile/CMakeLists.txt b/Tests/MissingSourceFile/CMakeLists.txt new file mode 100644 index 0000000..42b7c51 --- /dev/null +++ b/Tests/MissingSourceFile/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(MissingSourceFile C) +add_executable(MissingSourceFile MissingSourceFile.c) |