Merge remote-tracking branch 'origin/master' into automoc_qt5

This commit is contained in:
Stephen Kelly 2011-11-10 15:46:13 +01:00
commit b8c8cab242
28 changed files with 347 additions and 86 deletions

View File

@ -3,6 +3,7 @@ set(AM_HEADERS "@_moc_headers@" )
set(AM_MOC_COMPILE_DEFINITIONS "@_moc_compile_defs@") set(AM_MOC_COMPILE_DEFINITIONS "@_moc_compile_defs@")
set(AM_MOC_DEFINITIONS "@_moc_defs@") set(AM_MOC_DEFINITIONS "@_moc_defs@")
set(AM_MOC_INCLUDES "@_moc_incs@") 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_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@")
set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/") set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/") set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")

View File

@ -4,7 +4,12 @@
# used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration # used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
# #
# However CPackRPM has specific features which are controlled by # 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_<ComponentName>_XXXX variables may be used in order
# to have component specific values. Note however that <componentName>
# 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 # Usually those vars correspond to RPM spec file entities, one may find
# information about spec files here http://www.rpm.org/wiki/Docs. # information about spec files here http://www.rpm.org/wiki/Docs.
# You'll find a detailed usage of CPackRPM on the wiki: # 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 # 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 # but if there is file installed with absolute path you'll get
# unexpected behavior. # unexpected behavior.
# CPACK_RPM_SPEC_INSTALL_POST # CPACK_RPM_SPEC_INSTALL_POST [deprecated]
# Mandatory : NO # Mandatory : NO
# Default : - # 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. # 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 # For example setting it to "/bin/true" may be used to prevent
# rpmbuild to strip binaries. # rpmbuild to strip binaries.
@ -158,7 +165,7 @@
# Mandatory : NO # Mandatory : NO
# Default : - # Default : -
# May be used to embed a changelog in the spec file. # 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. # section.
#============================================================================= #=============================================================================
@ -388,9 +395,33 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE)
endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON")) endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
endif(CPACK_RPM_PACKAGE_RELOCATABLE) 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) 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) STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1") MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL) 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) STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}") SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
IF(CPACK_RPM_PACKAGE_DEBUG) 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) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${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}) ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER) ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST # 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_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_PACKAGE_COMPONENT) endif(CPACK_RPM_PACKAGE_COMPONENT)
# Handle post-install file if it has been specified
if(CPACK_RPM_POST_INSTALL_READ_FILE) if(CPACK_RPM_POST_INSTALL_READ_FILE)
if(EXISTS ${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) file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL)
else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) 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") 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}) 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) endif(CPACK_RPM_POST_INSTALL_READ_FILE)
# Handle post-uninstall file if it has been specified
if(CPACK_RPM_POST_UNINSTALL_READ_FILE) if(CPACK_RPM_POST_UNINSTALL_READ_FILE)
if(EXISTS ${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) file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) 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") 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}) 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) endif(CPACK_RPM_POST_UNINSTALL_READ_FILE)
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE) # CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_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_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_PACKAGE_COMPONENT) endif(CPACK_RPM_PACKAGE_COMPONENT)
# Handle pre-install file if it has been specified
if(CPACK_RPM_PRE_INSTALL_READ_FILE) if(CPACK_RPM_PRE_INSTALL_READ_FILE)
if(EXISTS ${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) file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL)
else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) 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") 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}) 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) endif(CPACK_RPM_PRE_INSTALL_READ_FILE)
# Handle pre-uninstall file if it has been specified
if(CPACK_RPM_PRE_UNINSTALL_READ_FILE) if(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
if(EXISTS ${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) file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) 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") 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}) 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) endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
# CPACK_RPM_CHANGELOG_FILE # CPACK_RPM_CHANGELOG_FILE

View File

@ -56,7 +56,7 @@
# (or <plugins_dir>) relative to <executable> and store the result in # (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH. # <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH.
# #
# INSTALL_QT4_EXECUTABLE(<executable> <qtplugins> [<libs> <dirs> <plugins_dir> <request_qt_conf>]) # INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up # 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 # 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 # 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) set(${paths_var} ${paths_resolved} PARENT_SCOPE)
endfunction() endfunction()
function(fixup_qt4_executable executable qtplugins) function(fixup_qt4_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2}) set(libs ${ARGV2})
set(dirs ${ARGV3}) set(dirs ${ARGV3})
set(plugins_dir ${ARGV4}) set(plugins_dir ${ARGV4})
@ -150,7 +151,6 @@ function(fixup_qt4_executable executable qtplugins)
endforeach() endforeach()
resolve_qt4_paths(libs "${executable_path}") resolve_qt4_paths(libs "${executable_path}")
resolve_qt4_paths(dirs "${executable_path}")
if(write_qt_conf) if(write_qt_conf)
set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
@ -225,9 +225,11 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
else() else()
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
endif() endif()
set(plugin_release "${${plugin_var}_RELEASE}") set(plugin_release_var "${plugin_var}_RELEASE")
set(plugin_debug "${${plugin_var}_DEBUG}") set(plugin_debug_var "${plugin_var}_DEBUG")
if(NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_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.") message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
endif() endif()
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel") 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() endforeach()
resolve_qt4_paths(libs) resolve_qt4_paths(libs)
resolve_qt4_paths(dirs)
install(CODE install(CODE
" INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" ) " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" )

View File

@ -5,6 +5,9 @@
# LIBXSLT_INCLUDE_DIR - the LibXslt include directory # LIBXSLT_INCLUDE_DIR - the LibXslt include directory
# LIBXSLT_LIBRARIES - Link these to LibXslt # LIBXSLT_LIBRARIES - Link these to LibXslt
# LIBXSLT_DEFINITIONS - Compiler switches required for using 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. # Copyright 2006-2009 Kitware, Inc.
@ -23,7 +26,7 @@
# use pkg-config to get the directories and then use these values # use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls # in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig) FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_LIBXSLT libxslt) PKG_CHECK_MODULES(PC_LIBXSLT QUIET libxslt)
SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER}) SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
@ -38,10 +41,22 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
${PC_LIBXSLT_LIBRARY_DIRS} ${PC_LIBXSLT_LIBRARY_DIRS}
) )
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 # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR) 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)

