diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in index 5d440fb87..8542ff62c 100644 --- a/Modules/AutomocInfo.cmake.in +++ b/Modules/AutomocInfo.cmake.in @@ -3,6 +3,7 @@ set(AM_HEADERS "@_moc_headers@" ) set(AM_MOC_COMPILE_DEFINITIONS "@_moc_compile_defs@") set(AM_MOC_DEFINITIONS "@_moc_defs@") set(AM_MOC_INCLUDES "@_moc_incs@") +set(AM_MOC_OPTIONS "@_moc_options@") set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@") set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/") set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/") diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 51c8eace2..bb1021b73 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -4,7 +4,12 @@ # used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration # # However CPackRPM has specific features which are controlled by -# the specifics CPACK_RPM_XXX variables. +# the specifics CPACK_RPM_XXX variables. CPackRPM is a component aware +# generator so when CPACK_RPM_COMPONENT_INSTALL is ON some more +# CPACK_RPM__XXXX variables may be used in order +# to have component specific values. Note however that +# refers to the **grouping name**. This may be either a component name +# or a component GROUP name. # Usually those vars correspond to RPM spec file entities, one may find # information about spec files here http://www.rpm.org/wiki/Docs. # You'll find a detailed usage of CPackRPM on the wiki: @@ -98,9 +103,11 @@ # If CPACK_SET_DESTDIR is set then you will get a warning message # but if there is file installed with absolute path you'll get # unexpected behavior. -# CPACK_RPM_SPEC_INSTALL_POST +# CPACK_RPM_SPEC_INSTALL_POST [deprecated] # Mandatory : NO # Default : - +# This way of specifying post-install script is deprecated use +# CPACK_RPM_POST_INSTALL_SCRIPT_FILE # May be used to set an RPM post-install command inside the spec file. # For example setting it to "/bin/true" may be used to prevent # rpmbuild to strip binaries. @@ -158,7 +165,7 @@ # Mandatory : NO # Default : - # May be used to embed a changelog in the spec file. -# The refered file will be read and directly put after the %changelog +# The refered file will be read and directly put after the %changelog # section. #============================================================================= @@ -388,9 +395,33 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE) endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON")) endif(CPACK_RPM_PACKAGE_RELOCATABLE) -# check if additional fields for RPM spec header are given +# Check if additional fields for RPM spec header are given +# There may be some COMPONENT specific variables as well FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV) - IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) + IF(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}) + IF(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: using CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}}) + else() + IF(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined") + message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}) + endif() + else() + IF(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}) + endif() + + IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH) MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1") STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL) @@ -398,10 +429,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME) SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}") IF(CPACK_RPM_PACKAGE_DEBUG) - MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}") + MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") ENDIF(CPACK_RPM_PACKAGE_DEBUG) - SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}") - ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) + SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") +ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) ENDFOREACH(_RPM_SPEC_HEADER) # CPACK_RPM_SPEC_INSTALL_POST @@ -435,20 +466,31 @@ else(CPACK_RPM_PACKAGE_COMPONENT) set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) endif(CPACK_RPM_PACKAGE_COMPONENT) + +# Handle post-install file if it has been specified if(CPACK_RPM_POST_INSTALL_READ_FILE) if(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL) else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_READ_FILE}> does not exists - ignoring") endif(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) +else(CPACK_RPM_POST_INSTALL_READ_FILE) + # reset SPEC var value if no post install file has been specified + # (either globally or component-wise) + set(CPACK_RPM_SPEC_POSTINSTALL "") endif(CPACK_RPM_POST_INSTALL_READ_FILE) +# Handle post-uninstall file if it has been specified if(CPACK_RPM_POST_UNINSTALL_READ_FILE) if(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL) else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_READ_FILE}> does not exists - ignoring") endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) +else(CPACK_RPM_POST_UNINSTALL_READ_FILE) + # reset SPEC var value if no post uninstall file has been specified + # (either globally or component-wise) + set(CPACK_RPM_SPEC_POSTUNINSTALL "") endif(CPACK_RPM_POST_UNINSTALL_READ_FILE) # CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM__PRE_INSTALL_SCRIPT_FILE) @@ -471,20 +513,31 @@ else(CPACK_RPM_PACKAGE_COMPONENT) set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) endif(CPACK_RPM_PACKAGE_COMPONENT) + +# Handle pre-install file if it has been specified if(CPACK_RPM_PRE_INSTALL_READ_FILE) if(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL) else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_READ_FILE}> does not exists - ignoring") endif(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) +else(CPACK_RPM_PRE_INSTALL_READ_FILE) + # reset SPEC var value if no pre-install file has been specified + # (either globally or component-wise) + set(CPACK_RPM_SPEC_PREINSTALL "") endif(CPACK_RPM_PRE_INSTALL_READ_FILE) +# Handle pre-uninstall file if it has been specified if(CPACK_RPM_PRE_UNINSTALL_READ_FILE) if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL) else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_READ_FILE}> does not exists - ignoring") endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) +else(CPACK_RPM_PRE_UNINSTALL_READ_FILE) + # reset SPEC var value if no pre-uninstall file has been specified + # (either globally or component-wise) + set(CPACK_RPM_SPEC_PREUNINSTALL "") endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE) # CPACK_RPM_CHANGELOG_FILE diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index bdf83604a..4bf1b6c4b 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -56,7 +56,7 @@ # (or ) relative to and store the result in # . See documentation of INSTALL_QT4_PLUGIN_PATH. # -# INSTALL_QT4_EXECUTABLE( [ ]) +# INSTALL_QT4_EXECUTABLE( [ ]) # Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up # a Qt4 executable using BundleUtilities so it is standalone and can be # drag-and-drop copied to another machine as long as all of the system @@ -106,7 +106,8 @@ function(resolve_qt4_paths paths_var) set(${paths_var} ${paths_resolved} PARENT_SCOPE) endfunction() -function(fixup_qt4_executable executable qtplugins) +function(fixup_qt4_executable executable) + set(qtplugins ${ARGV1}) set(libs ${ARGV2}) set(dirs ${ARGV3}) set(plugins_dir ${ARGV4}) @@ -150,7 +151,6 @@ function(fixup_qt4_executable executable qtplugins) endforeach() resolve_qt4_paths(libs "${executable_path}") - resolve_qt4_paths(dirs "${executable_path}") if(write_qt_conf) set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") @@ -225,9 +225,11 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var) else() string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) endif() - set(plugin_release "${${plugin_var}_RELEASE}") - set(plugin_debug "${${plugin_var}_DEBUG}") - if(NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}") + set(plugin_release_var "${plugin_var}_RELEASE") + set(plugin_debug_var "${plugin_var}_DEBUG") + set(plugin_release "${${plugin_release_var}}") + set(plugin_debug "${${plugin_debug_var}}") + if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}") message(WARNING "Qt plugin \"${plugin}\" not recognized or found.") endif() install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel") @@ -264,7 +266,6 @@ function(install_qt4_executable executable) endforeach() resolve_qt4_paths(libs) - resolve_qt4_paths(dirs) install(CODE " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" ) diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake index 462835a51..1f49c3bda 100644 --- a/Modules/FindLibXslt.cmake +++ b/Modules/FindLibXslt.cmake @@ -5,6 +5,9 @@ # LIBXSLT_INCLUDE_DIR - the LibXslt include directory # LIBXSLT_LIBRARIES - Link these to LibXslt # LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt +# Additionally, the following two variables are set (but not required for using xslt): +# LIBXSLT_EXSLT_LIBRARIES - Link to these if you need to link against the exslt library +# LIBXSLT_XSLTPROC_EXECUTABLE - Contains the full path to the xsltproc executable if found #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -23,7 +26,7 @@ # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_LIBXSLT libxslt) +PKG_CHECK_MODULES(PC_LIBXSLT QUIET libxslt) SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER}) FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h @@ -38,10 +41,22 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt ${PC_LIBXSLT_LIBRARY_DIRS} ) -# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if +FIND_LIBRARY(LIBXSLT_EXSLT_LIBRARY NAMES exslt libexslt + HINTS + ${PC_LIBXSLT_LIBDIR} + ${PC_LIBXSLT_LIBRARY_DIRS} + ) + +SET(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY} ) + +FIND_PROGRAM(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc) + +# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR) -MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES) - +MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR + LIBXSLT_LIBRARIES + LIBXSLT_EXSLT_LIBRARY + LIBXSLT_XSLTPROC_EXECUTABLE) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 702ba10ad..7bb8b27fa 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -655,10 +655,26 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) } cmMakefile* mf = command->GetMakefile(); - std::string fname = src_dir; - fname += "/CTestConfig.cmake"; - cmSystemTools::ConvertToUnixSlashes(fname); - if ( cmSystemTools::FileExists(fname.c_str()) ) + std::string fname; + + std::string src_dir_fname = src_dir; + src_dir_fname += "/CTestConfig.cmake"; + cmSystemTools::ConvertToUnixSlashes(src_dir_fname); + + std::string bld_dir_fname = bld_dir; + bld_dir_fname += "/CTestConfig.cmake"; + cmSystemTools::ConvertToUnixSlashes(bld_dir_fname); + + if ( cmSystemTools::FileExists(bld_dir_fname.c_str()) ) + { + fname = bld_dir_fname; + } + else if ( cmSystemTools::FileExists(src_dir_fname.c_str()) ) + { + fname = src_dir_fname; + } + + if ( !fname.empty() ) { cmCTestLog(this, OUTPUT, " Reading ctest configuration file: " << fname.c_str() << std::endl); @@ -674,8 +690,12 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) } else { - cmCTestLog(this, WARNING, "Cannot locate CTest configuration: " - << fname.c_str() << std::endl); + cmCTestLog(this, WARNING, + "Cannot locate CTest configuration: in BuildDirectory: " + << bld_dir_fname.c_str() << std::endl); + cmCTestLog(this, WARNING, + "Cannot locate CTest configuration: in SourceDirectory: " + << src_dir_fname.c_str() << std::endl); } this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime", @@ -2526,6 +2546,8 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, cmSystemTools::ExpandListArgument(dval, slist); std::vector::iterator it; + vec.clear(); + for ( it = slist.begin(); it != slist.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl); @@ -2801,7 +2823,7 @@ bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, } cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfigurationFromCMakeVariable:" - << dconfig << ":" << cmake_var); + << dconfig << ":" << cmake_var << std::endl); this->SetCTestConfiguration(dconfig, ctvar); return true; } diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index c87b64d15..f8ab6869a 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1318,8 +1318,9 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item) this->AddFrameworkPath(this->SplitFramework.match(1)); // Add the item using the -framework option. - std::string fw = "-framework "; - fw += this->SplitFramework.match(2); + this->Items.push_back(Item("-framework", false)); + std::string fw = this->SplitFramework.match(2); + fw = this->LocalGenerator->EscapeForShell(fw.c_str()); this->Items.push_back(Item(fw, false)); } diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index f4d4e7c5c..ed303c9c6 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -126,7 +126,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "This variable is set to the program that will be" " needed to build the output of CMake. If the " "generator selected was Visual Studio 6, the " - "CMAKE_MAKE_PROGRAM will be set to msdev, for " + "CMAKE_BUILD_TOOL will be set to msdev, for " "Unix makefiles it will be set to make or gmake, " "and for Visual Studio 7 it set to devenv. For " "Nmake Makefiles the value is nmake. This can be " @@ -1102,6 +1102,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm) false, "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_AUTOMOC_MOC_OPTIONS", cmProperty::VARIABLE, + "Additional options for moc when using automoc (see CMAKE_AUTOMOC).", + "This variable is used to initialize the " + "AUTOMOC_MOC_OPTIONS property on all the targets. " + "See that target property for additional information.", + false, + "Variables that Control the Build"); + cm->DefineProperty ("CMAKE_DEBUG_POSTFIX", cmProperty::VARIABLE, "See variable CMAKE__POSTFIX.", diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 785e85a61..248a30ac5 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -87,6 +87,16 @@ void cmExtraEclipseCDT4Generator::Generate() this->GenerateSourceProject = (this->IsOutOfSourceBuild && mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")); + if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(), + this->HomeDirectory.c_str())) + { + mf->IssueMessage(cmake::WARNING, "The build directory is a subdirectory " + "of the source directory.\n" + "This is not supported well by Eclipse. It is strongly " + "recommended to use a build directory which is a " + "sibling of the source directory."); + } + // NOTE: This is not good, since it pollutes the source tree. However, // Eclipse doesn't allow CVS/SVN to work when the .project is not in // the cvs/svn root directory. Hence, this is provided as an option. @@ -998,7 +1008,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const std::string virtDir = "[Targets]/"; virtDir += prefix; virtDir += ti->first; - this->AppendTarget(fout, "Build", make, makeArgs, virtDir, "", + std::string buildArgs = "-C \""; + buildArgs += makefile->GetHomeOutputDirectory(); + buildArgs += "\" "; + buildArgs += makeArgs; + this->AppendTarget(fout, "Build", make, buildArgs, virtDir, "", ti->first.c_str()); std::string cleanArgs = "-E chdir \""; diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index e5ff4f0f3..aa13589a3 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -65,7 +65,12 @@ public: "For historical reasons, relative paths given to this command are " "passed to the linker unchanged " "(unlike many CMake commands which interpret them relative to the " - "current source directory)." + "current source directory).\n" + "Note that this command is rarely necessary. Library locations " + "returned by find_package() and find_library() are absolute paths. " + "Pass these absolute library file paths directly to the " + "target_link_libraries() command. CMake will ensure the linker finds " + "them." ; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index da6a1c643..4e4f1d956 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -607,6 +607,27 @@ cmLocalUnixMakefileGenerator3 } } +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::ConvertShellCommand(std::string const& cmd, RelativeRoot root) +{ + if(this->WatcomWMake && + cmSystemTools::FileIsFullPath(cmd.c_str()) && + cmd.find_first_of("( )") != cmd.npos) + { + // On Watcom WMake use the windows short path for the command + // name. This is needed to avoid funny quoting problems on + // lines with shell redirection operators. + std::string scmd; + if(cmSystemTools::GetShortPath(cmd.c_str(), scmd)) + { + return this->Convert(scmd.c_str(), NONE, SHELL); + } + } + return this->Convert(cmd.c_str(), root, SHELL); +} + //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3 @@ -646,13 +667,13 @@ cmLocalUnixMakefileGenerator3 makefileStream << "# The CMake executable.\n" << "CMAKE_COMMAND = " - << this->Convert(cmakecommand.c_str(), FULL, SHELL).c_str() + << this->ConvertShellCommand(cmakecommand, FULL) << "\n" << "\n"; makefileStream << "# The command to remove a file.\n" << "RM = " - << this->Convert(cmakecommand.c_str(),FULL,SHELL).c_str() + << this->ConvertShellCommand(cmakecommand, FULL) << " -E remove -f\n" << "\n"; @@ -662,7 +683,7 @@ cmLocalUnixMakefileGenerator3 makefileStream << "# The program to use to edit the cache.\n" << "CMAKE_EDIT_COMMAND = " - << this->Convert(edit_cmd,FULL,SHELL) << "\n" + << this->ConvertShellCommand(edit_cmd, FULL) << "\n" << "\n"; } @@ -697,7 +718,7 @@ cmLocalUnixMakefileGenerator3 // This should be the first target except for the default_target in // the interface Makefile. this->WriteMakeRule( - makefileStream, "Disable implicit rules so canoncical targets will work.", + makefileStream, "Disable implicit rules so canonical targets will work.", ".SUFFIXES", no_depends, no_commands, false); if(!this->NMake && !this->WatcomWMake && !this->BorlandMakeCurlyHack) @@ -1019,22 +1040,9 @@ cmLocalUnixMakefileGenerator3 // without the current directory being in the search path. cmd = "./" + cmd; } - if(this->WatcomWMake && - cmSystemTools::FileIsFullPath(cmd.c_str()) && - cmd.find(" ") != cmd.npos) - { - // On Watcom WMake use the windows short path for the command - // name. This is needed to avoid funny quoting problems on - // lines with shell redirection operators. - std::string scmd; - if(cmSystemTools::GetShortPath(cmd.c_str(), scmd)) - { - cmd = scmd; - } - } std::string launcher = this->MakeLauncher(cc, target, workingDir? NONE : START_OUTPUT); - cmd = launcher + this->Convert(cmd.c_str(),NONE,SHELL); + cmd = launcher + this->ConvertShellCommand(cmd, NONE); ccg.AppendArguments(c, cmd); if(content) diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index fab98da0e..45ac21de3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -340,6 +340,7 @@ protected: void CheckMultipleOutputs(bool verbose); private: + std::string ConvertShellCommand(std::string const& cmd, RelativeRoot root); std::string MakeLauncher(const cmCustomCommand& cc, cmTarget* target, RelativeRoot relative); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index d9b277298..ae7075955 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1811,11 +1811,18 @@ void cmLocalVisualStudio7Generator::WriteProjectSCC(std::ostream& fout, const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME"); const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH"); const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER"); + if(vsProvider && vsLocalpath && vsProjectname) { fout << "\tSccProjectName=\"" << vsProjectname << "\"\n" << "\tSccLocalPath=\"" << vsLocalpath << "\"\n" << "\tSccProvider=\"" << vsProvider << "\"\n"; + + const char* vsAuxPath = target.GetProperty("VS_SCC_AUXPATH"); + if(vsAuxPath) + { + fout << "\tSccAuxPath=\"" << vsAuxPath << "\"\n"; + } } } diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 72249bcc0..7a80f2866 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -71,7 +71,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) targetDir += ".dir/"; cmCustomCommandLine currentLine; - currentLine.push_back(makefile->GetCMakeInstance()->GetCMakeCommand()); + currentLine.push_back(makefile->GetSafeDefinition("CMAKE_COMMAND")); currentLine.push_back("-E"); currentLine.push_back("cmake_automoc"); currentLine.push_back(targetDir); @@ -128,9 +128,15 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) } } - std::string _moc_incs = makefile->GetProperty("INCLUDE_DIRECTORIES"); - std::string _moc_defs = makefile->GetProperty("DEFINITIONS"); - std::string _moc_compile_defs = makefile->GetProperty("COMPILE_DEFINITIONS"); + const char* tmp = makefile->GetProperty("INCLUDE_DIRECTORIES"); + std::string _moc_incs = (tmp!=0 ? tmp : ""); + tmp = makefile->GetProperty("DEFINITIONS"); + std::string _moc_defs = (tmp!=0 ? tmp : ""); + tmp = makefile->GetProperty("COMPILE_DEFINITIONS"); + std::string _moc_compile_defs = (tmp!=0 ? tmp : ""); + tmp = target->GetProperty("AUTOMOC_MOC_OPTIONS"); + std::string _moc_options = (tmp!=0 ? tmp : ""); + // forget the variables added here afterwards again: cmMakefile::ScopePushPop varScope(makefile); static_cast(varScope); @@ -139,10 +145,11 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) makefile->AddDefinition("_moc_incs", _moc_incs.c_str()); makefile->AddDefinition("_moc_defs", _moc_defs.c_str()); makefile->AddDefinition("_moc_compile_defs", _moc_compile_defs.c_str()); + makefile->AddDefinition("_moc_options", _moc_options.c_str()); makefile->AddDefinition("_moc_files", _moc_files.c_str()); makefile->AddDefinition("_moc_headers", _moc_headers.c_str()); - const char* cmakeRoot = makefile->GetDefinition("CMAKE_ROOT"); + const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT"); std::string inputFile = cmakeRoot; inputFile += "/Modules/AutomocInfo.cmake.in"; std::string outputFile = targetDir; @@ -235,6 +242,7 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile, "AM_MOC_COMPILE_DEFINITIONS"); this->MocDefinitionsStr = makefile->GetSafeDefinition("AM_MOC_DEFINITIONS"); this->MocIncludesStr = makefile->GetSafeDefinition("AM_MOC_INCLUDES"); + this->MocOptionsStr = makefile->GetSafeDefinition("AM_MOC_OPTIONS"); this->ProjectBinaryDir = makefile->GetSafeDefinition("AM_CMAKE_BINARY_DIR"); this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR"); this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME"); @@ -311,6 +319,8 @@ void cmQtAutomoc::Init() } } + cmSystemTools::ExpandListArgument(this->MocOptionsStr, this->MocOptions); + std::vector incPaths; cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths); @@ -720,6 +730,12 @@ bool cmQtAutomoc::GenerateMoc(const std::string& sourceFile, { command.push_back(*it); } + for(std::vector::const_iterator it=this->MocOptions.begin(); + it != this->MocOptions.end(); + ++it) + { + command.push_back(*it); + } #ifdef _WIN32 command.push_back("-DWIN32"); #endif diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h index 59eaac760..f6355de3d 100644 --- a/Source/cmQtAutomoc.h +++ b/Source/cmQtAutomoc.h @@ -62,6 +62,7 @@ private: std::string MocCompileDefinitionsStr; std::string MocDefinitionsStr; std::string MocIncludesStr; + std::string MocOptionsStr; std::string ProjectBinaryDir; std::string ProjectSourceDir; std::string TargetName; @@ -71,6 +72,7 @@ private: std::string OutMocCppFilename; std::list MocIncludes; std::list MocDefinitions; + std::vector MocOptions; bool Verbose; bool ColorOutput; diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index 320378d05..f001a1111 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -140,7 +140,8 @@ public: "the target in an IDE like visual studio. VS_KEYWORD can be set " "to change the visual studio keyword, for example QT integration " "works better if this is set to Qt4VSv1.0.\n" - "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER can be set " + "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER and " + "VS_SCC_AUXPATH can be set " "to add support for source control bindings in a Visual Studio " "project file.\n" "VS_GLOBAL_ can be set to add a Visual Studio " diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f7d3ba961..dad0353ec 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -157,7 +157,20 @@ void cmTarget::DefineProperties(cmake *cm) "files are included in a generated _automoc.cpp file, " "which is compiled as part of the target." "This property is initialized by the value of the variable " - "CMAKE_AUTOMOC if it is set when a target is created."); + "CMAKE_AUTOMOC if it is set when a target is created.\n" + "Additional command line options for moc can be set via the " + "AUTOMOC_MOC_OPTIONS property." + ); + + cm->DefineProperty + ("AUTOMOC_MOC_OPTIONS", cmProperty::TARGET, + "Additional options for moc when using automoc (see the AUTOMOC property)", + "This property is only used if the AUTOMOC property is set to TRUE for " + "this target. In this case, it holds additional command line options " + "which will be used when moc is executed during the build, i.e. it is " + "equivalent to the optional OPTIONS argument of the qt4_wrap_cpp() " + "macro.\n" + "By default it is empty."); cm->DefineProperty ("BUILD_WITH_INSTALL_RPATH", cmProperty::TARGET, @@ -1011,7 +1024,7 @@ void cmTarget::DefineProperties(cmake *cm) "provider property."); cm->DefineProperty ("VS_SCC_LOCALPATH", cmProperty::TARGET, - "Visual Studio Source Code Control Provider.", + "Visual Studio Source Code Control Local Path.", "Can be set to change the visual studio source code control " "local path property."); cm->DefineProperty @@ -1019,6 +1032,11 @@ void cmTarget::DefineProperties(cmake *cm) "Visual Studio Source Code Control Project.", "Can be set to change the visual studio source code control " "project name property."); + cm->DefineProperty + ("VS_SCC_AUXPATH", cmProperty::TARGET, + "Visual Studio Source Code Control Aux Path.", + "Can be set to change the visual studio source code control " + "auxpath property."); cm->DefineProperty ("VS_GLOBAL_", cmProperty::TARGET, "Visual Studio project-specific global variable.", @@ -1179,6 +1197,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0); this->SetPropertyDefault("OSX_ARCHITECTURES", 0); this->SetPropertyDefault("AUTOMOC", 0); + this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0); this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0); // Collect the set of configuration types. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 551b0adef..45a79c81f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -182,7 +182,7 @@ void cmVisualStudio10TargetGenerator::Generate() const char* vsLocalPath = this->Target->GetProperty("VS_SCC_LOCALPATH"); const char* vsProvider = this->Target->GetProperty("VS_SCC_PROVIDER"); - if ( vsProjectName && vsLocalPath && vsProvider) + if( vsProjectName && vsLocalPath && vsProvider ) { this->WriteString("", 2); (*this->BuildFileStream) << cmVS10EscapeXML(vsProjectName) << @@ -193,6 +193,14 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("", 2); (*this->BuildFileStream) << cmVS10EscapeXML(vsProvider) << "\n"; + + const char* vsAuxPath = this->Target->GetProperty("VS_SCC_AUXPATH"); + if( vsAuxPath ) + { + this->WriteString("", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(vsAuxPath) << + "\n"; + } } this->WriteString("Win32Proj\n", 2); diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index 9f43a47c8..ece88ae89 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -592,7 +592,7 @@ void CommandLineArguments::GenerateHelp() // Create format for that string char format[80]; - sprintf(format, " %%-%ds ", static_cast(maxlen)); + sprintf(format, " %%-%us ", static_cast(maxlen)); maxlen += 4; // For the space before and after the option diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 9bc659e22..d49c0d73c 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -72,7 +72,7 @@ # include // int isdigit(int c); # include // extern int errno; # include -#elif __hpux +#elif defined( __hpux ) # include # include #endif @@ -1454,7 +1454,7 @@ bool SystemInformationImplementation::RetrieveCPUClockSpeed() { bool retrieved = false; -#if _WIN32 +#if defined(_WIN32) // First of all we check to see if the RDTSC (0x0F, 0x31) instruction is // supported. If not, we fallback to trying to read this value from the // registry: @@ -2389,7 +2389,7 @@ int SystemInformationImplementation::QueryMemory() this->AvailablePhysicalMemory = 0; #ifdef __CYGWIN__ return 0; -#elif _WIN32 +#elif defined(_WIN32) #if _MSC_VER < 1300 MEMORYSTATUS ms; unsigned long tv, tp, av, ap; @@ -2415,7 +2415,7 @@ int SystemInformationImplementation::QueryMemory() this->AvailableVirtualMemory = av>>10>>10; this->AvailablePhysicalMemory = ap>>10>>10; return 1; -#elif __linux +#elif defined(__linux) unsigned long tv=0; unsigned long tp=0; unsigned long av=0; @@ -2532,7 +2532,7 @@ int SystemInformationImplementation::QueryMemory() } fclose( fd ); return 1; -#elif __hpux +#elif defined(__hpux) unsigned long tv=0; unsigned long tp=0; unsigned long av=0; @@ -2639,7 +2639,7 @@ LongLong SystemInformationImplementation::GetCyclesDifference (DELAY_FUNC DelayF /** Compute the delay overhead */ void SystemInformationImplementation::DelayOverhead(unsigned int uiMS) { -#if _WIN32 +#if defined(_WIN32) LARGE_INTEGER Frequency, StartCounter, EndCounter; __int64 x; @@ -2664,10 +2664,19 @@ void SystemInformationImplementation::DelayOverhead(unsigned int uiMS) /** Return the number of logical CPU per physical CPUs Works only for windows */ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) { +#ifdef __APPLE__ + size_t len = 4; + int cores_per_package = 0; + int err = sysctlbyname("machdep.cpu.cores_per_package", &cores_per_package, &len, NULL, 0); + if (err != 0) + { + return 1; // That name was not found, default to 1 + } + return static_cast(cores_per_package); +#else unsigned int Regebx = 0; - #if USE_ASM_INSTRUCTIONS - if (!this->IsHyperThreadingSupported()) + if (!this->IsHyperThreadingSupported()) { return static_cast(1); // HT not supported } @@ -2678,22 +2687,8 @@ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) mov Regebx, ebx } #endif - -#ifdef __APPLE__ - size_t len = 4; - int cores_per_package = 0; - int err = sysctlbyname("machdep.cpu.cores_per_package", &cores_per_package, &len, NULL, 0); - if (err != 0) - { - return 1; // That name was not found, default to 1 - } - else - { - return static_cast(cores_per_package); - } -#endif - return static_cast ((Regebx & NUM_LOGICAL_BITS) >> 16); +#endif } @@ -2769,7 +2764,7 @@ unsigned char SystemInformationImplementation::GetAPICId() /** Count the number of CPUs. Works only on windows. */ int SystemInformationImplementation::CPUCount() { -#if _WIN32 +#if defined(_WIN32) unsigned char StatusFlag = 0; SYSTEM_INFO info; @@ -3359,7 +3354,7 @@ bool SystemInformationImplementation::QueryQNXProcessor() /** Query the operating system information */ bool SystemInformationImplementation::QueryOSInformation() { -#if _WIN32 +#if defined(_WIN32) this->OSName = "Windows"; diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 695949a34..1bf19c057 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -371,6 +371,10 @@ bool SystemTools::GetEnv(const char* key, kwsys_stl::string& result) } } +#ifdef INTEL_COMPILER +#pragma warning disable 444 +#endif + class kwsysDeletingCharVector : public kwsys_stl::vector { public: @@ -399,6 +403,10 @@ bool SystemTools::PutEnv(const char* value) return ret == 0; } +#ifdef INTEL_COMPILER +#pragma warning restore 444 +#endif + const char* SystemTools::GetExecutableExtension() { diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index b452f6df3..c032d828e 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -15,7 +15,7 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) # KWSys version date month component. Format is MM. -SET(KWSYS_DATE_STAMP_MONTH 10) +SET(KWSYS_DATE_STAMP_MONTH 11) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 25) +SET(KWSYS_DATE_STAMP_DAY 09) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 78db39d6f..21d1196c0 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1531,6 +1531,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES PASS_REGULAR_EXPRESSION "Upload\\.xml") + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/test1.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestConfigFileInBuildDir1 ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/test1.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/testOut1.log" + ) + SET_TESTS_PROPERTIES(CTestTestConfigFileInBuildDir1 PROPERTIES DEPENDS CTestTestNoBuild + PASS_REGULAR_EXPRESSION + "Reading ctest configuration file: ${CMake_SOURCE_DIR}.Tests.CTestTestConfigFileInBuildDir.CTestConfig.cmake") + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/test2.cmake" + @ONLY ESCAPE_QUOTES) + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake" + "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/CTestConfig.cmake" + @ONLY ESCAPE_QUOTES COPYONLY) + ADD_TEST(CTestTestConfigFileInBuildDir2 ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/test2.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/testOut2.log" + ) + SET_TESTS_PROPERTIES(CTestTestConfigFileInBuildDir2 PROPERTIES DEPENDS CTestTestNoBuild + REQUIRED_FILES ${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/CTestConfig.cmake + PASS_REGULAR_EXPRESSION + "Reading ctest configuration file: ${CMake_BINARY_DIR}.Tests.CTestTestConfigFileInBuildDir2.CTestConfig.cmake") + # 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' # calls. diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index d82943f83..9444a1473 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -7,6 +7,7 @@ endif(CPACK_GENERATOR MATCHES "ZIP") if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") + set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") endif(CPACK_GENERATOR MATCHES "RPM") if(CPACK_GENERATOR MATCHES "DEB") diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in index 1e1a410ab..2d251b363 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in @@ -7,6 +7,7 @@ endif(CPACK_GENERATOR MATCHES "ZIP") if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") + set(CPACK_RPM_Development_PACKAGE_REQUIRES "mylib-Runtime") endif(CPACK_GENERATOR MATCHES "RPM") if(CPACK_GENERATOR MATCHES "DEB") diff --git a/Tests/CTestTestConfigFileInBuildDir/CMakeLists.txt b/Tests/CTestTestConfigFileInBuildDir/CMakeLists.txt new file mode 100644 index 000000000..3c53e6623 --- /dev/null +++ b/Tests/CTestTestConfigFileInBuildDir/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(CTestTestConfigFileInBuildDir) +include(CTest) diff --git a/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake new file mode 100644 index 000000000..d2c28f98c --- /dev/null +++ b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "CTestTestConfigFileInBuildDir") +set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") +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/CTestTestConfigFileInBuildDir/test1.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in new file mode 100644 index 000000000..498cab280 --- /dev/null +++ b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in @@ -0,0 +1,17 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +# Settings: +SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +SET(CTEST_SITE "@SITE@") +SET(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ConfigFileInBuildDir1") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfigFileInBuildDir") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir1") +SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") +SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") + +CTEST_START(Experimental) +CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) diff --git a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in new file mode 100644 index 000000000..d359f2d36 --- /dev/null +++ b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in @@ -0,0 +1,17 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +# Settings: +SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +SET(CTEST_SITE "@SITE@") +SET(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ConfigFileInBuildDir2") + +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfigFileInBuildDir") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir2") +SET(CTEST_CVS_COMMAND "@CVSCOMMAND@") +SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") +SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") + +CTEST_START(Experimental) +CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)