diff options
author | Brad King <brad.king@kitware.com> | 2011-03-02 18:47:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-03-02 18:47:11 (GMT) |
commit | c03b610c0aa20b298b15af401e1312c2b73beceb (patch) | |
tree | c3f785473d0ef406bed51493bb034b2893ff2c1e /Tests | |
parent | c623008376a0758b1cb1b8f404d6a148ce938b8e (diff) | |
parent | d30dcf18b9dedcf6744a87793653bc0d94d8a8bb (diff) | |
download | CMake-c03b610c0aa20b298b15af401e1312c2b73beceb.zip CMake-c03b610c0aa20b298b15af401e1312c2b73beceb.tar.gz CMake-c03b610c0aa20b298b15af401e1312c2b73beceb.tar.bz2 |
Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport
Diffstat (limited to 'Tests')
49 files changed, 611 insertions, 234 deletions
diff --git a/Tests/BundleTest/BundleLib.cxx b/Tests/BundleTest/BundleLib.cxx index bab745e..b68ee25 100644 --- a/Tests/BundleTest/BundleLib.cxx +++ b/Tests/BundleTest/BundleLib.cxx @@ -3,7 +3,7 @@ #include <stdlib.h> #include <unistd.h> -#include <Carbon/Carbon.h> +#include <CoreFoundation/CoreFoundation.h> int fileExists(char* filename) { @@ -51,7 +51,7 @@ int findBundleFile(char* exec, const char* file) int foo(char *exec) { - // Call a "Carbon" function... + // Call a CoreFoundation function... // CFBundleRef br = CFBundleGetMainBundle(); (void) br; diff --git a/Tests/BundleTest/BundleTest.cxx b/Tests/BundleTest/BundleTest.cxx index 29d17db..a66d601 100644 --- a/Tests/BundleTest/BundleTest.cxx +++ b/Tests/BundleTest/BundleTest.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include <Carbon/Carbon.h> +#include <CoreFoundation/CoreFoundation.h> extern int foo(char* exec); @@ -8,8 +8,8 @@ int main(int argc, char* argv[]) { printf("Started with: %d arguments\n", argc); - // Call a "Carbon" function... but pull in the link dependency on "-framework - // Carbon" via CMake's dependency chaining mechanism. This code exists to + // Call a CoreFoundation function... but pull in the link dependency on "-framework + // CoreFoundation" via CMake's dependency chaining mechanism. This code exists to // verify that the chaining mechanism works with "-framework blah" style // link dependencies. // diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt index 5ccf2bf..5342f49 100644 --- a/Tests/BundleTest/CMakeLists.txt +++ b/Tests/BundleTest/CMakeLists.txt @@ -25,14 +25,14 @@ SET_SOURCE_FILES_PROPERTIES( SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar") # Test building a bundle linking to a shared library where the -# shared library links to Carbon, but the executable does not -# explicitly link to Carbon, but the executable does *depend* -# on Carbon. There should be a link failure for the executable +# shared library links to CoreFoundation, but the executable does not +# explicitly link to CoreFoundation, but the executable does *depend* +# on CoreFoundation. There should be a link failure for the executable # if CMake's dependency chaining for libraries with "-framework # blah" style dependencies gets broken... # ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx) -TARGET_LINK_LIBRARIES(BundleTestLib "-framework Carbon") +TARGET_LINK_LIBRARIES(BundleTestLib "-framework CoreFoundation") ADD_EXECUTABLE(BundleTest MACOSX_BUNDLE @@ -43,8 +43,8 @@ ADD_EXECUTABLE(BundleTest ) TARGET_LINK_LIBRARIES(BundleTest BundleTestLib) # -# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework Carbon") -# (see above comments about Carbon) +# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework CoreFoundation") +# (see above comments about CoreFoundation) # # Test bundle installation. diff --git a/Tests/CFBundleTest/CMakeLists.txt b/Tests/CFBundleTest/CMakeLists.txt new file mode 100644 index 0000000..8fd9efd --- /dev/null +++ b/Tests/CFBundleTest/CMakeLists.txt @@ -0,0 +1,56 @@ +#this is adapted from FireBreath (http://www.firebreath.org) + +cmake_minimum_required(VERSION 2.8) + +project(CFBundleTest) + +include(PluginConfig.cmake) + +message ("Creating Mac Browser Plugin project ${PROJECT_NAME}") +set(SOURCES + np_macmain.cpp + Localized.r + ${CMAKE_CURRENT_BINARY_DIR}/Info.plist + ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings + ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc +) + +add_library( ${PROJECT_NAME} MODULE + ${SOURCES} + ) + +set (RCFILES ${CMAKE_CURRENT_SOURCE_DIR}/Localized.r) + +configure_file(Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) +configure_file(InfoPlist.strings.in ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings) + +# Compile the resource file +find_program(RC_COMPILER Rez NO_DEFAULT_PATHS PATHS /Developer/Tools) +if(NOT RC_COMPILER) + message(FATAL_ERROR "could not find Rez to build resources from .r file...") +endif() + +execute_process(COMMAND + ${RC_COMPILER} ${RCFILES} -useDF -o ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc + ) + +set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc + PROPERTIES GENERATED 1 + ) +# note that for some reason, the makefile and xcode generators use a different +# property to indicate where the Info.plist file is :-/ For that reason, we +# specify it twice so it will work both places +set_target_properties(CFBundleTest PROPERTIES + BUNDLE 1 + BUNDLE_EXTENSION plugin + XCODE_ATTRIBUTE_WRAPPER_EXTENSION plugin #sets the extension to .plugin + XCODE_ATTRIBUTE_MACH_O_TYPE mh_bundle + XCODE_ATTRIBUTE_INFOPLIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/Info.plist + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist + LINK_FLAGS "-Wl,-exported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/ExportList_plugin.txt\"") + +set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings + ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/English.lproj") diff --git a/Tests/CFBundleTest/ExportList_plugin.txt b/Tests/CFBundleTest/ExportList_plugin.txt new file mode 100644 index 0000000..31d6f64 --- /dev/null +++ b/Tests/CFBundleTest/ExportList_plugin.txt @@ -0,0 +1,3 @@ +_NP_GetEntryPoints +_NP_Initialize +_NP_Shutdown diff --git a/Tests/CFBundleTest/Info.plist.in b/Tests/CFBundleTest/Info.plist.in new file mode 100644 index 0000000..638002f --- /dev/null +++ b/Tests/CFBundleTest/Info.plist.in @@ -0,0 +1,54 @@ +<?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>English</string> + <key>CFBundleExecutable</key> + <string>${PLUGIN_NAME}</string> + <key>CFBundleGetInfoString</key> + <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}, ${FBSTRING_LegalCopyright}</string> + <key>CFBundleIdentifier</key> + <string>com.${ACTIVEX_PROGID}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BRPL</string> + <key>CFBundleShortVersionString</key> + <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>${FBSTRING_PLUGIN_VERSION}</string> + <key>CFPlugInDynamicRegisterFunction</key> + <string></string> + <key>CFPlugInDynamicRegistration</key> + <string>NO</string> + <key>CFPlugInFactories</key> + <dict> + <key>00000000-0000-0000-0000-000000000000</key> + <string>MyFactoryFunction</string> + </dict> + <key>CFPlugInTypes</key> + <dict> + <key>00000000-0000-0000-0000-000000000000</key> + <array> + <string>00000000-0000-0000-0000-000000000000</string> + </array> + </dict> + <key>CFPlugInUnloadFunction</key> + <string></string> + <key>WebPluginName</key> + <string>${FBSTRING_ProductName}</string> + <key>WebPluginDescription</key> + <string>${FBSTRING_FileDescription}</string> + <key>WebPluginMIMETypes</key> + <dict> + <key>${FBSTRING_MIMEType}</key> + <dict> + <key>WebPluginTypeDescription</key> + <string>${FBSTRING_FileDescription}</string> + </dict> + </dict> +</dict> +</plist> diff --git a/Tests/CFBundleTest/InfoPlist.strings.in b/Tests/CFBundleTest/InfoPlist.strings.in new file mode 100644 index 0000000..790ead0 --- /dev/null +++ b/Tests/CFBundleTest/InfoPlist.strings.in @@ -0,0 +1,4 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "${PLUGIN_NAME}.plugin"; +NSHumanReadableCopyright = "${FBSTRING_LegalCopyright}"; diff --git a/Tests/CFBundleTest/Localized.r b/Tests/CFBundleTest/Localized.r new file mode 100644 index 0000000..e988e26 --- /dev/null +++ b/Tests/CFBundleTest/Localized.r @@ -0,0 +1,18 @@ +#include <CoreServices/CoreServices.r> + +resource 'STR#' (126) +{ { + "${FBSTRING_LegalCopyright}", + "${FBSTRING_ProductName}" +} }; + +resource 'STR#' (127) +{ { + "${FBSTRING_FileDescription}" +} }; + +resource 'STR#' (128) +{ { + "${FBSTRING_MIMEType}", + "${FBSTRING_FileExtents}" +} }; diff --git a/Tests/CFBundleTest/Localized.rsrc b/Tests/CFBundleTest/Localized.rsrc Binary files differnew file mode 100644 index 0000000..cbf3523 --- /dev/null +++ b/Tests/CFBundleTest/Localized.rsrc diff --git a/Tests/CFBundleTest/PluginConfig.cmake b/Tests/CFBundleTest/PluginConfig.cmake new file mode 100644 index 0000000..763ddcc --- /dev/null +++ b/Tests/CFBundleTest/PluginConfig.cmake @@ -0,0 +1,21 @@ +#/**********************************************************\ +# Auto-Generated Plugin Configuration file +# for CFTestPlugin +#\**********************************************************/ + +set(PLUGIN_NAME "CFTestPlugin") +set(PLUGIN_PREFIX "CFTP") +set(COMPANY_NAME "FBDevTeam") + +set(MOZILLA_PLUGINID "@firebreath.googlecode.com/CFTestPlugin") + +# strings +set(FBSTRING_CompanyName "Firebreath Dev Team") +set(FBSTRING_FileDescription "CFBundle Test Plugin - Plugin for testing cmake patch to improve FireBreath project generation") +set(FBSTRING_PLUGIN_VERSION "1.0.0") +set(FBSTRING_LegalCopyright "Copyright 2010 Firebreath Dev Team") +set(FBSTRING_PluginFileName "np${PLUGIN_NAME}.dll") +set(FBSTRING_ProductName "CFTestPlugin") +set(FBSTRING_FileExtents "") +set(FBSTRING_PluginName "CFTestPlugin") +set(FBSTRING_MIMEType "application/x-fbtestplugin") diff --git a/Tests/CFBundleTest/README.txt b/Tests/CFBundleTest/README.txt new file mode 100644 index 0000000..248651b --- /dev/null +++ b/Tests/CFBundleTest/README.txt @@ -0,0 +1,16 @@ + +CFBundle test project. The generated .plugin/ bundle from either makefiles or XCode should look like this: + +./Contents +./Contents/Info.plist +./Contents/MacOS +./Contents/MacOS/CFBundleTest +./Contents/Resources +./Contents/Resources/English.lproj +./Contents/Resources/English.lproj/InfoPlist.strings +./Contents/Resources/English.lproj/Localized.rsrc + +file Contents/MacOS/CFBundleTest should return something like: +Contents/MacOS/CFBundleTest: Mach-O 64-bit bundle x86_64 + +It is okay if it is a 32 bit binary; if it is not Mach-O, or is spelled differently, it is not okay. diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake new file mode 100644 index 0000000..e622900 --- /dev/null +++ b/Tests/CFBundleTest/VerifyResult.cmake @@ -0,0 +1,32 @@ +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + message(FATAL_ERROR "expected variable CTEST_CONFIGURATION_TYPE not defined") +endif() + +if(NOT DEFINED dir) + message(FATAL_ERROR "expected variable dir not defined") +endif() + +if(NOT DEFINED gen) + message(FATAL_ERROR "expected variable gen not defined") +endif() + +message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'") +message(STATUS "dir='${dir}'") +message(STATUS "gen='${gen}'") + +if(gen MATCHES "Make" OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig") + set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +else() + set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +endif() + +if(NOT EXISTS "${expected_filename}") + message(FATAL_ERROR "test fails: expected output file does not exist [${expected_filename}]") +endif() + +file(COPY "${expected_filename}" + DESTINATION "${dir}/LatestBuildResult" + ) diff --git a/Tests/CFBundleTest/np_macmain.cpp b/Tests/CFBundleTest/np_macmain.cpp new file mode 100644 index 0000000..78004d0 --- /dev/null +++ b/Tests/CFBundleTest/np_macmain.cpp @@ -0,0 +1,49 @@ +/***********************************************************\ + Written by: Richard Bateman (taxilian) + + Based on the default np_macmain.cpp from FireBreath + http://firebreath.googlecode.com + + This file has been stripped to prevent it from accidently + doing anything useful. +\***********************************************************/ + + +#include <stdio.h> + +typedef void (*NPP_ShutdownProcPtr)(void); +typedef short NPError; + +#pragma GCC visibility push(default) + +struct NPNetscapeFuncs; +struct NPPluginFuncs; + +extern "C" { + NPError NP_Initialize(NPNetscapeFuncs *browserFuncs); + NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs); + NPError NP_Shutdown(void); +} + +#pragma GCC visibility pop + +void initPluginModule() +{ +} + +NPError NP_GetEntryPoints(NPPluginFuncs* pFuncs) +{ + printf("NP_GetEntryPoints()\n"); + return 0; +} + +NPError NP_Initialize(NPNetscapeFuncs* pFuncs) +{ + printf("NP_Initialize()\n"); + return 0; +} + +NPError NP_Shutdown() +{ + return 0; +} diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index cbca02d..f418058 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -563,30 +563,40 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ IF(CTEST_RUN_CPackComponentsForAll) set(CPackComponentsForAll_EXTRA_OPTIONS) - - set(CPackRun_CPackGen "-DCPackGen=ZIP") set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}") - set(CPackRun_CPackComponentWay "-DCPackComponentWay=default") - - ADD_TEST(CPackComponentsForAll-ZIP-default ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/CPackComponentsForAll" - "${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/buildZIP-NoComponent" - --build-generator ${CMAKE_TEST_GENERATOR} - --build-project CPackComponentsForAll - --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} - --build-options - -DCPACK_BINARY_ZIP:BOOL=ON - ${CPackComponentsForAll_EXTRA_OPTIONS} - --graphviz=CPackComponentsForAll.dot - --test-command ${CMAKE_CMAKE_COMMAND} - "-DCPackComponentsForAll_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/buildZIP-NoComponent" - "${CPackRun_CPackCommand}" - "${CPackRun_CPackGen}" - "${CPackRun_CPackComponentWay}" - -P "${CMake_SOURCE_DIR}/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake") - - LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponentsForAll") + # set up list of CPack generators + list(APPEND GENLST "ZIP") + # set up list of component packaging ways + list(APPEND CWAYLST "default") + list(APPEND CWAYLST "OnePackPerGroup") + list(APPEND CWAYLST "IgnoreGroup") + list(APPEND CWAYLST "AllInOne") + list(APPEND CWAYLST "AllGroupsInOne") + foreach(CPackGen ${GENLST}) + set(CPackRun_CPackGen "-DCPackGen=${CPackGen}") + foreach(CPackComponentWay ${CWAYLST}) + set(CPackRun_CPackComponentWay "-DCPackComponentWay=${CPackComponentWay}") + ADD_TEST(CPackComponentsForAll-${CPackGen}-${CPackComponentWay} ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/CPackComponentsForAll" + "${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/build${CPackGen}-${CPackComponentWay}" + --build-generator ${CMAKE_TEST_GENERATOR} + --build-project CPackComponentsForAll + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-options + -DCPACK_BINARY_${CPackGen}:BOOL=ON + ${CPackRun_CPackComponentWay} + ${CPackComponentsForAll_EXTRA_OPTIONS} + --graphviz=CPackComponentsForAll.dot + --test-command ${CMAKE_CMAKE_COMMAND} + "-DCPackComponentsForAll_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/build${CPackGen}-${CPackComponentWay}" + "${CPackRun_CPackCommand}" + "${CPackRun_CPackGen}" + "${CPackRun_CPackComponentWay}" + -P "${CMake_SOURCE_DIR}/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake") + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/build${CPackGen}-${CPackComponentWay}") + endforeach(CPackComponentWay) + endforeach(CPackGen) ENDIF(CTEST_RUN_CPackComponentsForAll) # By default, turn this test off (because it takes a long time...) @@ -805,11 +815,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --test-command ${CMAKE_CTEST_COMMAND} -V ) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject") - # The ExternalProject test takes 900 seconds on some machines! - GET_TEST_PROPERTY(ExternalProject TIMEOUT PREVIOUS_TIMEOUT) - IF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - SET_TESTS_PROPERTIES(ExternalProject PROPERTIES TIMEOUT 1000) - ENDIF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + SET_TESTS_PROPERTIES(ExternalProject PROPERTIES + TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) # do each of the tutorial steps FOREACH(STP RANGE 1 7) @@ -1072,8 +1079,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ IF(CMAKE_TEST_MSVC) ADD_TEST_MACRO(ForceInclude foo) ADD_TEST_MACRO(PrecompiledHeader foo) + ENDIF() + IF(CMAKE_TEST_MSVC OR + "${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles") ADD_TEST_MACRO(ModuleDefinition example_exe) - ENDIF(CMAKE_TEST_MSVC) + ENDIF() ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables) @@ -1134,6 +1144,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") + ADD_TEST(CFBundleTest ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/CFBundleTest" + "${CMake_BINARY_DIR}/Tests/CFBundleTest" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project CFBundleTest + --test-command + ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} + -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest + -Dgen=${CMAKE_TEST_GENERATOR} + -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest") + ADD_TEST_MACRO(ObjC++ ObjC++) ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX) diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt index 8fd52df..cceef3b 100644 --- a/Tests/CMakeTests/CMakeLists.txt +++ b/Tests/CMakeTests/CMakeLists.txt @@ -33,6 +33,8 @@ set_property(TEST CMake.FileDownload PROPERTY PASS_REGULAR_EXPRESSION "file already exists with expected MD5 sum" ) +AddCMakeTest(FileUpload "") + if(HAVE_ELF_H) AddCMakeTest(ELF "") endif() diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in index 578f510..9dc2ebb 100644 --- a/Tests/CMakeTests/FileDownloadTest.cmake.in +++ b/Tests/CMakeTests/FileDownloadTest.cmake.in @@ -37,5 +37,7 @@ file(DOWNLOAD ${url} ${dir}/file3.png TIMEOUT 2 + STATUS status EXPECTED_MD5 d16778650db435bda3a8c3435c3ff5d1 ) +message(STATUS "${status}") diff --git a/Tests/CMakeTests/FileTest.cmake.in b/Tests/CMakeTests/FileTest.cmake.in index 721f311..b6dcaa6 100644 --- a/Tests/CMakeTests/FileTest.cmake.in +++ b/Tests/CMakeTests/FileTest.cmake.in @@ -27,7 +27,7 @@ check_cmake_test(File # Also execute each test listed in FileTestScript.cmake: # set(scriptname "@CMAKE_CURRENT_SOURCE_DIR@/FileTestScript.cmake") -set(number_of_tests_expected 56) +set(number_of_tests_expected 62) include("@CMAKE_CURRENT_SOURCE_DIR@/ExecuteScriptTests.cmake") execute_all_script_tests(${scriptname} number_of_tests_executed) diff --git a/Tests/CMakeTests/FileTestScript.cmake b/Tests/CMakeTests/FileTestScript.cmake index c4e27bd..9a43569 100644 --- a/Tests/CMakeTests/FileTestScript.cmake +++ b/Tests/CMakeTests/FileTestScript.cmake @@ -201,6 +201,26 @@ elseif(testname STREQUAL download_with_bogus_protocol) # pass message("l='${l}'") message("s='${s}'") +elseif(testname STREQUAL upload_wrong_number_of_args) # fail + file(UPLOAD ./ffff) + +elseif(testname STREQUAL upload_missing_time) # fail + file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT) + +elseif(testname STREQUAL upload_missing_log_var) # fail + file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT 2 LOG) + +elseif(testname STREQUAL upload_missing_status_var) # fail + file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT 2 LOG l STATUS) + +elseif(testname STREQUAL upload_file_that_doesnt_exist) # fail + file(UPLOAD ./ffff zzzz://bogus/ffff) + +elseif(testname STREQUAL upload_with_bogus_protocol) # pass + file(UPLOAD ${CMAKE_CURRENT_LIST_FILE} zzzz://bogus/ffff TIMEOUT 2 LOG l STATUS s) + message("l='${l}'") + message("s='${s}'") + else() # fail message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'") diff --git a/Tests/CMakeTests/FileUploadTest.cmake.in b/Tests/CMakeTests/FileUploadTest.cmake.in new file mode 100644 index 0000000..8577aef --- /dev/null +++ b/Tests/CMakeTests/FileUploadTest.cmake.in @@ -0,0 +1,49 @@ +file(REMOVE_RECURSE "@CMAKE_CURRENT_BINARY_DIR@/uploads") + +if(EXISTS "@CMAKE_CURRENT_BINARY_DIR@/uploads/file1.png") + message(FATAL_ERROR "error: file1.png exists - should have been deleted") +endif() +if(EXISTS "@CMAKE_CURRENT_BINARY_DIR@/uploads/file2.png") + message(FATAL_ERROR "error: file2.png exists - should have been deleted") +endif() + +file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/uploads") + +set(filename "@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png") +set(urlbase "file://@CMAKE_CURRENT_BINARY_DIR@/uploads") + +message(STATUS "FileUpload:1") +file(UPLOAD + ${filename} + ${urlbase}/file1.png + TIMEOUT 2 + ) + +message(STATUS "FileUpload:2") +file(UPLOAD + ${filename} + ${urlbase}/file2.png + STATUS status + LOG log + SHOW_PROGRESS + ) + +execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum + "@CMAKE_CURRENT_BINARY_DIR@/uploads/file1.png" + OUTPUT_VARIABLE sum1 + OUTPUT_STRIP_TRAILING_WHITESPACE) +if(NOT sum1 MATCHES "^d16778650db435bda3a8c3435c3ff5d1 .*/uploads/file1.png$") + message(FATAL_ERROR "file1.png did not upload correctly (sum1='${sum1}')") +endif() + +execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum + "@CMAKE_CURRENT_BINARY_DIR@/uploads/file2.png" + OUTPUT_VARIABLE sum2 + OUTPUT_STRIP_TRAILING_WHITESPACE) +if(NOT sum2 MATCHES "^d16778650db435bda3a8c3435c3ff5d1 .*/uploads/file2.png$") + message(FATAL_ERROR "file2.png did not upload correctly (sum2='${sum2}')") +endif() + +message(STATUS "log='${log}'") +message(STATUS "status='${status}'") +message(STATUS "DONE") diff --git a/Tests/CMakeTests/StringTest.cmake.in b/Tests/CMakeTests/StringTest.cmake.in index 54fee7f..6bb60f4 100644 --- a/Tests/CMakeTests/StringTest.cmake.in +++ b/Tests/CMakeTests/StringTest.cmake.in @@ -1,7 +1,7 @@ # Execute each test listed in StringTestScript.cmake: # set(scriptname "@CMAKE_CURRENT_SOURCE_DIR@/StringTestScript.cmake") -set(number_of_tests_expected 52) +set(number_of_tests_expected 69) include("@CMAKE_CURRENT_SOURCE_DIR@/ExecuteScriptTests.cmake") execute_all_script_tests(${scriptname} number_of_tests_executed) diff --git a/Tests/CMakeTests/StringTestScript.cmake b/Tests/CMakeTests/StringTestScript.cmake index 3703856..7a264a0 100644 --- a/Tests/CMakeTests/StringTestScript.cmake +++ b/Tests/CMakeTests/StringTestScript.cmake @@ -194,6 +194,85 @@ elseif(testname STREQUAL random_with_various_alphabets) # pass string(RANDOM LENGTH 78 ALPHABET "~`!@#$%^&*()_-+={}[]\\|:\\;'\",.<>/?" v) message(STATUS "v='${v}'") + message(STATUS "CMAKE_SCRIPT_MODE_FILE='${CMAKE_SCRIPT_MODE_FILE}'") + +elseif(testname STREQUAL string_find_with_no_parameter) # fail + string(FIND) + +elseif(testname STREQUAL string_find_with_one_parameter) # fail + string(FIND "CMake is great.") + +elseif(testname STREQUAL string_find_with_two_parameters) # fail + string(FIND "CMake is great." "a") + +elseif(testname STREQUAL string_find_with_three_parameters) # pass + string(FIND "CMake is great." "a" v) + message(STATUS "v='${v}'") + +elseif(testname STREQUAL string_find_with_four_parameters) # fail + string(FIND "CMake is great." "a" v v2) + +elseif(testname STREQUAL string_find_reverse_with_no_parameter) # fail + string(FIND REVERSE) + +elseif(testname STREQUAL string_find_reverse_with_one_parameter) # fail + string(FIND "CMake is great." REVERSE) + +elseif(testname STREQUAL string_find_reverse_with_two_parameters) # fail + string(FIND "CMake is great." "a" REVERSE) + +elseif(testname STREQUAL string_find_reverse_with_three_parameters) # pass + string(FIND "CMake is great." "a" v REVERSE) + message(STATUS "v='${v}'") + +elseif(testname STREQUAL string_find_reverse_with_four_parameters_part1) # fail + string(FIND "CMake is great." "a" v v2 REVERSE) + +elseif(testname STREQUAL string_find_reverse_with_four_parameters_part2) # fail + string(FIND "CMake is great." "a" v REVERSE v2) + +elseif(testname STREQUAL string_find_with_no_possible_result) # pass + string(FIND "CMake is a great application." "z" v) + message(STATUS "v='${v}'") + if(NOT(-1 EQUAL ${v})) + message(SEND_ERROR "FIND sub-command should return -1 but returned ${v}.") + endif(NOT(-1 EQUAL ${v})) + +elseif(testname STREQUAL string_find_reverse_with_no_possible_result) # pass + string(FIND "CMake is a great application." "z" v REVERSE) + message(STATUS "v='${v}'") + if(NOT(-1 EQUAL ${v})) + message(SEND_ERROR "FIND REVERSE sub-command should return -1 but returned ${v}.") + endif(NOT(-1 EQUAL ${v})) + +elseif(testname STREQUAL string_find_with_required_result) # pass + string(FIND "CMake is a great application." "g" v) + message(STATUS "v='${v}'") + if(NOT(11 EQUAL ${v})) + message(SEND_ERROR "FIND sub-command should return 11 but returned ${v}.") + endif(NOT(11 EQUAL ${v})) + +elseif(testname STREQUAL string_find_reverse_with_required_result) # pass + string(FIND "CMake is a great application." "e" v REVERSE) + message(STATUS "v='${v}'") + if(NOT(13 EQUAL ${v})) + message(SEND_ERROR "FIND REVERSE sub-command should return 13 but returned ${v}.") + endif(NOT(13 EQUAL ${v})) + +elseif(testname STREQUAL string_find_word_reverse_with_required_result) # pass + string(FIND "The command should find REVERSE in this string. Or maybe this REVERSE?!" "REVERSE" v) + message(STATUS "v='${v}'") + if(NOT(24 EQUAL ${v})) + message(SEND_ERROR "FIND sub-command should return 24 but returned ${v}.") + endif(NOT(24 EQUAL ${v})) + +elseif(testname STREQUAL string_find_reverse_word_reverse_with_required_result) # pass + string(FIND "The command should find REVERSE in this string. Or maybe this REVERSE?!" "REVERSE" v REVERSE) + message(STATUS "v='${v}'") + if(NOT(62 EQUAL ${v})) + message(SEND_ERROR "FIND sub-command should return 62 but returned ${v}.") + endif(NOT(62 EQUAL ${v})) + else() # fail message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'") diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt index 971b2dc..bcec509 100644 --- a/Tests/CPackComponentsForAll/CMakeLists.txt +++ b/Tests/CPackComponentsForAll/CMakeLists.txt @@ -107,14 +107,14 @@ set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full) # We may use the CPack specific config file in order -# to tailor CPack behavio on a CPack generator specific way +# to tailor CPack behavior on a CPack generator specific way # (Behavior would be different for RPM or TGZ or DEB ...) -if (USE_CPACK_PROJECT_CONFIG) +if (NOT ("${CPackComponentWay}" STREQUAL "default")) # Setup project specific CPack-time CPack Config file. - configure_file(${MyLib_SOURCE_DIR}/MyLibCPackConfig.cmake.in - ${MyLib_BINARY_DIR}/MyLibCPackConfig.cmake + configure_file(${CPackComponentsForAll_SOURCE_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake.in + ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake @ONLY) - set(CPACK_PROJECT_CONFIG_FILE ${MyLib_BINARY_DIR}/MyLibCPackConfig.cmake) -endif (USE_CPACK_PROJECT_CONFIG) + set(CPACK_PROJECT_CONFIG_FILE ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake) +endif (NOT ("${CPackComponentWay}" STREQUAL "default")) # Include CPack to introduce the appropriate targets include(CPack)
\ No newline at end of file diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in new file mode 100644 index 0000000..3a7119e --- /dev/null +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in @@ -0,0 +1,18 @@ +# +# Activate component packaging +# +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "ZIP") + +if(CPACK_GENERATOR MATCHES "RPM") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "RPM") + +# +# Choose grouping way +# +set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1) +#set(CPACK_COMPONENTS_GROUPING) +#set(CPACK_COMPONENTS_IGNORE_GROUPS 1) +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in new file mode 100644 index 0000000..9a40293 --- /dev/null +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in @@ -0,0 +1,18 @@ +# +# Activate component packaging +# +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "ZIP") + +if(CPACK_GENERATOR MATCHES "RPM") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "RPM") + +# +# Choose grouping way +# +#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1) +#set(CPACK_COMPONENTS_GROUPING) +#set(CPACK_COMPONENTS_IGNORE_GROUPS 1) +set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in new file mode 100644 index 0000000..92a97a5 --- /dev/null +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -0,0 +1,18 @@ +# +# Activate component packaging +# +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "ZIP") + +if(CPACK_GENERATOR MATCHES "RPM") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "RPM") + +# +# Choose grouping way +# +#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE) +#set(CPACK_COMPONENTS_GROUPING) +set(CPACK_COMPONENTS_IGNORE_GROUPS 1) +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
\ No newline at end of file diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in new file mode 100644 index 0000000..4180891 --- /dev/null +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in @@ -0,0 +1,18 @@ +# +# Activate component packaging +# +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "ZIP") + +if(CPACK_GENERATOR MATCHES "RPM") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif(CPACK_GENERATOR MATCHES "RPM") + +# +# Choose grouping way +# +#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE) +#set(CPACK_COMPONENTS_GROUPING) +#set(CPACK_COMPONENTS_IGNORE_GROUPS) +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE)
\ No newline at end of file diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in deleted file mode 100644 index 7ffafae..0000000 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in +++ /dev/null @@ -1,7 +0,0 @@ -if(CPACK_GENERATOR MATCHES "ZIP") -# set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) -endif(CPACK_GENERATOR MATCHES "ZIP") - -if(CPACK_GENERATOR MATCHES "TGZ") - set(CPACK_MONOLITHIC_INSTALL 1) -endif(CPACK_GENERATOR MATCHES "TGZ") diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 11f72ec..45a3b17 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -32,6 +32,34 @@ if(config_type) set(config_args -C ${config_type}) endif() message(" ${config_args}") + +if(CPackGen MATCHES "ZIP") + set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip") + if (${CPackComponentWay} STREQUAL "default") + set(expected_count 1) + endif(${CPackComponentWay} STREQUAL "default") + if (${CPackComponentWay} STREQUAL "OnePackPerGroup") + set(expected_count 2) + endif (${CPackComponentWay} STREQUAL "OnePackPerGroup") + if (${CPackComponentWay} STREQUAL "IgnoreGroup") + set(expected_count 4) + endif (${CPackComponentWay} STREQUAL "IgnoreGroup") + if (${CPackComponentWay} STREQUAL "AllInOne") + set(expected_count 1) + endif (${CPackComponentWay} STREQUAL "AllInOne") + if (${CPackComponentWay} STREQUAL "AllGroupsInOne") + set(expected_count 1) + endif (${CPackComponentWay} STREQUAL "AllGroupsInOne") +endif(CPackGen MATCHES "ZIP") + +# clean-up previously CPack generated files +if(expected_file_mask) + file(GLOB expected_file "${expected_file_mask}") + if (expected_file) + file(REMOVE ${expected_file}) + endif(expected_file) +endif(expected_file_mask) + execute_process(COMMAND ${CPackCommand} -G ${CPackGen} ${config_args} RESULT_VARIABLE CPack_result OUTPUT_VARIABLE CPack_output @@ -44,13 +72,6 @@ else (CPack_result) message(STATUS "CPack_output=${CPack_output}") endif(CPack_result) -if(CPackGen MATCHES "ZIP") - set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip") - if (${CPackComponentWay} STREQUAL "default") - set(expected_count 1) - endif(${CPackComponentWay} STREQUAL "default") -endif(CPackGen MATCHES "ZIP") - # Now verify if the number of expected file is OK # - using expected_file_mask and # - expected_count diff --git a/Tests/CTestTest3/test.cmake.in b/Tests/CTestTest3/test.cmake.in deleted file mode 100644 index 1e8ea50..0000000 --- a/Tests/CTestTest3/test.cmake.in +++ /dev/null @@ -1,120 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.1) - -MACRO(PROJECT_START NAME) - MESSAGE("###################################################") - MESSAGE("") - MESSAGE("Start project: ${NAME}") - MESSAGE("") - MESSAGE("###################################################") -ENDMACRO(PROJECT_START) - -# Project 1 -PROJECT_START("KWSys from CVS") - -# Settings: -SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest3") -SET(CTEST_SITE "@SITE@") -SET(CTEST_BUILD_NAME "KWSys-@BUILDNAME@-CTest3-CVS") - -# --- -SET(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CVS/KWSys") -SET(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CVS/KWSysBin") -SET(CTEST_UPDATE_COMMAND "@CVSCOMMAND@") -SET(CTEST_CMAKE_GENERATOR "@CMAKE_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@") -# for unix purify has to be used as a linker, and -# will not work with ctest. So disable it so -# that it is not attempted. -IF(UNIX) - IF("${CTEST_MEMORYCHECK_COMMAND}" MATCHES purify) - SET(CTEST_MEMORYCHECK_COMMAND) - ENDIF() -ENDIF() -SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") -SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") -SET(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" -q -z3 \"-d:pserver:anoncvs@www.cmake.org:/cvsroot/KWSys\" co -r CTest-Testing-Tag KWSys") - -CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) - -FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " -CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ -CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ -CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ -CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ -CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ -CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ - -# This one is needed for testing advanced ctest features -CTEST_TEST_KWSYS:BOOL=ON -") - -SET(CTEST_CUSTOM_WARNING_MATCH CommandLineArguments) - -CTEST_START(Nightly) -CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res) -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) -CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 5 SCHEDULE_RANDOM ON) -CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) -CTEST_COVERAGE(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) - -#SET(svncommand "@SVNCOMMAND@") -set(svncommand FALSE) # turn this off until namic svn cmake is back -IF(svncommand) - # Project 2 - PROJECT_START("KWSys from SVN") - - # Settings: - SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest3") - SET(CTEST_SITE "@SITE@") - SET(CTEST_BUILD_NAME "KWSys-@BUILDNAME@-CTest3-SVN") - - # --- - SET(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/SVN/kwsys") - SET(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/SVN/kwsysBin") - SET(CTEST_UPDATE_COMMAND "@SVNCOMMAND@") - SET(CTEST_CMAKE_GENERATOR "@CMAKE_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}") - SET(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co \"http://svn.na-mic.org:8000/svn/CMake/Source/kwsys/\" -r 500") - - CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) - - FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " - CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ - CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ - CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ - CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ - CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ - CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ - - # This one is needed for testing advanced ctest features - CTEST_TEST_KWSYS:BOOL=ON - ") - - CTEST_START(Experimental) - CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res) - 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 5 SCHEDULE_RANDOM ON) - CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 5) - CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) - CTEST_SUBMIT(RETURN_VALUE res) - -ELSE(svncommand) - MESSAGE("Cannot find SVN command: ${svncommand}") -ENDIF(svncommand) diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index 743e835..5d22d35 100644 --- a/Tests/CTestTestBadExe/test.cmake.in +++ b/Tests/CTestTestBadExe/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadEx 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}") diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index c3c41a5..8413544 100644 --- a/Tests/CTestTestChecksum/test.cmake.in +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParal 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}") diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index ce4d60a..ca216e3 100644 --- a/Tests/CTestTestCostSerial/test.cmake.in +++ b/Tests/CTestTestCostSerial/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCostS 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}") diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in index 259c8659..5cec594 100644 --- a/Tests/CTestTestCrash/test.cmake.in +++ b/Tests/CTestTestCrash/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCrash 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}") diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in index a17adca..201f604 100644 --- a/Tests/CTestTestCycle/test.cmake.in +++ b/Tests/CTestTestCycle/test.cmake.in @@ -10,9 +10,6 @@ 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}") diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in index ed4e182..36a1ebf 100644 --- a/Tests/CTestTestDepends/test.cmake.in +++ b/Tests/CTestTestDepends/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestDepen 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}") diff --git a/Tests/CTestTestFailedSubmits/test.cmake.in b/Tests/CTestTestFailedSubmits/test.cmake.in index 9b581eb..b0e1632 100644 --- a/Tests/CTestTestFailedSubmits/test.cmake.in +++ b/Tests/CTestTestFailedSubmits/test.cmake.in @@ -22,9 +22,6 @@ SET(CTEST_BINARY_DIRECTORY "@build@") SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") SET(CTEST_CMAKE_GENERATOR "@CMAKE_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}") @@ -39,7 +36,6 @@ 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) -CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" @ctest_coverage_labels_args@ RETURN_VALUE res) # ok to call ctest_submit - still avoids network activity because there is diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in index b0bb039..7bc921a 100644 --- a/Tests/CTestTestFailure/testNoBuild.cmake.in +++ b/Tests/CTestTestFailure/testNoBuild.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailu 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}") diff --git a/Tests/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in index 69d4f84..59c18d7 100644 --- a/Tests/CTestTestFailure/testNoExe.cmake.in +++ b/Tests/CTestTestFailure/testNoExe.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailu 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}") diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in index 6ca15f6..83845de 100644 --- a/Tests/CTestTestParallel/test.cmake.in +++ b/Tests/CTestTestParallel/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParal 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}") diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in index 0f353b8..98c5901 100644 --- a/Tests/CTestTestResourceLock/test.cmake.in +++ b/Tests/CTestTestResourceLock/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestResou 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}") diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in index 2a91829..505bd7c 100644 --- a/Tests/CTestTestScheduler/test.cmake.in +++ b/Tests/CTestTestScheduler/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSched 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}") diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index 6a5534e..2d03686 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestStopT 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}") diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in index c8d4fda..f240473 100644 --- a/Tests/CTestTestSubdir/test.cmake.in +++ b/Tests/CTestTestSubdir/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSubdi 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}") diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index 6ed11a4..8a8dc24 100644 --- a/Tests/CTestTestTimeout/test.cmake.in +++ b/Tests/CTestTestTimeout/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestTimeo 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}") diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in index 0ff32a4..56bae9d 100644 --- a/Tests/CTestTestZeroTimeout/test.cmake.in +++ b/Tests/CTestTestZeroTimeout/test.cmake.in @@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestZeroT 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}") SET(CTEST_TEST_TIMEOUT 2) diff --git a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt index 57cb712..36d32e4 100644 --- a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt +++ b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt @@ -9,8 +9,8 @@ ADD_CUSTOM_COMMAND( ) SET_SOURCE_FILES_PROPERTIES( - "${TestWorkingDir_BINARY_DIR}/working.c" - "${TestWorkingDir_BINARY_DIR}/customTarget.c" + "${TestWorkingDir_BINARY_DIR}/customTarget.c" + "${TestWorkingDir_BINARY_DIR}/customTarget2.c" PROPERTIES GENERATED 1) ADD_EXECUTABLE(working "${TestWorkingDir_BINARY_DIR}/working.c" @@ -23,3 +23,20 @@ ADD_CUSTOM_TARGET( ) ADD_DEPENDENCIES(working Custom) + +file(MAKE_DIRECTORY ${TestWorkingDir_BINARY_DIR}/work) +add_custom_command( + OUTPUT working2.c # Relative to build tree + COMMAND "${CMAKE_COMMAND}" -E copy ${TestWorkingDir_SOURCE_DIR}/working.c.in ../working2.c + DEPENDS ${TestWorkingDir_SOURCE_DIR}/working.c.in/ # trailing slash should be removed + WORKING_DIRECTORY work/ # Relative to build tree, trailing slash + ) +add_executable(working2 working2.c ${TestWorkingDir_BINARY_DIR}/customTarget2.c) + +add_custom_target( + Custom2 ALL + COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${TestWorkingDir_SOURCE_DIR}/customTarget.c ../customTarget2.c + WORKING_DIRECTORY work/ # Relative to build tree, trailing slash +) + +add_dependencies(working2 Custom2) diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index 04563ef..c68d543 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -22,8 +22,19 @@ elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") endif() endif() +# Pick a module .def file with the properly mangled symbol name. +set(world_def "") +if(WIN32 AND NOT CYGWIN) + if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") + set(world_def world_gnu.def) + elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" OR + "${CMAKE_GENERATOR}" MATCHES "Visual Studio") # Intel plugin + set(world_def world_icl.def) + endif() +endif() + add_library(hello STATIC hello.f) -add_library(world ${_SHARED} world.f world.def) +add_library(world ${_SHARED} world.f ${world_def}) add_executable(testf testf.f) target_link_libraries(testf hello world) diff --git a/Tests/Fortran/world_gnu.def b/Tests/Fortran/world_gnu.def new file mode 100644 index 0000000..1617798 --- /dev/null +++ b/Tests/Fortran/world_gnu.def @@ -0,0 +1,2 @@ +EXPORTS + world_ diff --git a/Tests/Fortran/world.def b/Tests/Fortran/world_icl.def index ead7710..ead7710 100644 --- a/Tests/Fortran/world.def +++ b/Tests/Fortran/world_icl.def |