View File

@ -655,10 +655,26 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
} }
cmMakefile* mf = command->GetMakefile(); cmMakefile* mf = command->GetMakefile();
std::string fname = src_dir; std::string fname;
fname += "/CTestConfig.cmake";
cmSystemTools::ConvertToUnixSlashes(fname); std::string src_dir_fname = src_dir;
if ( cmSystemTools::FileExists(fname.c_str()) ) 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: " cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
<< fname.c_str() << std::endl); << fname.c_str() << std::endl);
@ -674,8 +690,12 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
} }
else else
{ {
cmCTestLog(this, WARNING, "Cannot locate CTest configuration: " cmCTestLog(this, WARNING,
<< fname.c_str() << std::endl); "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", this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
@ -2526,6 +2546,8 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def,
cmSystemTools::ExpandListArgument(dval, slist); cmSystemTools::ExpandListArgument(dval, slist);
std::vector<std::string>::iterator it; std::vector<std::string>::iterator it;
vec.clear();
for ( it = slist.begin(); it != slist.end(); ++it ) for ( it = slist.begin(); it != slist.end(); ++it )
{ {
cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl); cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl);
@ -2801,7 +2823,7 @@ bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
} }
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"SetCTestConfigurationFromCMakeVariable:" "SetCTestConfigurationFromCMakeVariable:"
<< dconfig << ":" << cmake_var); << dconfig << ":" << cmake_var << std::endl);
this->SetCTestConfiguration(dconfig, ctvar); this->SetCTestConfiguration(dconfig, ctvar);
return true; return true;
} }

View File

@ -1318,8 +1318,9 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item)
this->AddFrameworkPath(this->SplitFramework.match(1)); this->AddFrameworkPath(this->SplitFramework.match(1));
// Add the item using the -framework option. // Add the item using the -framework option.
std::string fw = "-framework "; this->Items.push_back(Item("-framework", false));
fw += this->SplitFramework.match(2); std::string fw = this->SplitFramework.match(2);
fw = this->LocalGenerator->EscapeForShell(fw.c_str());
this->Items.push_back(Item(fw, false)); this->Items.push_back(Item(fw, false));
} }

View File

