diff options
Diffstat (limited to 'Tests')
53 files changed, 794 insertions, 230 deletions
diff --git a/Tests/BundleUtilities/CMakeLists.txt b/Tests/BundleUtilities/CMakeLists.txt new file mode 100644 index 0000000..6209c8f --- /dev/null +++ b/Tests/BundleUtilities/CMakeLists.txt @@ -0,0 +1,84 @@ +cmake_minimum_required(VERSION 2.8) +project(BundleUtilities) + +###### the various types of dependencies we can have + +# a shared library +add_library(shared SHARED shared.cpp shared.h) + +# another shared library +add_library(shared2 SHARED shared2.cpp shared2.h) + + +# a framework library +add_library(framework SHARED framework.cpp framework.h) +# TODO: fix problems with local frameworks without rpaths +#set_target_properties(framework PROPERTIES FRAMEWORK 1) + +# make sure rpaths are not helping BundleUtilities or the executables +set_target_properties(shared shared2 framework PROPERTIES + SKIP_BUILD_RPATH 1) + + +###### test a Bundle application using dependencies + +# a loadable module (depends on shared2) +# testbundleutils1 will load this at runtime +add_library(module1 MODULE module.cpp module.h) +set_target_properties(module1 PROPERTIES PREFIX "") +get_target_property(module_loc module1 LOCATION) +target_link_libraries(module1 shared2) + +# a bundle application +add_executable(testbundleutils1 MACOSX_BUNDLE testbundleutils1.cpp) +target_link_libraries(testbundleutils1 shared framework ${CMAKE_DL_LIBS}) +get_target_property(loc testbundleutils1 LOCATION) + +set_target_properties(testbundleutils1 module1 PROPERTIES + INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}/testdir1" + BUILD_WITH_INSTALL_RPATH 1) + +# add custom target to install and test the app +add_custom_target(testbundleutils1_test ALL + COMMAND ${CMAKE_COMMAND} + "-DINPUT=${loc}" + "-DMODULE=${module_loc}" + "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" + "-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir1" + -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" + DEPENDS testbundleutils1 module1 + ) + +add_dependencies(testbundleutils1_test testbundleutils1) + + + +###### test a non-Bundle application using dependencies + +# a loadable module (depends on shared2) +# testbundleutils2 will load this at runtime +add_library(module2 MODULE module.cpp module.h) +set_target_properties(module2 PROPERTIES PREFIX "") +get_target_property(module_loc module2 LOCATION) +target_link_libraries(module2 shared2) + +# a non-bundle application +add_executable(testbundleutils2 testbundleutils2.cpp) +target_link_libraries(testbundleutils2 shared framework ${CMAKE_DL_LIBS}) +get_target_property(loc testbundleutils2 LOCATION) + +set_target_properties(testbundleutils2 module2 PROPERTIES + INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}/testdir2" + BUILD_WITH_INSTALL_RPATH 1) + +# add custom target to install and test the app +add_custom_target(testbundleutils2_test ALL + COMMAND ${CMAKE_COMMAND} + "-DINPUT=${loc}" + "-DMODULE=${module_loc}" + "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" + "-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir2" + -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" + DEPENDS testbundleutils1 module2 + ) +add_dependencies(testbundleutils2_test testbundleutils2) diff --git a/Tests/BundleUtilities/bundleutils.cmake b/Tests/BundleUtilities/bundleutils.cmake new file mode 100644 index 0000000..46765e7 --- /dev/null +++ b/Tests/BundleUtilities/bundleutils.cmake @@ -0,0 +1,45 @@ + +# clean passed in arguments +get_filename_component(INPUT ${INPUT} ABSOLUTE) +get_filename_component(INPUTDIR ${INPUTDIR} ABSOLUTE) + +message("INPUT = ${INPUT}") +message("MODULE = ${MODULE}") +message("INPUTDIR = ${INPUTDIR}") +message("OUTPUTDIR = ${OUTPUTDIR}") + +# compute location to install/test things +file(RELATIVE_PATH relative_exe "${INPUTDIR}" "${INPUT}") +set(OUTPUT "${OUTPUTDIR}/${relative_exe}") +message("OUTPUT = ${OUTPUT}") +get_filename_component(EXE_DIR "${OUTPUT}" PATH) +get_filename_component(MODULE_NAME "${MODULE}" NAME) +set(OUTPUT_MODULE "${EXE_DIR}/${MODULE_NAME}") +message("OUTPUTMODULE = ${OUTPUT_MODULE}") + +# clean output dir +file(REMOVE_RECURSE "${OUTPUTDIR}") +# copy the app and plugin to installation/testing directory +configure_file("${INPUT}" "${OUTPUT}" COPYONLY) +configure_file("${MODULE}" "${OUTPUT_MODULE}" COPYONLY) + +# have BundleUtilities grab all dependencies and +# check that the app runs + +# for this test we'll override location to put all dependencies +# (in the same dir as the app) +# this shouldn't be necessary except for the non-bundle case on Mac +function(gp_item_default_embedded_path_override item path) + set(path "@executable_path" PARENT_SCOPE) +endfunction(gp_item_default_embedded_path_override) + +include(BundleUtilities) +fixup_bundle("${OUTPUT}" "${OUTPUT_MODULE}" "${INPUTDIR}") + +# make sure we can run the app +message("Executing ${OUTPUT} in ${EXE_DIR}") +execute_process(COMMAND "${OUTPUT}" RESULT_VARIABLE result OUTPUT_VARIABLE out ERROR_VARIABLE out WORKING_DIRECTORY "${EXE_DIR}") + +if(NOT result STREQUAL "0") + message(FATAL_ERROR " failed to execute test program\n${out}") +endif(NOT result STREQUAL "0") diff --git a/Tests/BundleUtilities/framework.cpp b/Tests/BundleUtilities/framework.cpp new file mode 100644 index 0000000..abda195 --- /dev/null +++ b/Tests/BundleUtilities/framework.cpp @@ -0,0 +1,8 @@ + +#include "framework.h" +#include "stdio.h" + +void framework() +{ + printf("framework\n"); +} diff --git a/Tests/BundleUtilities/framework.h b/Tests/BundleUtilities/framework.h new file mode 100644 index 0000000..bdd10f0 --- /dev/null +++ b/Tests/BundleUtilities/framework.h @@ -0,0 +1,17 @@ + +#ifndef framework_h +#define framework_h + +#ifdef WIN32 +# ifdef framework_EXPORTS +# define FRAMEWORK_EXPORT __declspec(dllexport) +# else +# define FRAMEWORK_EXPORT __declspec(dllimport) +# endif +#else +# define FRAMEWORK_EXPORT +#endif + +void FRAMEWORK_EXPORT framework(); + +#endif diff --git a/Tests/BundleUtilities/module.cpp b/Tests/BundleUtilities/module.cpp new file mode 100644 index 0000000..ee1b542 --- /dev/null +++ b/Tests/BundleUtilities/module.cpp @@ -0,0 +1,10 @@ + +#include "module.h" +#include "stdio.h" +#include "shared2.h" + +void module() +{ + printf("module\n"); + shared2(); +} diff --git a/Tests/BundleUtilities/module.h b/Tests/BundleUtilities/module.h new file mode 100644 index 0000000..0659bc7 --- /dev/null +++ b/Tests/BundleUtilities/module.h @@ -0,0 +1,7 @@ + +#ifndef module_h +#define module_h + +void module(); + +#endif diff --git a/Tests/BundleUtilities/shared.cpp b/Tests/BundleUtilities/shared.cpp new file mode 100644 index 0000000..e5e7dc5 --- /dev/null +++ b/Tests/BundleUtilities/shared.cpp @@ -0,0 +1,8 @@ + +#include "shared.h" +#include "stdio.h" + +void shared() +{ + printf("shared\n"); +} diff --git a/Tests/BundleUtilities/shared.h b/Tests/BundleUtilities/shared.h new file mode 100644 index 0000000..3588fb8 --- /dev/null +++ b/Tests/BundleUtilities/shared.h @@ -0,0 +1,17 @@ + +#ifndef shared_h +#define shared_h + +#ifdef WIN32 +# ifdef shared_EXPORTS +# define SHARED_EXPORT __declspec(dllexport) +# else +# define SHARED_EXPORT __declspec(dllimport) +# endif +#else +# define SHARED_EXPORT +#endif + +void SHARED_EXPORT shared(); + +#endif diff --git a/Tests/BundleUtilities/shared2.cpp b/Tests/BundleUtilities/shared2.cpp new file mode 100644 index 0000000..84af5d0 --- /dev/null +++ b/Tests/BundleUtilities/shared2.cpp @@ -0,0 +1,8 @@ + +#include "shared2.h" +#include "stdio.h" + +void shared2() +{ + printf("shared2\n"); +} diff --git a/Tests/BundleUtilities/shared2.h b/Tests/BundleUtilities/shared2.h new file mode 100644 index 0000000..d53546c --- /dev/null +++ b/Tests/BundleUtilities/shared2.h @@ -0,0 +1,17 @@ + +#ifndef shared2_h +#define shared2_h + +#ifdef WIN32 +# ifdef shared2_EXPORTS +# define SHARED2_EXPORT __declspec(dllexport) +# else +# define SHARED2_EXPORT __declspec(dllimport) +# endif +#else +# define SHARED2_EXPORT +#endif + +void SHARED2_EXPORT shared2(); + +#endif diff --git a/Tests/BundleUtilities/testbundleutils1.cpp b/Tests/BundleUtilities/testbundleutils1.cpp new file mode 100644 index 0000000..23d3cbd --- /dev/null +++ b/Tests/BundleUtilities/testbundleutils1.cpp @@ -0,0 +1,33 @@ + +#include "framework.h" +#include "shared.h" +#include "stdio.h" + +#if defined(WIN32) +#include <windows.h> +#else +#include "dlfcn.h" +#endif + +int main(int, char**) +{ + framework(); + shared(); + +#if defined(WIN32) + HANDLE lib = LoadLibraryA("module1.dll"); + if(!lib) + { + printf("Failed to open module1\n"); + } +#else + void* lib = dlopen("module1.so", RTLD_LAZY); + if(!lib) + { + printf("Failed to open module1\n%s\n", dlerror()); + } +#endif + + + return lib == 0 ? 1 : 0; +} diff --git a/Tests/BundleUtilities/testbundleutils2.cpp b/Tests/BundleUtilities/testbundleutils2.cpp new file mode 100644 index 0000000..319be89 --- /dev/null +++ b/Tests/BundleUtilities/testbundleutils2.cpp @@ -0,0 +1,33 @@ + +#include "framework.h" +#include "shared.h" +#include "stdio.h" + +#if defined(WIN32) +#include <windows.h> +#else +#include "dlfcn.h" +#endif + +int main(int, char**) +{ + framework(); + shared(); + +#if defined(WIN32) + HANDLE lib = LoadLibraryA("module2.dll"); + if(!lib) + { + printf("Failed to open module2\n"); + } +#else + void* lib = dlopen("module2.so", RTLD_LAZY); + if(!lib) + { + printf("Failed to open module2\n%s\n", dlerror()); + } +#endif + + + return lib == 0 ? 1 : 0; +} diff --git a/Tests/CFBundleTest/README.txt b/Tests/CFBundleTest/README.txt index 248651b..86c1463 100644 --- a/Tests/CFBundleTest/README.txt +++ b/Tests/CFBundleTest/README.txt @@ -1,5 +1,5 @@ -CFBundle test project. The generated .plugin/ bundle from either makefiles or XCode should look like this: +CFBundle test project. The generated .plugin/ bundle from either makefiles or Xcode should look like this: ./Contents ./Contents/Info.plist diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index bda2fa5..41bf034 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -30,3 +30,8 @@ endif() foreach(test ${CMakeLib_TESTS}) add_test(CMakeLib.${test} CMakeLibTests ${test}) endforeach() + +if(TEST_CompileCommandOutput) + add_executable(runcompilecommands run_compile_commands.cxx) + target_link_libraries(runcompilecommands CMakeLib) +endif() diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx new file mode 100644 index 0000000..3f141c5 --- /dev/null +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -0,0 +1,141 @@ +#include "cmSystemTools.h" + +class CompileCommandParser { +public: + class CommandType: public std::map<cmStdString, cmStdString> + { + public: + cmStdString const& at(cmStdString const& k) const + { + const_iterator i = this->find(k); + if(i != this->end()) { return i->second; } + static cmStdString emptyString; + return emptyString; + } + }; + typedef std::vector<CommandType> TranslationUnitsType; + + CompileCommandParser(std::ifstream *input) + { + this->Input = input; + } + + void Parse() + { + NextNonWhitespace(); + ParseTranslationUnits(); + } + + const TranslationUnitsType& GetTranslationUnits() + { + return this->TranslationUnits; + } + +private: + void ParseTranslationUnits() + { + this->TranslationUnits = TranslationUnitsType(); + ExpectOrDie('[', "at start of compile command file"); + do + { + ParseTranslationUnit(); + this->TranslationUnits.push_back(this->Command); + } while(Expect(',')); + ExpectOrDie(']', "at end of array"); + } + + void ParseTranslationUnit() + { + this->Command = CommandType(); + if(!Expect('{')) return; + if(Expect('}')) return; + do + { + ParseString(); + std::string name = this->String; + ExpectOrDie(':', "between name and value"); + ParseString(); + std::string value = this->String; + this->Command[name] = value; + } while(Expect(',')); + ExpectOrDie('}', "at end of object"); + } + + void ParseString() + { + this->String.clear(); + if(!Expect('"')) return; + while (!Expect('"')) + { + Expect('\\'); + this->String.push_back(C); + Next(); + } + } + + bool Expect(char c) + { + if(this->C == c) + { + NextNonWhitespace(); + return true; + } + return false; + } + + void ExpectOrDie(char c, const std::string & message) + { + if (!Expect(c)) + ErrorExit(std::string("'") + c + "' expected " + message + "."); + } + + void NextNonWhitespace() + { + do { Next(); } while (IsWhitespace()); + } + + void Next() + { + this->C = char(Input->get()); + if (this->Input->bad()) ErrorExit("Unexpected end of file."); + } + + void ErrorExit(const std::string &message) { + std::cout << "ERROR: " << message; + exit(1); + } + + bool IsWhitespace() + { + return (this->C == ' ' || this->C == '\t' || + this->C == '\n' || this->C == '\r'); + } + + char C; + TranslationUnitsType TranslationUnits; + CommandType Command; + std::string String; + std::ifstream *Input; +}; + +int main () +{ + std::ifstream file("compile_commands.json"); + CompileCommandParser parser(&file); + parser.Parse(); + for(CompileCommandParser::TranslationUnitsType::const_iterator + it = parser.GetTranslationUnits().begin(), + end = parser.GetTranslationUnits().end(); it != end; ++it) + { + std::vector<cmStdString> command; + cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); + if (!cmSystemTools::RunSingleCommand( + command, 0, 0, it->at("directory").c_str())) + { + std::cout << "ERROR: Failed to run command \"" + << command[0] << "\"" << std::endl; + exit(1); + } + } + return 0; +} diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index db880c1..4bf83b7 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -11,6 +11,7 @@ MACRO(ADD_TEST_MACRO NAME COMMAND) --build-generator ${CMAKE_TEST_GENERATOR} --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-project ${proj} + ${${NAME}_EXTRA_OPTIONS} --test-command ${COMMAND} ${ARGN}) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}") ENDMACRO(ADD_TEST_MACRO) @@ -39,6 +40,10 @@ CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in # Testing IF(BUILD_TESTING) + IF("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles") + SET(TEST_CompileCommandOutput 1) + ENDIF() + ADD_SUBDIRECTORY(CMakeLib) # Collect a list of all test build directories. @@ -188,6 +193,24 @@ IF(BUILD_TESTING) LIST(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX}) + + # run test for BundleUtilities on supported platforms/compilers + if(MSVC OR + CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "Darwin") + if(NOT "${CMAKE_TEST_GENERATOR}" STREQUAL "Watcom WMake") + ADD_TEST(BundleUtilities ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/BundleUtilities" + "${CMake_BINARY_DIR}/Tests/BundleUtilities" + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project BundleUtilities + ) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleUtilities") + endif() + endif() + SET(CMAKE_BUILD_TEST_SOURCE_DIR "${CMake_SOURCE_DIR}/Tests/COnly") SET(CMAKE_BUILD_TEST_BINARY_DIR "${CMake_BINARY_DIR}/Tests/CMakeBuildCOnly") CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in" @@ -566,6 +589,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}") # set up list of CPack generators list(APPEND GENLST "ZIP") + if(APPLE) + list(APPEND GENLST "DragNDrop") + endif(APPLE) if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") find_program(RPMBUILD NAMES rpmbuild) endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") @@ -583,7 +609,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ 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}) @@ -1245,7 +1270,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project WarnUnusedCliUnused --build-options "-DUNUSED_CLI_VARIABLE=Unused") SET_TESTS_PROPERTIES(WarnUnusedCliUnused PROPERTIES - PASS_REGULAR_EXPRESSION "CMake Warning: The variable, 'UNUSED_CLI_VARIABLE'") + PASS_REGULAR_EXPRESSION "CMake Warning:.*Manually-specified variables were not used by the project:.* UNUSED_CLI_VARIABLE") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused") ADD_TEST(WarnUnusedCliUsed ${CMAKE_CTEST_COMMAND} @@ -1285,7 +1310,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-exe-dir "${CMake_BINARY_DIR}/Tests/TestsWorkingDirectory" --force-new-ctest-process - --test-command ${CMAKE_CTEST_COMMAND} -V + --test-command ${CMAKE_CTEST_COMMAND} -V -C \${CTEST_CONFIGURATION_TYPE} ) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/TestsWorkingDirectory") @@ -1443,6 +1468,16 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ PASS_REGULAR_EXPRESSION "Could not find executable" FAIL_REGULAR_EXPRESSION "SegFault") + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestUpload ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" + ) + SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES + PASS_REGULAR_EXPRESSION "Upload\\.xml") # Use macro, not function so that build can still be driven by CMake 2.4. # After 2.6 is required, this could be a function without the extra 'set' @@ -2019,6 +2054,25 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ENDIF() SET_TESTS_PROPERTIES(Contracts.${project} PROPERTIES TIMEOUT ${timeout}) ENDFOREACH() + + IF(TEST_CompileCommandOutput) + SET(CompileCommandOutput_EXTRA_OPTIONS + --build-options -DMAKE_SUPPORTS_SPACES=${MAKE_IS_GNU}) + ADD_TEST_MACRO(CompileCommandOutput + "${CMake_BINARY_DIR}/Tests/CMakeLib/runcompilecommands") + ENDIF() + + ADD_TEST(IncludeDirectories ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/IncludeDirectories" + "${CMake_BINARY_DIR}/Tests/IncludeDirectories" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-project IncludeDirectories + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --test-command IncludeDirectories) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/IncludeDirectories") + ENDIF(BUILD_TESTING) SUBDIRS(CMakeTests) diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in index 3fb4652..dbe9500 100644 --- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in @@ -84,6 +84,13 @@ set(linux64_nagfor_dirs "/usr/lib/gcc/x86_64-redhat-linux/4.4.5;/usr/lib64;/lib6 set(linux64_nagfor_obj_regex "^/usr/local/NAG/lib") list(APPEND platforms linux64_nagfor) +# absoft dummy.f -X -v +set(linux64_absoft_text "collect2 version 4.4.5 (x86-64 Linux/ELF) +/usr/bin/ld --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbegin.o -L/opt/absoft11.1/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. /tmp/E3Bii1/dummy.o -v -laf90math -lafio -lamisc -labsoftmain -laf77math -lm -lmv -lpthread -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crtn.o") +set(linux64_absoft_libs "af90math;afio;amisc;absoftmain;af77math;m;mv;pthread;c") +set(linux64_absoft_dirs "/opt/absoft11.1/lib64;/usr/lib/gcc/x86_64-linux-gnu/4.4.5;/usr/lib;/lib") +list(APPEND platforms linux64_absoft) + # gcc dummy.c -v # in strange path set(linux64_test1_text " /this/might/match/as/a/linker/ld/but/it/is/not because the ld is not the last path component @@ -125,6 +132,14 @@ set(mac_ppc_g++_libs "stdc++") set(mac_ppc_g++_dirs "/usr/lib/powerpc-apple-darwin10/4.2.1;/usr/lib/gcc/powerpc-apple-darwin10/4.2.1;/usr/lib") list(APPEND platforms mac_ppc_g++) +# absoft dummy.f -X -v +set(mac_absoft_text "collect2 version 4.2.1 (Apple Inc. build 5664) (i686 Darwin) +/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld -dynamic -arch i386 -macosx_version_min 10.6.6 -weak_reference_mismatches non-weak -o a.out -lcrt1.10.6.o -L/Applications/Absoft11.1/lib -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. /var/folders/04/04+Djjm8GZWBmuEdp2Gsw++++TM/-Tmp-//bTAoJc/dummy.o -v -Y 10 -laf90math -lafio -lamisc -labsoftmain -laf77math -lm -lmv -lSystem -lgcc -lSystem +") +set(mac_absoft_libs "af90math;afio;amisc;absoftmain;af77math;m;mv") +set(mac_absoft_dirs "/Applications/Absoft11.1/lib;/usr/lib/i686-apple-darwin10/4.2.1;/usr/lib/gcc/i686-apple-darwin10/4.2.1;/usr/lib") +list(APPEND platforms mac_absoft) + #----------------------------------------------------------------------------- # Sun diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt index ce12b3b..5449d09 100644 --- a/Tests/CPackComponentsForAll/CMakeLists.txt +++ b/Tests/CPackComponentsForAll/CMakeLists.txt @@ -10,13 +10,8 @@ cmake_minimum_required(VERSION 2.8.3.20101130 FATAL_ERROR) project(CPackComponentsForAll) -set(LIBDEST "lib") -include(${CMAKE_SOURCE_DIR}/SystemSpecificInformations.cmake) -if(DISTRO_ID MATCHES "SUSE") - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - set(LIBDEST "lib64") - endif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) -endif(DISTRO_ID MATCHES "SUSE") +# Use GNUInstallDirs in order to enforce lib64 if needed +include(GNUInstallDirs) # Create the mylib library add_library(mylib mylib.cpp) @@ -35,7 +30,7 @@ target_link_libraries(mylibapp2 mylib) # be used to create the installation components. install(TARGETS mylib ARCHIVE - DESTINATION ${LIBDEST} + DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) install(TARGETS mylibapp RUNTIME diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in deleted file mode 100644 index 85626be..0000000 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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") - -if(CPACK_GENERATOR MATCHES "DEB") - set(CPACK_DEB_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "DEB") - -# -# 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-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in index 7b665b6..1e1a410 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in @@ -13,10 +13,14 @@ if(CPACK_GENERATOR MATCHES "DEB") set(CPACK_DEB_COMPONENT_INSTALL "ON") endif(CPACK_GENERATOR MATCHES "DEB") +if(CPACK_GENERATOR MATCHES "DragNDrop") + set(CPACK_COMPONENTS_GROUPING "ONE_PER_GROUP") +endif(CPACK_GENERATOR MATCHES "DragNDrop") + # # 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 +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE) diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index ae0ee1a..e2d343d 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -37,38 +37,50 @@ 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") + elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup") set(expected_count 3) - endif (${CPackComponentWay} STREQUAL "OnePackPerGroup") - if (${CPackComponentWay} STREQUAL "IgnoreGroup") + elseif (${CPackComponentWay} STREQUAL "IgnoreGroup") set(expected_count 4) - endif (${CPackComponentWay} STREQUAL "IgnoreGroup") - if (${CPackComponentWay} STREQUAL "AllInOne") + elseif (${CPackComponentWay} STREQUAL "AllInOne") set(expected_count 1) - endif (${CPackComponentWay} STREQUAL "AllInOne") - if (${CPackComponentWay} STREQUAL "AllGroupsInOne") - set(expected_count 1) - endif (${CPackComponentWay} STREQUAL "AllGroupsInOne") + endif () elseif (CPackGen MATCHES "RPM") set(config_verbose -D "CPACK_RPM_PACKAGE_DEBUG=1") set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.rpm") 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") + elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup") + set(expected_count 3) + elseif (${CPackComponentWay} STREQUAL "IgnoreGroup") + set(expected_count 4) + elseif (${CPackComponentWay} STREQUAL "AllInOne") + set(expected_count 1) + endif () +elseif (CPackGen MATCHES "DEB") + set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.deb") + if (${CPackComponentWay} STREQUAL "default") + set(expected_count 1) + elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup") + set(expected_count 3) + elseif (${CPackComponentWay} STREQUAL "IgnoreGroup") set(expected_count 4) - endif (${CPackComponentWay} STREQUAL "IgnoreGroup") - if (${CPackComponentWay} STREQUAL "AllInOne") + elseif (${CPackComponentWay} STREQUAL "AllInOne") + set(expected_count 1) + endif () +endif() + +if(CPackGen MATCHES "DragNDrop") + set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.dmg") + if (${CPackComponentWay} STREQUAL "default") set(expected_count 1) - endif (${CPackComponentWay} STREQUAL "AllInOne") - if (${CPackComponentWay} STREQUAL "AllGroupsInOne") + elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup") + set(expected_count 3) + elseif (${CPackComponentWay} STREQUAL "IgnoreGroup") + set(expected_count 4) + elseif (${CPackComponentWay} STREQUAL "AllInOne") set(expected_count 1) - endif (${CPackComponentWay} STREQUAL "AllGroupsInOne") -endif(CPackGen MATCHES "ZIP") + endif () +endif(CPackGen MATCHES "DragNDrop") # clean-up previously CPack generated files if(expected_file_mask) diff --git a/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake b/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake deleted file mode 100644 index 8d11400..0000000 --- a/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake +++ /dev/null @@ -1,164 +0,0 @@ - -# define a set of string with may-be useful readable name -# this file is meant to be included in a CMakeLists.txt -# not as a standalone CMake script -set(SPECIFIC_COMPILER_NAME "") -set(SPECIFIC_SYSTEM_VERSION_NAME "") -set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "") - -# In the WIN32 case try to guess a "readable system name" -if(WIN32) - set(SPECIFIC_SYSTEM_PREFERED_PACKAGE "NSIS") - # information taken from - # http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973/ - # Win9x series - if(CMAKE_SYSTEM_VERSION MATCHES "4.0") - set(SPECIFIC_SYSTEM_VERSION_NAME "Win95") - endif(CMAKE_SYSTEM_VERSION MATCHES "4.0") - if(CMAKE_SYSTEM_VERSION MATCHES "4.10") - set(SPECIFIC_SYSTEM_VERSION_NAME "Win98") - endif(CMAKE_SYSTEM_VERSION MATCHES "4.10") - if(CMAKE_SYSTEM_VERSION MATCHES "4.90") - set(SPECIFIC_SYSTEM_VERSION_NAME "WinME") - endif(CMAKE_SYSTEM_VERSION MATCHES "4.90") - - # WinNTyyy series - if(CMAKE_SYSTEM_VERSION MATCHES "3.0") - set(SPECIFIC_SYSTEM_VERSION_NAME "WinNT351") - endif(CMAKE_SYSTEM_VERSION MATCHES "3.0") - if(CMAKE_SYSTEM_VERSION MATCHES "4.1") - set(SPECIFIC_SYSTEM_VERSION_NAME "WinNT4") - endif(CMAKE_SYSTEM_VERSION MATCHES "4.1") - - # Win2000/XP series - if(CMAKE_SYSTEM_VERSION MATCHES "5.0") - set(SPECIFIC_SYSTEM_VERSION_NAME "Win2000") - endif(CMAKE_SYSTEM_VERSION MATCHES "5.0") - if(CMAKE_SYSTEM_VERSION MATCHES "5.1") - set(SPECIFIC_SYSTEM_VERSION_NAME "WinXP") - endif(CMAKE_SYSTEM_VERSION MATCHES "5.1") - if(CMAKE_SYSTEM_VERSION MATCHES "5.2") - set(SPECIFIC_SYSTEM_VERSION_NAME "Win2003") - endif(CMAKE_SYSTEM_VERSION MATCHES "5.2") - - # WinVista/7 series - if(CMAKE_SYSTEM_VERSION MATCHES "6.0") - set(SPECIFIC_SYSTEM_VERSION_NAME "WinVISTA") - endif(CMAKE_SYSTEM_VERSION MATCHES "6.0") - if(CMAKE_SYSTEM_VERSION MATCHES "6.1") - set(SPECIFIC_SYSTEM_VERSION_NAME "Win7") - endif(CMAKE_SYSTEM_VERSION MATCHES "6.1") - - # Compilers - # taken from http://predef.sourceforge.net/precomp.html#sec34 - if(MSVC) - set(SPECIFIC_COMPILER_NAME "MSVC-Unknown-${MSVC_VERSION}") - if(MSVC_VERSION EQUAL 1200) - set(SPECIFIC_COMPILER_NAME "MSVC-6.0") - endif(MSVC_VERSION EQUAL 1200) - if(MSVC_VERSION EQUAL 1300) - set(SPECIFIC_COMPILER_NAME "MSVC-7.0") - endif(MSVC_VERSION EQUAL 1300) - if(MSVC_VERSION EQUAL 1310) - set(SPECIFIC_COMPILER_NAME "MSVC-7.1-2003") #Visual Studio 2003 - endif(MSVC_VERSION EQUAL 1310) - if(MSVC_VERSION EQUAL 1400) - set(SPECIFIC_COMPILER_NAME "MSVC-8.0-2005") #Visual Studio 2005 - endif(MSVC_VERSION EQUAL 1400) - if(MSVC_VERSION EQUAL 1500) - set(SPECIFIC_COMPILER_NAME "MSVC-9.0-2008") #Visual Studio 2008 - endif(MSVC_VERSION EQUAL 1500) - if(MSVC_VERSION EQUAL 1600) - set(SPECIFIC_COMPILER_NAME "MSVC-10.0-2010") #Visual Studio 2010 - endif(MSVC_VERSION EQUAL 1600) - endif(MSVC) - if(MINGW) - set(SPECIFIC_COMPILER_NAME "MinGW") - endif(MINGW) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") - set(SPECIFIC_SYSTEM_VERSION_NAME "${SPECIFIC_SYSTEM_VERSION_NAME}-x86_64") - endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") -endif(WIN32) - -# In the Linux case try to guess the distro name/type -# using either lsb_release program or fallback -# to the content of the /etc/issue file -if(UNIX) - if(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(SPECIFIC_SYSTEM_VERSION_NAME "${CMAKE_SYSTEM_NAME}") - set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "TGZ") - find_program(LSB_RELEASE_EXECUTABLE lsb_release) - if(LSB_RELEASE_EXECUTABLE) - execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -i - OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX MATCH "Distributor ID:(.*)" DISTRO_ID ${_TMP_LSB_RELEASE_OUTPUT}) - string(STRIP "${CMAKE_MATCH_1}" DISTRO_ID) - # replace potential space with underscore - string(REPLACE " " "_" DISTRO_ID "${DISTRO_ID}") - execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -r - OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX MATCH "Release:(.*)" DISTRO_RELEASE ${_TMP_LSB_RELEASE_OUTPUT}) - string(STRIP "${CMAKE_MATCH_1}" DISTRO_RELEASE) - execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -c - OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX MATCH "Codename:(.*)" DISTRO_CODENAME ${_TMP_LSB_RELEASE_OUTPUT}) - string(STRIP "${CMAKE_MATCH_1}" DISTRO_CODENAME) - elseif (EXISTS "/etc/issue") - set(LINUX_NAME "") - file(READ "/etc/issue" LINUX_ISSUE) - # Fedora case - if(LINUX_ISSUE MATCHES "Fedora") - string(REGEX MATCH "release ([0-9]+)" FEDORA "${LINUX_ISSUE}") - set(DISTRO_ID "Fedora") - set(DISTRO_RELEASE "${CMAKE_MATCH_1}") - # FIXME can we find that in /etc/issue - set(DISTRO_CODENAME "") - endif(LINUX_ISSUE MATCHES "Fedora") - # Ubuntu case - if(LINUX_ISSUE MATCHES "Ubuntu") - string(REGEX MATCH "buntu ([0-9]+\\.[0-9]+)" UBUNTU "${LINUX_ISSUE}") - set(DISTRO_ID "Ubuntu") - set(DISTRO_RELEASE "${CMAKE_MATCH_1}") - # FIXME can we find that in /etc/issue - set(DISTRO_CODENAME "") - endif(LINUX_ISSUE MATCHES "Ubuntu") - # Debian case - if(LINUX_ISSUE MATCHES "Debian") - string(REGEX MATCH "Debian .*ux ([0-9]+\\.[0-9]+)" - DEBIAN "${LINUX_ISSUE}") - set(DISTRO_ID "Debian") - set(DISTRO_RELEASE "${CMAKE_MATCH_1}") - set(DISTRO_CODENAME "") - endif(LINUX_ISSUE MATCHES "Debian") - # Open SuSE case - if(LINUX_ISSUE MATCHES "SUSE") - string(REGEX MATCH "SUSE ([0-9]+\\.[0-9]+)" SUSE "${LINUX_ISSUE}") - set(DISTRO_ID "SUSE") - set(DISTRO_RELEASE "${CMAKE_MATCH_1}") - set(DISTRO_CODENAME "") - endif(LINUX_ISSUE MATCHES "SUSE") - # Mandriva case - # TODO - endif(LSB_RELEASE_EXECUTABLE) - # Now mangle some names - set(LINUX_NAME "${DISTRO_ID}_${DISTRO_RELEASE}") - if(DISTRO_ID MATCHES "Fedora|Mandriva|SUSE|OpenSUSE") - set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "RPM") - endif(DISTRO_ID MATCHES "Fedora|Mandriva|SUSE|OpenSUSE") - if(DISTRO_ID MATCHES "Debian|Ubuntu") - set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "DEB") - endif(DISTRO_ID MATCHES "Debian|Ubuntu") - if(LINUX_NAME) - set(SPECIFIC_SYSTEM_VERSION_NAME "${CMAKE_SYSTEM_NAME}-${LINUX_NAME}") - endif(LINUX_NAME) - endif(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(SPECIFIC_SYSTEM_VERSION_NAME - "${SPECIFIC_SYSTEM_VERSION_NAME}-${CMAKE_SYSTEM_PROCESSOR}") - set(SPECIFIC_COMPILER_NAME "") -endif(UNIX) diff --git a/Tests/CTestTestUpload/CMakeLists.txt b/Tests/CTestTestUpload/CMakeLists.txt new file mode 100644 index 0000000..bc164b1 --- /dev/null +++ b/Tests/CTestTestUpload/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required (VERSION 2.6) +PROJECT(CTestTestUpload) + +add_executable (Sleep sleep.c) diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake new file mode 100644 index 0000000..89c5b94 --- /dev/null +++ b/Tests/CTestTestUpload/CTestConfig.cmake @@ -0,0 +1,7 @@ +set (CTEST_PROJECT_NAME "CTestTestUpload") +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/CTestTestUpload/sleep.c b/Tests/CTestTestUpload/sleep.c new file mode 100644 index 0000000..b589647 --- /dev/null +++ b/Tests/CTestTestUpload/sleep.c @@ -0,0 +1,21 @@ +#if defined(_WIN32) +# include <windows.h> +#else +# include <unistd.h> +#endif + +/* sleeps for n seconds, where n is the argument to the program */ +int main(int argc, char** argv) +{ + int time; + if(argc > 1) + { + time = atoi(argv[1]); + } +#if defined(_WIN32) + Sleep(time * 1000); +#else + sleep(time); +#endif + return 0; +} diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in new file mode 100644 index 0000000..acfa233 --- /dev/null +++ b/Tests/CTestTestUpload/test.cmake.in @@ -0,0 +1,17 @@ +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@-Upload") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestUpload") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestUpload") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") + +CTEST_START(Experimental) +CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_UPLOAD(FILES "${CTEST_SOURCE_DIRECTORY}/sleep.c" "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt") +CTEST_SUBMIT() diff --git a/Tests/CompileCommandOutput/CMakeLists.txt b/Tests/CompileCommandOutput/CMakeLists.txt new file mode 100644 index 0000000..bd8e305 --- /dev/null +++ b/Tests/CompileCommandOutput/CMakeLists.txt @@ -0,0 +1,16 @@ +# a simple C only test case +cmake_minimum_required (VERSION 2.6) +project (CompileCommandOutput CXX) + +SET(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix") +IF(MAKE_SUPPORTS_SPACES) + SET(test1_srcs "file with spaces.cxx") +ELSE() + SET(test1_srcs "file_with_underscores.cxx") +ENDIF() +ADD_LIBRARY(test1 STATIC ${test1_srcs}) +ADD_LIBRARY(test2 SHARED "../CompileCommandOutput/relative.cxx") +INCLUDE_DIRECTORIES(${CompileCommandOutput_SOURCE_DIR}/../../Source) +ADD_EXECUTABLE(CompileCommandOutput compile_command_output.cxx) +TARGET_LINK_LIBRARIES(CompileCommandOutput test1 test2) diff --git a/Tests/CompileCommandOutput/compile_command_output.cxx b/Tests/CompileCommandOutput/compile_command_output.cxx new file mode 100644 index 0000000..145a064 --- /dev/null +++ b/Tests/CompileCommandOutput/compile_command_output.cxx @@ -0,0 +1,9 @@ +#include "file_with_underscores.h" +#include "relative.h" + +int main (int argc, char** argv) +{ + file_with_underscores(); + relative(); + return 0; +} diff --git a/Tests/CompileCommandOutput/file with spaces.cxx b/Tests/CompileCommandOutput/file with spaces.cxx new file mode 100644 index 0000000..554e176 --- /dev/null +++ b/Tests/CompileCommandOutput/file with spaces.cxx @@ -0,0 +1 @@ +#include "file_with_underscores.cxx" diff --git a/Tests/CompileCommandOutput/file_with_underscores.cxx b/Tests/CompileCommandOutput/file_with_underscores.cxx new file mode 100644 index 0000000..4f42ccf --- /dev/null +++ b/Tests/CompileCommandOutput/file_with_underscores.cxx @@ -0,0 +1,3 @@ +#include "file_with_underscores.h" + +void file_with_underscores() {} diff --git a/Tests/CompileCommandOutput/file_with_underscores.h b/Tests/CompileCommandOutput/file_with_underscores.h new file mode 100644 index 0000000..0d73e31 --- /dev/null +++ b/Tests/CompileCommandOutput/file_with_underscores.h @@ -0,0 +1 @@ +void file_with_underscores(); diff --git a/Tests/CompileCommandOutput/relative.cxx b/Tests/CompileCommandOutput/relative.cxx new file mode 100644 index 0000000..eae11e2 --- /dev/null +++ b/Tests/CompileCommandOutput/relative.cxx @@ -0,0 +1,3 @@ +#include "relative.h" + +void relative() {} diff --git a/Tests/CompileCommandOutput/relative.h b/Tests/CompileCommandOutput/relative.h new file mode 100644 index 0000000..ddfe551 --- /dev/null +++ b/Tests/CompileCommandOutput/relative.h @@ -0,0 +1,11 @@ +#if defined(_WIN32) +# ifdef test2_EXPORTS +# define TEST2_EXPORT __declspec(dllexport) +# else +# define TEST2_EXPORT __declspec(dllimport) +# endif +#else +# define TEST2_EXPORT +#endif + +TEST2_EXPORT void relative(); diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 19e3c2c..b7c9ea2 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -102,7 +102,7 @@ ADD_CUSTOM_TARGET(TDocument ALL COMMAND ${CMAKE_COMMAND} -E echo " Copying doc1.h to doc2.h." COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h ${PROJECT_BINARY_DIR}/doc2.h - DEPENDS ${PROJECT_BINARY_DIR}/doc1.h doc1.txt + DEPENDS doc1.txt ${PROJECT_BINARY_DIR}//doc1.h # test 2 slashes COMMENT "Running top-level TDocument commands" SOURCES doc1.tex ) diff --git a/Tests/ExternalOBJ/CMakeLists.txt b/Tests/ExternalOBJ/CMakeLists.txt index 3fef135..f12de11 100644 --- a/Tests/ExternalOBJ/CMakeLists.txt +++ b/Tests/ExternalOBJ/CMakeLists.txt @@ -51,5 +51,11 @@ ADD_CUSTOM_COMMAND( DEPENDS ${EXTERNAL_OBJECT} ) +message("${EXTERNAL_OBJECT}") # Build an executable using the external object file. ADD_EXECUTABLE(ExternalOBJ executable.cxx ${CUSTOM_OBJECT}) +# A bug showed up in VS2010 where an object file that was +# part of a custom commad output worked, but ones that were +# not didn't work. So, repeat the executable using the object +# directly and not from the output of the copy. +ADD_EXECUTABLE(ExternalOBJ2 executable.cxx ${EXTERNAL_OBJECT}) diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 5158f31..4a542d7 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -100,6 +100,9 @@ ExternalProject_Add(${proj} STEP_TARGETS install update SVN_REPOSITORY "" SVN_REVISION "" + SVN_USERNAME "" + SVN_PASSWORD "" + SVN_TRUST_CERT 1 TEST_COMMAND "" TIMEOUT "" URL "" diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index f420f4b..87fe84e 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -38,6 +38,38 @@ FIND_PACKAGE(VersionTestC 1.2.3) FIND_PACKAGE(VersionTestD 1.2.3.4) #----------------------------------------------------------------------------- +# Test system package registry if possible. +SET(CMakeTestSystemPackage "") +IF(WIN32 AND NOT CYGWIN) + # Try writing a value to the system package registry. + SET(_data "${FindPackageTest_SOURCE_DIR}/SystemPackage") + SET(_key "HKLM\\Software\\Kitware\\CMake\\Packages\\CMakeTestSystemPackage") + SET(_file "${FindPackageTest_BINARY_DIR}/CMakeTestSystemPackage.data") + FILE(WRITE ${_file} "${_data}\n") + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E md5sum ${_file} + OUTPUT_VARIABLE _output ERROR_VARIABLE _error RESULT_VARIABLE _failed + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + STRING(REGEX REPLACE " .*" "" _value "${_output}") + IF(NOT _failed AND _value) + EXECUTE_PROCESS( + COMMAND reg add "${_key}" /v "${_value}" /t REG_SZ /d "${_data}" /f + OUTPUT_VARIABLE _output ERROR_VARIABLE _output RESULT_VARIABLE _failed + ) + ENDIF() + # If the above worked, add the rest of the test and a rule to + # cleanup the value. + IF(NOT _failed) + MESSAGE(STATUS "HKLM is writable: enabling CMakeTestSystemPackage") + SET(CMakeTestSystemPackage_CLEANUP reg delete "${_key}" /v "${_value}" /f) + SET(CMakeTestSystemPackage CMakeTestSystemPackage) + ELSE() + MESSAGE(STATUS "HKLM is readonly: disabling CMakeTestSystemPackage") + ENDIF() +ENDIF() + +#----------------------------------------------------------------------------- #SET(CMAKE_FIND_DEBUG_MODE 1) @@ -48,7 +80,9 @@ SET(PACKAGES WrongA WrongB WrongC WrongD wibbleA wibbleB RecursiveA RecursiveB RecursiveC + ArchA ArchB ArchC ArchD EnvA EnvB + ${CMakeTestSystemPackage} ) FOREACH(p ${PACKAGES}) SET(${p}_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) @@ -105,10 +139,18 @@ FIND_PACKAGE(wibbleA NAMES wibble PATHS B) FIND_PACKAGE(wibbleB NAMES wibble HINTS B) # Look for package with recursive find-modules. -FIND_PACKAGE(RecursiveA) +FIND_PACKAGE(RecursiveA COMPONENTS A) FIND_PACKAGE(RecursiveB 2) FIND_PACKAGE(RecursiveC 3.1 EXACT) +# Test architecture-specific search directories. +SET(CMAKE_LIBRARY_ARCHITECTURE arch) +FIND_PACKAGE(ArchA NAMES Bar) +FIND_PACKAGE(ArchB NAMES Foo CONFIGS FooConfig.cmake) +FIND_PACKAGE(ArchC 3.1 EXACT NAMES zot) +FIND_PACKAGE(ArchD 4.0 EXACT NAMES zot) +UNSET(CMAKE_LIBRARY_ARCHITECTURE) + # Test <Package>_DIR environment variable. # We erase the main prefix path to ensure the env var is used. SET(CMAKE_PREFIX_PATH) @@ -116,6 +158,13 @@ SET(ENV{EnvA_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/lib/zot-3.1") FIND_PACKAGE(EnvA 3.1 EXACT QUIET NAMES zot) # Should Work FIND_PACKAGE(EnvB 3.1 EXACT QUIET NAMES zot) # Should Fail +# Test system package registry if available. +IF(CMakeTestSystemPackage) + FIND_PACKAGE(CMakeTestSystemPackage) + EXECUTE_PROCESS(COMMAND ${CMakeTestSystemPackage_CLEANUP} + OUTPUT_VARIABLE _output ERROR_VARIABLE _error) +ENDIF() + # Expected locations at which packages should be found. SET(foo_EXPECTED "lib/foo-1.2/foo-config.cmake") SET(Foo_EXPECTED "lib/foo-1.2/CMake/FooConfig.cmake") @@ -143,8 +192,13 @@ SET(wibbleB_EXPECTED "B/wibble-config.cmake") SET(RecursiveA_EXPECTED "lib/RecursiveA/recursivea-config.cmake") SET(RecursiveB_EXPECTED "lib/zot-2.0/zot-config.cmake") SET(RecursiveC_EXPECTED "lib/zot-3.1/zot-config.cmake") +SET(ArchA_EXPECTED "lib/arch/Bar/BarConfig.cmake") +SET(ArchB_EXPECTED "lib/arch/foo-1.2/CMake/FooConfig.cmake") +SET(ArchC_EXPECTED "lib/arch/zot-3.1/zot-config.cmake") +SET(ArchD_EXPECTED "lib/arch/cmake/zot-4.0/zot-config.cmake") SET(EnvA_EXPECTED "lib/zot-3.1/zot-config.cmake") SET(EnvB_MISSING "EnvB_DIR-NOTFOUND") +SET(CMakeTestSystemPackage_EXPECTED "SystemPackage/CMakeTestSystemPackageConfig.cmake") # Check the results. FOREACH(p ${PACKAGES}) diff --git a/Tests/FindPackageTest/SystemPackage/CMakeTestSystemPackageConfig.cmake b/Tests/FindPackageTest/SystemPackage/CMakeTestSystemPackageConfig.cmake new file mode 100644 index 0000000..deffa57 --- /dev/null +++ b/Tests/FindPackageTest/SystemPackage/CMakeTestSystemPackageConfig.cmake @@ -0,0 +1 @@ +# Test config file. diff --git a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake index deffa57..eff4d4f 100644 --- a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake +++ b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake @@ -1 +1,4 @@ # Test config file. +if(NOT "${RecursiveA_FIND_COMPONENTS}" STREQUAL "A") + message(FATAL_ERROR "find_package(RecursiveA NO_MODULE) did not forward components") +endif() diff --git a/Tests/FindPackageTest/lib/arch/Bar/BarConfig.cmake b/Tests/FindPackageTest/lib/arch/Bar/BarConfig.cmake new file mode 100644 index 0000000..deffa57 --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/Bar/BarConfig.cmake @@ -0,0 +1 @@ +# Test config file. diff --git a/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config-version.cmake b/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config-version.cmake new file mode 100644 index 0000000..2f768e8 --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config-version.cmake @@ -0,0 +1,7 @@ +SET(PACKAGE_VERSION 4.0) +IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 4) + SET(PACKAGE_VERSION_COMPATIBLE 1) + IF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 0) + SET(PACKAGE_VERSION_EXACT 1) + ENDIF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 0) +ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 4) diff --git a/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config.cmake b/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config.cmake new file mode 100644 index 0000000..deffa57 --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/cmake/zot-4.0/zot-config.cmake @@ -0,0 +1 @@ +# Test config file. diff --git a/Tests/FindPackageTest/lib/arch/foo-1.2/CMake/FooConfig.cmake b/Tests/FindPackageTest/lib/arch/foo-1.2/CMake/FooConfig.cmake new file mode 100644 index 0000000..deffa57 --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/foo-1.2/CMake/FooConfig.cmake @@ -0,0 +1 @@ +# Test config file. diff --git a/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config-version.cmake b/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config-version.cmake new file mode 100644 index 0000000..13763ad --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config-version.cmake @@ -0,0 +1,7 @@ +SET(PACKAGE_VERSION 3.1) +IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3) + SET(PACKAGE_VERSION_COMPATIBLE 1) + IF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 1) + SET(PACKAGE_VERSION_EXACT 1) + ENDIF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 1) +ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3) diff --git a/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config.cmake b/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config.cmake new file mode 100644 index 0000000..deffa57 --- /dev/null +++ b/Tests/FindPackageTest/lib/arch/zot-3.1/zot-config.cmake @@ -0,0 +1 @@ +# Test config file. diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index c68d543..c216529 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -45,7 +45,7 @@ function(test_fortran_c_interface_module) FortranCInterface_VERIFY() FortranCInterface_VERIFY(CXX) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) - if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|MIPSpro|PathScale") + if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|MIPSpro|PathScale|Absoft") set(module_expected 1) endif() if(FortranCInterface_MODULE_FOUND OR module_expected) @@ -119,6 +119,9 @@ if(("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel") ) set(COMPATABLE_COMPILERS TRUE) endif() +if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES "Absoft:GNU") + set(COMPATABLE_COMPILERS TRUE) +endif() if(COMPATABLE_COMPILERS OR ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" )) test_fortran_c_interface_module() diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt new file mode 100644 index 0000000..60b8c22 --- /dev/null +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required (VERSION 2.6) +project(IncludeDirectories) + +file(WRITE ${CMAKE_BINARY_DIR}/Flags/Flags.h +"//Flags.h +") +file(WRITE ${CMAKE_BINARY_DIR}/IncDir/IncDir.h +"//IncDir.h +") +file(WRITE ${CMAKE_BINARY_DIR}/SrcProp/SrcProp.h +"//SrcProp.h +") +file(WRITE ${CMAKE_BINARY_DIR}/TarProp/TarProp.h +"//TarProp.h +") + +# default to testing with full path +# some compilers can not handle the escape for directories +# with spaces in them. +set(USE_FULLPATH TRUE) +if(WATCOM OR MSVC60) + set(USE_FULLPATH FALSE) +endif() +if(USE_FULLPATH) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \"-I${CMAKE_BINARY_DIR}/Flags\"") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -IFlags") +endif() + +include_directories(${CMAKE_BINARY_DIR}/IncDir) +if(USE_FULLPATH) + set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS + "\"-I${CMAKE_BINARY_DIR}/SrcProp\"") +else() + set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS + "-ISrcProp") +endif() + +add_executable(IncludeDirectories main.cpp) + +if(USE_FULLPATH) + set_target_properties(IncludeDirectories + PROPERTIES COMPILE_FLAGS "\"-I${CMAKE_BINARY_DIR}/TarProp\"") +else() + set_target_properties(IncludeDirectories + PROPERTIES COMPILE_FLAGS "-ITarProp") +endif() diff --git a/Tests/IncludeDirectories/main.cpp b/Tests/IncludeDirectories/main.cpp new file mode 100644 index 0000000..a59d27c --- /dev/null +++ b/Tests/IncludeDirectories/main.cpp @@ -0,0 +1,9 @@ +#include "Flags.h" +#include "IncDir.h" +#include "SrcProp.h" +#include "TarProp.h" + +int main(int argc, char** argv) +{ + return 0; +} diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 5fc6550..564db9f 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -294,7 +294,7 @@ ELSE(STAGE2) "${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake") SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe) - # Disable VERSION test until it is implemented in the XCode generator. + # Disable VERSION test until it is implemented in the Xcode generator. IF(NOT XCODE) SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2) ENDIF(NOT XCODE) diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index 5fc6550..564db9f 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -294,7 +294,7 @@ ELSE(STAGE2) "${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake") SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe) - # Disable VERSION test until it is implemented in the XCode generator. + # Disable VERSION test until it is implemented in the Xcode generator. IF(NOT XCODE) SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2) ENDIF(NOT XCODE) diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt index e57e019..c3cf38c 100644 --- a/Tests/SourceGroups/CMakeLists.txt +++ b/Tests/SourceGroups/CMakeLists.txt @@ -5,7 +5,7 @@ project(SourceGroups) # it is more an example with several source_group() # commands. # The created projects have to be loaded manually -# in Visual Studio/XCode/Eclipse/... +# in Visual Studio/Xcode/Eclipse/... # to see whether the correct groups have been created. source_group(Base FILES main.c) diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt index a0fd18a..6a6e9b6 100644 --- a/Tests/TestsWorkingDirectory/CMakeLists.txt +++ b/Tests/TestsWorkingDirectory/CMakeLists.txt @@ -23,7 +23,7 @@ set_tests_properties(WorkingDirectory2 PROPERTIES set(_default_cwd "${CMAKE_BINARY_DIR}") -# FIXME: How to deal with /debug, /release, etc. with VS or XCode? +# FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd}) endif() @@ -34,7 +34,7 @@ string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}") add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory ${_parent_dir}) -# FIXME: How to deal with /debug, /release, etc. with VS or XCode? +# FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory6 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..) endif() diff --git a/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt b/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt index 523f02e..c16b1db 100644 --- a/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt +++ b/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt @@ -14,7 +14,7 @@ set_tests_properties(WorkingDirectory-Subdir2 PROPERTIES set(_default_cwd "${CMAKE_CURRENT_BINARY_DIR}") -# FIXME: How to deal with /debug, /release, etc. with VS or XCode? +# FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory-Subdir3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd}) endif() @@ -25,7 +25,7 @@ string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_CURRENT_BINARY_DIR}") add_test(NAME WorkingDirectory-Subdir5 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.. COMMAND WorkingDirectory ${_parent_dir}) -# FIXME: How to deal with /debug, /release, etc. with VS or XCode? +# FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory-Subdir6 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..) endif() |