@ -126,7 +126,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This variable is set to the program that will be" "This variable is set to the program that will be"
" needed to build the output of CMake. If the " " needed to build the output of CMake. If the "
"generator selected was Visual Studio 6, 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, " "Unix makefiles it will be set to make or gmake, "
"and for Visual Studio 7 it set to devenv. For " "and for Visual Studio 7 it set to devenv. For "
"Nmake Makefiles the value is nmake. This can be " "Nmake Makefiles the value is nmake. This can be "
@ -1102,6 +1102,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
false, false,
"Variables that Control the Build"); "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 cm->DefineProperty
("CMAKE_DEBUG_POSTFIX", cmProperty::VARIABLE, ("CMAKE_DEBUG_POSTFIX", cmProperty::VARIABLE,
"See variable CMAKE_<CONFIG>_POSTFIX.", "See variable CMAKE_<CONFIG>_POSTFIX.",

View File

@ -87,6 +87,16 @@ void cmExtraEclipseCDT4Generator::Generate()
this->GenerateSourceProject = (this->IsOutOfSourceBuild && this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")); 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, // 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 // 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. // the cvs/svn root directory. Hence, this is provided as an option.
@ -998,7 +1008,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
std::string virtDir = "[Targets]/"; std::string virtDir = "[Targets]/";
virtDir += prefix; virtDir += prefix;
virtDir += ti->first; 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()); ti->first.c_str());
std::string cleanArgs = "-E chdir \""; std::string cleanArgs = "-E chdir \"";

View File

@ -65,7 +65,12 @@ public:
"For historical reasons, relative paths given to this command are " "For historical reasons, relative paths given to this command are "
"passed to the linker unchanged " "passed to the linker unchanged "
"(unlike many CMake commands which interpret them relative to the " "(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."
; ;
} }

View File

@ -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 void
cmLocalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3
@ -646,13 +667,13 @@ cmLocalUnixMakefileGenerator3
makefileStream makefileStream
<< "# The CMake executable.\n" << "# The CMake executable.\n"
<< "CMAKE_COMMAND = " << "CMAKE_COMMAND = "
<< this->Convert(cmakecommand.c_str(), FULL, SHELL).c_str() << this->ConvertShellCommand(cmakecommand, FULL)
<< "\n" << "\n"
<< "\n"; << "\n";
makefileStream makefileStream
<< "# The command to remove a file.\n" << "# The command to remove a file.\n"
<< "RM = " << "RM = "
<< this->Convert(cmakecommand.c_str(),FULL,SHELL).c_str() << this->ConvertShellCommand(cmakecommand, FULL)
<< " -E remove -f\n" << " -E remove -f\n"
<< "\n"; << "\n";
@ -662,7 +683,7 @@ cmLocalUnixMakefileGenerator3
makefileStream makefileStream
<< "# The program to use to edit the cache.\n" << "# The program to use to edit the cache.\n"
<< "CMAKE_EDIT_COMMAND = " << "CMAKE_EDIT_COMMAND = "
<< this->Convert(edit_cmd,FULL,SHELL) << "\n" << this->ConvertShellCommand(edit_cmd, FULL) << "\n"
<< "\n"; << "\n";
} }
@ -697,7 +718,7 @@ cmLocalUnixMakefileGenerator3
// This should be the first target except for the default_target in // This should be the first target except for the default_target in
// the interface Makefile. // the interface Makefile.
this->WriteMakeRule( 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); ".SUFFIXES", no_depends, no_commands, false);
if(!this->NMake && !this->WatcomWMake && !this->BorlandMakeCurlyHack) if(!this->NMake && !this->WatcomWMake && !this->BorlandMakeCurlyHack)
@ -1019,22 +1040,9 @@ cmLocalUnixMakefileGenerator3
// without the current directory being in the search path. // without the current directory being in the search path.
cmd = "./" + cmd; 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 = std::string launcher =
this->MakeLauncher(cc, target, workingDir? NONE : START_OUTPUT); 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); ccg.AppendArguments(c, cmd);
if(content) if(content)

View File

@ -340,6 +340,7 @@ protected:
void CheckMultipleOutputs(bool verbose); void CheckMultipleOutputs(bool verbose);
private: private:
std::string ConvertShellCommand(std::string const& cmd, RelativeRoot root);
std::string MakeLauncher(const cmCustomCommand& cc, cmTarget* target, std::string MakeLauncher(const cmCustomCommand& cc, cmTarget* target,
RelativeRoot relative); RelativeRoot relative);

View File

@ -1811,11 +1811,18 @@ void cmLocalVisualStudio7Generator::WriteProjectSCC(std::ostream& fout,
const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME"); const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH"); const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER"); const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
if(vsProvider && vsLocalpath && vsProjectname) if(vsProvider && vsLocalpath && vsProjectname)
{ {
fout << "\tSccProjectName=\"" << vsProjectname << "\"\n" fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
<< "\tSccLocalPath=\"" << vsLocalpath << "\"\n" << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
<< "\tSccProvider=\"" << vsProvider << "\"\n"; << "\tSccProvider=\"" << vsProvider << "\"\n";
const char* vsAuxPath = target.GetProperty("VS_SCC_AUXPATH");
if(vsAuxPath)
{
fout << "\tSccAuxPath=\"" << vsAuxPath << "\"\n";
}
} }
} }

View File

@ -71,7 +71,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
targetDir += ".dir/"; targetDir += ".dir/";
cmCustomCommandLine currentLine; cmCustomCommandLine currentLine;
currentLine.push_back(makefile->GetCMakeInstance()->GetCMakeCommand()); currentLine.push_back(makefile->GetSafeDefinition("CMAKE_COMMAND"));
currentLine.push_back("-E"); currentLine.push_back("-E");
currentLine.push_back("cmake_automoc"); currentLine.push_back("cmake_automoc");
currentLine.push_back(targetDir); currentLine.push_back(targetDir);
@ -128,9 +128,15 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
} }
} }
std::string _moc_incs = makefile->GetProperty("INCLUDE_DIRECTORIES"); const char* tmp = makefile->GetProperty("INCLUDE_DIRECTORIES");
std::string _moc_defs = makefile->GetProperty("DEFINITIONS"); std::string _moc_incs = (tmp!=0 ? tmp : "");
std::string _moc_compile_defs = makefile->GetProperty("COMPILE_DEFINITIONS"); 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: // forget the variables added here afterwards again:
cmMakefile::ScopePushPop varScope(makefile); cmMakefile::ScopePushPop varScope(makefile);
static_cast<void>(varScope); static_cast<void>(varScope);
@ -139,10 +145,11 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
makefile->AddDefinition("_moc_incs", _moc_incs.c_str()); makefile->AddDefinition("_moc_incs", _moc_incs.c_str());
makefile->AddDefinition("_moc_defs", _moc_defs.c_str()); makefile->AddDefinition("_moc_defs", _moc_defs.c_str());
makefile->AddDefinition("_moc_compile_defs", _moc_compile_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_files", _moc_files.c_str());
makefile->AddDefinition("_moc_headers", _moc_headers.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; std::string inputFile = cmakeRoot;
inputFile += "/Modules/AutomocInfo.cmake.in"; inputFile += "/Modules/AutomocInfo.cmake.in";
std::string outputFile = targetDir; std::string outputFile = targetDir;
@ -235,6 +242,7 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile,
"AM_MOC_COMPILE_DEFINITIONS"); "AM_MOC_COMPILE_DEFINITIONS");
this->MocDefinitionsStr = makefile->GetSafeDefinition("AM_MOC_DEFINITIONS"); this->MocDefinitionsStr = makefile->GetSafeDefinition("AM_MOC_DEFINITIONS");
this->MocIncludesStr = makefile->GetSafeDefinition("AM_MOC_INCLUDES"); this->MocIncludesStr = makefile->GetSafeDefinition("AM_MOC_INCLUDES");
this->MocOptionsStr = makefile->GetSafeDefinition("AM_MOC_OPTIONS");
this->ProjectBinaryDir = makefile->GetSafeDefinition("AM_CMAKE_BINARY_DIR"); this->ProjectBinaryDir = makefile->GetSafeDefinition("AM_CMAKE_BINARY_DIR");
this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR"); this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR");
this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME"); this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME");
@ -311,6 +319,8 @@ void cmQtAutomoc::Init()
} }
} }
cmSystemTools::ExpandListArgument(this->MocOptionsStr, this->MocOptions);
std::vector<std::string> incPaths; std::vector<std::string> incPaths;
cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths); cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths);
@ -720,6 +730,12 @@ bool cmQtAutomoc::GenerateMoc(const std::string& sourceFile,
{ {
command.push_back(*it); command.push_back(*it);
} }
for(std::vector<std::string>::const_iterator it=this->MocOptions.begin();
it != this->MocOptions.end();
++it)
{
command.push_back(*it);
}
#ifdef _WIN32 #ifdef _WIN32
command.push_back("-DWIN32"); command.push_back("-DWIN32");
#endif #endif

View File

@ -62,6 +62,7 @@ private:
std::string MocCompileDefinitionsStr; std::string MocCompileDefinitionsStr;
std::string MocDefinitionsStr; std::string MocDefinitionsStr;
std::string MocIncludesStr; std::string MocIncludesStr;
std::string MocOptionsStr;
std::string ProjectBinaryDir; std::string ProjectBinaryDir;
std::string ProjectSourceDir; std::string ProjectSourceDir;
std::string TargetName; std::string TargetName;
@ -71,6 +72,7 @@ private:
std::string OutMocCppFilename; std::string OutMocCppFilename;
std::list<std::string> MocIncludes; std::list<std::string> MocIncludes;
std::list<std::string> MocDefinitions; std::list<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
bool Verbose; bool Verbose;
bool ColorOutput; bool ColorOutput;

View File

@ -140,7 +140,8 @@ public:
"the target in an IDE like visual studio. VS_KEYWORD can be set " "the target in an IDE like visual studio. VS_KEYWORD can be set "
"to change the visual studio keyword, for example QT integration " "to change the visual studio keyword, for example QT integration "
"works better if this is set to Qt4VSv1.0.\n" "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 " "to add support for source control bindings in a Visual Studio "
"project file.\n" "project file.\n"
"VS_GLOBAL_<variable> can be set to add a Visual Studio " "VS_GLOBAL_<variable> can be set to add a Visual Studio "

View File

@ -157,7 +157,20 @@ void cmTarget::DefineProperties(cmake *cm)
"files are included in a generated <targetname>_automoc.cpp file, " "files are included in a generated <targetname>_automoc.cpp file, "
"which is compiled as part of the target." "which is compiled as part of the target."
"This property is initialized by the value of the variable " "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 cm->DefineProperty
("BUILD_WITH_INSTALL_RPATH", cmProperty::TARGET, ("BUILD_WITH_INSTALL_RPATH", cmProperty::TARGET,
@ -1011,7 +1024,7 @@ void cmTarget::DefineProperties(cmake *cm)
"provider property."); "provider property.");
cm->DefineProperty cm->DefineProperty
("VS_SCC_LOCALPATH", cmProperty::TARGET, ("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 " "Can be set to change the visual studio source code control "
"local path property."); "local path property.");
cm->DefineProperty cm->DefineProperty
@ -1019,6 +1032,11 @@ void cmTarget::DefineProperties(cmake *cm)
"Visual Studio Source Code Control Project.", "Visual Studio Source Code Control Project.",
"Can be set to change the visual studio source code control " "Can be set to change the visual studio source code control "
"project name property."); "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 cm->DefineProperty
("VS_GLOBAL_<variable>", cmProperty::TARGET, ("VS_GLOBAL_<variable>", cmProperty::TARGET,
"Visual Studio project-specific global variable.", "Visual Studio project-specific global variable.",
@ -1179,6 +1197,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0); this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0);
this->SetPropertyDefault("OSX_ARCHITECTURES", 0); this->SetPropertyDefault("OSX_ARCHITECTURES", 0);
this->SetPropertyDefault("AUTOMOC", 0); this->SetPropertyDefault("AUTOMOC", 0);
this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0);
this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0); this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0);
// Collect the set of configuration types. // Collect the set of configuration types.

View File

@ -182,7 +182,7 @@ void cmVisualStudio10TargetGenerator::Generate()
const char* vsLocalPath = this->Target->GetProperty("VS_SCC_LOCALPATH"); const char* vsLocalPath = this->Target->GetProperty("VS_SCC_LOCALPATH");
const char* vsProvider = this->Target->GetProperty("VS_SCC_PROVIDER"); const char* vsProvider = this->Target->GetProperty("VS_SCC_PROVIDER");
if ( vsProjectName && vsLocalPath && vsProvider) if( vsProjectName && vsLocalPath && vsProvider )
{ {
this->WriteString("<SccProjectName>", 2); this->WriteString("<SccProjectName>", 2);
(*this->BuildFileStream) << cmVS10EscapeXML(vsProjectName) << (*this->BuildFileStream) << cmVS10EscapeXML(vsProjectName) <<
@ -193,6 +193,14 @@ void cmVisualStudio10TargetGenerator::Generate()
this->WriteString("<SccProvider>", 2); this->WriteString("<SccProvider>", 2);
(*this->BuildFileStream) << cmVS10EscapeXML(vsProvider) << (*this->BuildFileStream) << cmVS10EscapeXML(vsProvider) <<
"</SccProvider>\n"; "</SccProvider>\n";
const char* vsAuxPath = this->Target->GetProperty("VS_SCC_AUXPATH");
if( vsAuxPath )
{
this->WriteString("<SccAuxPath>", 2);
(*this->BuildFileStream) << cmVS10EscapeXML(vsAuxPath) <<
"</SccAuxPath>\n";
}
} }
this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2); this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2);

View File

@ -592,7 +592,7 @@ void CommandLineArguments::GenerateHelp()
// Create format for that string // Create format for that string
char format[80]; char format[80];
sprintf(format, " %%-%ds ", static_cast<unsigned int>(maxlen)); sprintf(format, " %%-%us ", static_cast<unsigned int>(maxlen));
maxlen += 4; // For the space before and after the option maxlen += 4; // For the space before and after the option

View File

@ -72,7 +72,7 @@
# include <ctype.h> // int isdigit(int c); # include <ctype.h> // int isdigit(int c);
# include <errno.h> // extern int errno; # include <errno.h> // extern int errno;
# include <sys/time.h> # include <sys/time.h>
#elif __hpux #elif defined( __hpux )
# include <sys/param.h> # include <sys/param.h>
# include <sys/pstat.h> # include <sys/pstat.h>
#endif #endif
@ -1454,7 +1454,7 @@ bool SystemInformationImplementation::RetrieveCPUClockSpeed()
{ {
bool retrieved = false; bool retrieved = false;
#if _WIN32 #if defined(_WIN32)
// First of all we check to see if the RDTSC (0x0F, 0x31) instruction is // 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 // supported. If not, we fallback to trying to read this value from the
// registry: // registry:
@ -2389,7 +2389,7 @@ int SystemInformationImplementation::QueryMemory()
this->AvailablePhysicalMemory = 0; this->AvailablePhysicalMemory = 0;
#ifdef __CYGWIN__ #ifdef __CYGWIN__
return 0; return 0;
#elif _WIN32 #elif defined(_WIN32)
#if _MSC_VER < 1300 #if _MSC_VER < 1300
MEMORYSTATUS ms; MEMORYSTATUS ms;
unsigned long tv, tp, av, ap; unsigned long tv, tp, av, ap;
@ -2415,7 +2415,7 @@ int SystemInformationImplementation::QueryMemory()
this->AvailableVirtualMemory = av>>10>>10; this->AvailableVirtualMemory = av>>10>>10;
this->AvailablePhysicalMemory = ap>>10>>10; this->AvailablePhysicalMemory = ap>>10>>10;
return 1; return 1;
#elif __linux #elif defined(__linux)
unsigned long tv=0; unsigned long tv=0;
unsigned long tp=0; unsigned long tp=0;
unsigned long av=0; unsigned long av=0;
@ -2532,7 +2532,7 @@ int SystemInformationImplementation::QueryMemory()
} }
fclose( fd ); fclose( fd );
return 1; return 1;
#elif __hpux #elif defined(__hpux)
unsigned long tv=0; unsigned long tv=0;
unsigned long tp=0; unsigned long tp=0;
unsigned long av=0; unsigned long av=0;
@ -2639,7 +2639,7 @@ LongLong SystemInformationImplementation::GetCyclesDifference (DELAY_FUNC DelayF
/** Compute the delay overhead */ /** Compute the delay overhead */
void SystemInformationImplementation::DelayOverhead(unsigned int uiMS) void SystemInformationImplementation::DelayOverhead(unsigned int uiMS)
{ {
#if _WIN32 #if defined(_WIN32)
LARGE_INTEGER Frequency, StartCounter, EndCounter; LARGE_INTEGER Frequency, StartCounter, EndCounter;
__int64 x; __int64 x;
@ -2664,8 +2664,17 @@ void SystemInformationImplementation::DelayOverhead(unsigned int uiMS)
/** Return the number of logical CPU per physical CPUs Works only for windows */ /** Return the number of logical CPU per physical CPUs Works only for windows */
unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) 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<unsigned char>(cores_per_package);
#else
unsigned int Regebx = 0; unsigned int Regebx = 0;
#if USE_ASM_INSTRUCTIONS #if USE_ASM_INSTRUCTIONS
if (!this->IsHyperThreadingSupported()) if (!this->IsHyperThreadingSupported())
{ {
@ -2678,22 +2687,8 @@ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void)
mov Regebx, ebx mov Regebx, ebx
} }
#endif #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<unsigned char>(cores_per_package);
}
#endif
return static_cast<unsigned char> ((Regebx & NUM_LOGICAL_BITS) >> 16); return static_cast<unsigned char> ((Regebx & NUM_LOGICAL_BITS) >> 16);
#endif
} }
@ -2769,7 +2764,7 @@ unsigned char SystemInformationImplementation::GetAPICId()
/** Count the number of CPUs. Works only on windows. */ /** Count the number of CPUs. Works only on windows. */
int SystemInformationImplementation::CPUCount() int SystemInformationImplementation::CPUCount()
{ {
#if _WIN32 #if defined(_WIN32)
unsigned char StatusFlag = 0; unsigned char StatusFlag = 0;
SYSTEM_INFO info; SYSTEM_INFO info;
@ -3359,7 +3354,7 @@ bool SystemInformationImplementation::QueryQNXProcessor()
/** Query the operating system information */ /** Query the operating system information */
bool SystemInformationImplementation::QueryOSInformation() bool SystemInformationImplementation::QueryOSInformation()
{ {
#if _WIN32 #if defined(_WIN32)
this->OSName = "Windows"; this->OSName = "Windows";

View File

@ -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<char*> class kwsysDeletingCharVector : public kwsys_stl::vector<char*>
{ {
public: public:
@ -399,6 +403,10 @@ bool SystemTools::PutEnv(const char* value)
return ret == 0; return ret == 0;
} }
#ifdef INTEL_COMPILER
#pragma warning restore 444
#endif
const char* SystemTools::GetExecutableExtension() const char* SystemTools::GetExecutableExtension()
{ {

View File

@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_YEAR 2011)
# KWSys version date month component. Format is MM. # 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. # KWSys version date day component. Format is DD.
SET(KWSYS_DATE_STAMP_DAY 25) SET(KWSYS_DATE_STAMP_DAY 09)

View File

@ -1531,6 +1531,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES
PASS_REGULAR_EXPRESSION "Upload\\.xml") 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. # 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' # After 2.6 is required, this could be a function without the extra 'set'
# calls. # calls.

View File

@ -7,6 +7,7 @@ endif(CPACK_GENERATOR MATCHES "ZIP")
if(CPACK_GENERATOR MATCHES "RPM") if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_COMPONENT_INSTALL "ON")
set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries")
endif(CPACK_GENERATOR MATCHES "RPM") endif(CPACK_GENERATOR MATCHES "RPM")
if(CPACK_GENERATOR MATCHES "DEB") if(CPACK_GENERATOR MATCHES "DEB")

View File

@ -7,6 +7,7 @@ endif(CPACK_GENERATOR MATCHES "ZIP")
if(CPACK_GENERATOR MATCHES "RPM") if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_COMPONENT_INSTALL "ON")
set(CPACK_RPM_Development_PACKAGE_REQUIRES "mylib-Runtime")
endif(CPACK_GENERATOR MATCHES "RPM") endif(CPACK_GENERATOR MATCHES "RPM")
if(CPACK_GENERATOR MATCHES "DEB") if(CPACK_GENERATOR MATCHES "DEB")

View File

@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 2.8)
project(CTestTestConfigFileInBuildDir)
include(CTest)

View File

@ -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)

View File

@ -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)

View File

@ -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)