diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/BundleUtilities.cmake | 16 | ||||
-rw-r--r-- | Modules/Compiler/Clang.cmake | 8 | ||||
-rw-r--r-- | Modules/DeployQt4.cmake | 736 | ||||
-rw-r--r-- | Modules/FindBISON.cmake | 21 | ||||
-rw-r--r-- | Modules/FindBLAS.cmake | 46 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 1 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 12 | ||||
-rw-r--r-- | Modules/FindPkgConfig.cmake | 17 | ||||
-rw-r--r-- | Modules/FindPython/Support.cmake | 35 | ||||
-rw-r--r-- | Modules/FindPythonLibs.cmake | 44 | ||||
-rw-r--r-- | Modules/FindThreads.cmake | 4 | ||||
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 2 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 6 | ||||
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 2 | ||||
-rw-r--r-- | Modules/NSIS.template.in | 4 | ||||
-rw-r--r-- | Modules/Platform/Android-Clang.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/GNU.cmake | 27 | ||||
-rw-r--r-- | Modules/UseSWIG.cmake | 4 |
18 files changed, 574 insertions, 412 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 31db25a..613ba1a 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -224,17 +224,21 @@ that are already also in the bundle... Anything that points to an external file causes this function to fail the verification. #]=======================================================================] +function(_warn_cmp0080) + message(AUTHOR_WARNING + "Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. " + "Run \"cmake --help-policy CMP0080\" for policy details. " + "Use the cmake_policy command to set the policy and suppress this warning." + ) +endfunction() + # Do not include this module at configure time! if(DEFINED CMAKE_GENERATOR) cmake_policy(GET CMP0080 _BundleUtilities_CMP0080) if(_BundleUtilities_CMP0080 STREQUAL "NEW") message(FATAL_ERROR "BundleUtilities cannot be included at configure time!") - elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD") - message(AUTHOR_WARNING - "Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. " - "Run \"cmake --help-policy CMP0080\" for policy details. " - "Use the cmake_policy command to set the policy and suppress this warning." - ) + elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD" AND NOT _CMP0080_SUPPRESS_WARNING) + _warn_cmp0080() endif() endif() diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 1653b55..e23470b 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -33,6 +33,14 @@ else() set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ") set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP) + if(CMAKE_${lang}_COMPILER_TARGET) + if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4.0) + list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-target" "${CMAKE_${lang}_COMPILER_TARGET}") + else() + list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}") + endif() + endif() + set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES) set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index e758f3a..c69cd38 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -1,388 +1,400 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# DeployQt4 -# --------- -# -# Functions to help assemble a standalone Qt4 executable. -# -# A collection of CMake utility functions useful for deploying Qt4 -# executables. -# -# The following functions are provided by this module: -# -# :: -# -# write_qt4_conf -# resolve_qt4_paths -# fixup_qt4_executable -# install_qt4_plugin_path -# install_qt4_plugin -# install_qt4_executable -# -# Requires CMake 2.6 or greater because it uses function and -# PARENT_SCOPE. Also depends on BundleUtilities.cmake. -# -# :: -# -# WRITE_QT4_CONF(<qt_conf_dir> <qt_conf_contents>) -# -# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>. -# -# :: -# -# RESOLVE_QT4_PATHS(<paths_var> [<executable_path>]) -# -# Loop through <paths_var> list and if any don't exist resolve them -# relative to the <executable_path> (if supplied) or the -# CMAKE_INSTALL_PREFIX. -# -# :: -# -# FIXUP_QT4_EXECUTABLE(<executable> -# [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>]) -# -# Copies 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 libraries are compatible. -# -# <executable> should point to the executable to be fixed-up. -# -# <qtplugins> should contain a list of the names or paths of any Qt -# plugins to be installed. -# -# <libs> will be passed to BundleUtilities and should be a list of any -# already installed plugins, libraries or executables to also be -# fixed-up. -# -# <dirs> will be passed to BundleUtilities and should contain and -# directories to be searched to find library dependencies. -# -# <plugins_dir> allows an custom plugins directory to be used. -# -# <request_qt_conf> will force a qt.conf file to be written even if not -# needed. -# -# :: -# -# INSTALL_QT4_PLUGIN_PATH(plugin executable copy installed_plugin_path_var -# <plugins_dir> <component> <configurations>) -# -# Install (or copy) a resolved <plugin> to the default plugins directory -# (or <plugins_dir>) relative to <executable> and store the result in -# <installed_plugin_path_var>. -# -# If <copy> is set to TRUE then the plugins will be copied rather than -# installed. This is to allow this module to be used at CMake time -# rather than install time. -# -# If <component> is set then anything installed will use this COMPONENT. -# -# :: -# -# INSTALL_QT4_PLUGIN(plugin executable copy installed_plugin_path_var -# <plugins_dir> <component>) -# -# Install (or copy) an unresolved <plugin> to the default plugins -# directory (or <plugins_dir>) relative to <executable> and store the -# result in <installed_plugin_path_var>. See documentation of -# INSTALL_QT4_PLUGIN_PATH. -# -# :: -# -# INSTALL_QT4_EXECUTABLE(<executable> -# [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>]) -# -# 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 libraries are compatible. The executable will be fixed-up -# at install time. <component> is the COMPONENT used for bundle fixup -# and plugin installation. See documentation of FIXUP_QT4_BUNDLE. +#[=======================================================================[.rst: +DeployQt4 +--------- + +Functions to help assemble a standalone Qt4 executable. + +A collection of CMake utility functions useful for deploying Qt4 +executables. + +The following functions are provided by this module: + +:: + + write_qt4_conf + resolve_qt4_paths + fixup_qt4_executable + install_qt4_plugin_path + install_qt4_plugin + install_qt4_executable + +Requires CMake 2.6 or greater because it uses function and +PARENT_SCOPE. Also depends on BundleUtilities.cmake. + +:: + + WRITE_QT4_CONF(<qt_conf_dir> <qt_conf_contents>) + +Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>. + +:: + + RESOLVE_QT4_PATHS(<paths_var> [<executable_path>]) + +Loop through <paths_var> list and if any don't exist resolve them +relative to the <executable_path> (if supplied) or the +CMAKE_INSTALL_PREFIX. + +:: + + FIXUP_QT4_EXECUTABLE(<executable> + [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>]) + +Copies 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 libraries are compatible. + +<executable> should point to the executable to be fixed-up. + +<qtplugins> should contain a list of the names or paths of any Qt +plugins to be installed. + +<libs> will be passed to BundleUtilities and should be a list of any +already installed plugins, libraries or executables to also be +fixed-up. + +<dirs> will be passed to BundleUtilities and should contain and +directories to be searched to find library dependencies. + +<plugins_dir> allows an custom plugins directory to be used. + +<request_qt_conf> will force a qt.conf file to be written even if not +needed. + +:: + + INSTALL_QT4_PLUGIN_PATH(plugin executable copy installed_plugin_path_var + <plugins_dir> <component> <configurations>) + +Install (or copy) a resolved <plugin> to the default plugins directory +(or <plugins_dir>) relative to <executable> and store the result in +<installed_plugin_path_var>. + +If <copy> is set to TRUE then the plugins will be copied rather than +installed. This is to allow this module to be used at CMake time +rather than install time. + +If <component> is set then anything installed will use this COMPONENT. + +:: + + INSTALL_QT4_PLUGIN(plugin executable copy installed_plugin_path_var + <plugins_dir> <component>) + +Install (or copy) an unresolved <plugin> to the default plugins +directory (or <plugins_dir>) relative to <executable> and store the +result in <installed_plugin_path_var>. See documentation of +INSTALL_QT4_PLUGIN_PATH. + +:: + + INSTALL_QT4_EXECUTABLE(<executable> + [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>]) + +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 libraries are compatible. The executable will be fixed-up +at install time. <component> is the COMPONENT used for bundle fixup +and plugin installation. See documentation of FIXUP_QT4_BUNDLE. +#]=======================================================================] # The functions defined in this file depend on the fixup_bundle function # (and others) found in BundleUtilities.cmake -include("${CMAKE_CURRENT_LIST_DIR}/BundleUtilities.cmake") set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}") set(DeployQt4_apple_plugins_dir "PlugIns") function(write_qt4_conf qt_conf_dir qt_conf_contents) - set(qt_conf_path "${qt_conf_dir}/qt.conf") - message(STATUS "Writing ${qt_conf_path}") - file(WRITE "${qt_conf_path}" "${qt_conf_contents}") + set(qt_conf_path "${qt_conf_dir}/qt.conf") + message(STATUS "Writing ${qt_conf_path}") + file(WRITE "${qt_conf_path}" "${qt_conf_contents}") endfunction() function(resolve_qt4_paths paths_var) - unset(executable_path) - if(ARGC GREATER 1) - set(executable_path ${ARGV1}) - endif() - - set(paths_resolved) - foreach(path ${${paths_var}}) - if(EXISTS "${path}") - list(APPEND paths_resolved "${path}") - else() - if(${executable_path}) - list(APPEND paths_resolved "${executable_path}/${path}") - else() - list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}") - endif() - endif() - endforeach() - set(${paths_var} ${paths_resolved} PARENT_SCOPE) -endfunction() + unset(executable_path) + if(ARGC GREATER 1) + set(executable_path ${ARGV1}) + endif() -function(fixup_qt4_executable executable) - unset(qtplugins) - if(ARGC GREATER 1) - set(qtplugins ${ARGV1}) - endif() - unset(libs) - if(ARGC GREATER 2) - set(libs ${ARGV2}) - endif() - unset(dirs) - if(ARGC GREATER 3) - set(dirs ${ARGV3}) - endif() - unset(plugins_dir) - if(ARGC GREATER 4) - set(plugins_dir ${ARGV4}) - endif() - unset(request_qt_conf) - if(ARGC GREATER 5) - set(request_qt_conf ${ARGV5}) - endif() - - message(STATUS "fixup_qt4_executable") - message(STATUS " executable='${executable}'") - message(STATUS " qtplugins='${qtplugins}'") - message(STATUS " libs='${libs}'") - message(STATUS " dirs='${dirs}'") - message(STATUS " plugins_dir='${plugins_dir}'") - message(STATUS " request_qt_conf='${request_qt_conf}'") - - if(QT_LIBRARY_DIR) - list(APPEND dirs "${QT_LIBRARY_DIR}") - endif() - if(QT_BINARY_DIR) - list(APPEND dirs "${QT_BINARY_DIR}") - endif() - - if(APPLE) - set(qt_conf_dir "${executable}/Contents/Resources") - set(executable_path "${executable}") - set(write_qt_conf TRUE) - if(NOT DEFINED plugins_dir) - set(plugins_dir "${DeployQt4_apple_plugins_dir}") - endif() - else() - get_filename_component(executable_path "${executable}" PATH) - if(NOT executable_path) - set(executable_path ".") - endif() - set(qt_conf_dir "${executable_path}") - set(write_qt_conf ${request_qt_conf}) - endif() - - foreach(plugin ${qtplugins}) - set(installed_plugin_path "") - install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path) - list(APPEND libs ${installed_plugin_path}) - endforeach() - - foreach(lib ${libs}) - if(NOT EXISTS "${lib}") - message(FATAL_ERROR "Library does not exist: ${lib}") - endif() - endforeach() - - resolve_qt4_paths(libs "${executable_path}") - - if(write_qt_conf) - set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") - write_qt4_conf("${qt_conf_dir}" "${qt_conf_contents}") - endif() - - fixup_bundle("${executable}" "${libs}" "${dirs}") + set(paths_resolved) + foreach(path ${${paths_var}}) + if(EXISTS "${path}") + list(APPEND paths_resolved "${path}") + else() + if(${executable_path}) + list(APPEND paths_resolved "${executable_path}/${path}") + else() + list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}") + endif() + endif() + endforeach() + set(${paths_var} ${paths_resolved} PARENT_SCOPE) endfunction() +cmake_policy(GET CMP0080 _cmp0080_value) +if(NOT DEFINED CMAKE_GENERATOR OR NOT _cmp0080_value STREQUAL "NEW") + set(_CMP0080_SUPPRESS_WARNING TRUE) + include("${CMAKE_CURRENT_LIST_DIR}/BundleUtilities.cmake") + unset(_CMP0080_SUPPRESS_WARNING) + + function(fixup_qt4_executable executable) + cmake_policy(GET CMP0080 _cmp0080_value) + if(_cmp0080_value STREQUAL "" AND DEFINED CMAKE_GENERATOR) + _warn_cmp0080() + endif() + + unset(qtplugins) + if(ARGC GREATER 1) + set(qtplugins ${ARGV1}) + endif() + unset(libs) + if(ARGC GREATER 2) + set(libs ${ARGV2}) + endif() + unset(dirs) + if(ARGC GREATER 3) + set(dirs ${ARGV3}) + endif() + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(request_qt_conf) + if(ARGC GREATER 5) + set(request_qt_conf ${ARGV5}) + endif() + + message(STATUS "fixup_qt4_executable") + message(STATUS " executable='${executable}'") + message(STATUS " qtplugins='${qtplugins}'") + message(STATUS " libs='${libs}'") + message(STATUS " dirs='${dirs}'") + message(STATUS " plugins_dir='${plugins_dir}'") + message(STATUS " request_qt_conf='${request_qt_conf}'") + + if(QT_LIBRARY_DIR) + list(APPEND dirs "${QT_LIBRARY_DIR}") + endif() + if(QT_BINARY_DIR) + list(APPEND dirs "${QT_BINARY_DIR}") + endif() + + if(APPLE) + set(qt_conf_dir "${executable}/Contents/Resources") + set(executable_path "${executable}") + set(write_qt_conf TRUE) + if(NOT DEFINED plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() + else() + get_filename_component(executable_path "${executable}" PATH) + if(NOT executable_path) + set(executable_path ".") + endif() + set(qt_conf_dir "${executable_path}") + set(write_qt_conf ${request_qt_conf}) + endif() + + foreach(plugin ${qtplugins}) + set(installed_plugin_path "") + install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path) + list(APPEND libs ${installed_plugin_path}) + endforeach() + + foreach(lib ${libs}) + if(NOT EXISTS "${lib}") + message(FATAL_ERROR "Library does not exist: ${lib}") + endif() + endforeach() + + resolve_qt4_paths(libs "${executable_path}") + + if(write_qt_conf) + set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") + write_qt4_conf("${qt_conf_dir}" "${qt_conf_contents}") + endif() + + fixup_bundle("${executable}" "${libs}" "${dirs}") + endfunction() +endif() + function(install_qt4_plugin_path plugin executable copy installed_plugin_path_var) - unset(plugins_dir) - if(ARGC GREATER 4) - set(plugins_dir ${ARGV4}) - endif() - unset(component) - if(ARGC GREATER 5) - set(component ${ARGV5}) - endif() + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(component) + if(ARGC GREATER 5) + set(component ${ARGV5}) + endif() + unset(configurations) + if(ARGC GREATER 6) + set(configurations ${ARGV6}) + endif() + + if(EXISTS "${plugin}") + if(APPLE) + if(NOT plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() + set(plugins_path "${executable}/Contents/${plugins_dir}") + else() + get_filename_component(plugins_path "${executable}" PATH) + if(NOT plugins_path) + set(plugins_path ".") + endif() + if(plugins_dir) + string(APPEND plugins_path "/${plugins_dir}") + endif() + endif() + + set(plugin_group "") + + get_filename_component(plugin_path "${plugin}" PATH) + get_filename_component(plugin_parent_path "${plugin_path}" PATH) + get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME) + get_filename_component(plugin_name "${plugin}" NAME) + string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name) + + if("${plugin_parent_dir_name}" STREQUAL "plugins") + get_filename_component(plugin_group "${plugin_path}" NAME) + set(${plugin_group_var} "${plugin_group}") + endif() + string(APPEND plugins_path "/${plugin_group}") + + if(${copy}) + file(MAKE_DIRECTORY "${plugins_path}") + file(COPY "${plugin}" DESTINATION "${plugins_path}") + else() + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(configurations AND (_isMultiConfig OR CMAKE_BUILD_TYPE)) + set(configurations CONFIGURATIONS ${configurations}) + else() unset(configurations) - if(ARGC GREATER 6) - set(configurations ${ARGV6}) - endif() - - if(EXISTS "${plugin}") - if(APPLE) - if(NOT plugins_dir) - set(plugins_dir "${DeployQt4_apple_plugins_dir}") - endif() - set(plugins_path "${executable}/Contents/${plugins_dir}") - else() - get_filename_component(plugins_path "${executable}" PATH) - if(NOT plugins_path) - set(plugins_path ".") - endif() - if(plugins_dir) - string(APPEND plugins_path "/${plugins_dir}") - endif() - endif() - - set(plugin_group "") - - get_filename_component(plugin_path "${plugin}" PATH) - get_filename_component(plugin_parent_path "${plugin_path}" PATH) - get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME) - get_filename_component(plugin_name "${plugin}" NAME) - string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name) - - if("${plugin_parent_dir_name}" STREQUAL "plugins") - get_filename_component(plugin_group "${plugin_path}" NAME) - set(${plugin_group_var} "${plugin_group}") - endif() - string(APPEND plugins_path "/${plugin_group}") - - if(${copy}) - file(MAKE_DIRECTORY "${plugins_path}") - file(COPY "${plugin}" DESTINATION "${plugins_path}") - else() - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(configurations AND (_isMultiConfig OR CMAKE_BUILD_TYPE)) - set(configurations CONFIGURATIONS ${configurations}) - else() - unset(configurations) - endif() - install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component}) - endif() - set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE) - endif() + endif() + install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component}) + endif() + set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE) + endif() endfunction() function(install_qt4_plugin plugin executable copy installed_plugin_path_var) - unset(plugins_dir) - if(ARGC GREATER 4) - set(plugins_dir ${ARGV4}) - endif() - unset(component) - if(ARGC GREATER 5) - set(component ${ARGV5}) - endif() - - if(EXISTS "${plugin}") - install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") - else() - string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) - 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() - if(NOT EXISTS "${${plugin_debug_var}}") - set(plugin_debug "${plugin_release}") - endif() - - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig OR CMAKE_BUILD_TYPE) - set(_RELEASE_CONFIGS ${CMAKE_CONFIGURATION_TYPES} "${CMAKE_BUILD_TYPE}") - if (_RELEASE_CONFIGS) - list(FILTER _RELEASE_CONFIGS EXCLUDE REGEX "[Dd][Ee][Bb][Uu][Gg]") - endif() - string(REPLACE ";" "|" _RELEASE_CONFIGS "${_RELEASE_CONFIGS}") - install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "${_RELEASE_CONFIGS}") - install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug") - unset(_RELEASE_CONFIGS) - - if(CMAKE_BUILD_TYPE MATCHES "^Debug$") - set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug}) - else() - set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release}) - endif() - else() - install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") - endif() - endif() - set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE) + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(component) + if(ARGC GREATER 5) + set(component ${ARGV5}) + endif() + + if(EXISTS "${plugin}") + install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") + else() + string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) + 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() + if(NOT EXISTS "${${plugin_debug_var}}") + set(plugin_debug "${plugin_release}") + endif() + + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig OR CMAKE_BUILD_TYPE) + set(_RELEASE_CONFIGS ${CMAKE_CONFIGURATION_TYPES} "${CMAKE_BUILD_TYPE}") + if (_RELEASE_CONFIGS) + list(FILTER _RELEASE_CONFIGS EXCLUDE REGEX "[Dd][Ee][Bb][Uu][Gg]") + endif() + string(REPLACE ";" "|" _RELEASE_CONFIGS "${_RELEASE_CONFIGS}") + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "${_RELEASE_CONFIGS}") + install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug") + unset(_RELEASE_CONFIGS) + + if(CMAKE_BUILD_TYPE MATCHES "^Debug$") + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug}) + else() + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release}) + endif() + else() + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") + endif() + endif() + set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE) endfunction() function(install_qt4_executable executable) - unset(qtplugins) - if(ARGC GREATER 1) - set(qtplugins ${ARGV1}) - endif() - unset(libs) - if(ARGC GREATER 2) - set(libs ${ARGV2}) - endif() - unset(dirs) - if(ARGC GREATER 3) - set(dirs ${ARGV3}) - endif() - unset(plugins_dir) - if(ARGC GREATER 4) - set(plugins_dir ${ARGV4}) - endif() - unset(request_qt_conf) - if(ARGC GREATER 5) - set(request_qt_conf ${ARGV5}) - endif() - unset(component) - if(ARGC GREATER 6) - set(component ${ARGV6}) - endif() - - if(QT_LIBRARY_DIR) - list(APPEND dirs "${QT_LIBRARY_DIR}") - endif() - if(QT_BINARY_DIR) - list(APPEND dirs "${QT_BINARY_DIR}") - endif() - if(component) - set(component COMPONENT ${component}) - else() - unset(component) - endif() - - get_filename_component(executable_absolute "${executable}" ABSOLUTE) - if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}") - gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type) - elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}") - gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type) - endif() - if(qtcore_type STREQUAL "system") - set(qt_plugins_dir "") - endif() - - if(QT_IS_STATIC) - message(WARNING "Qt built statically: not installing plugins.") - else() - foreach(plugin ${qtplugins}) - set(installed_plugin_paths "") - install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") - list(APPEND libs ${installed_plugin_paths}) - endforeach() - endif() - - resolve_qt4_paths(libs "") - - install(CODE - "include(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\") - set(BU_CHMOD_BUNDLE_ITEMS TRUE) - FIXUP_QT4_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" - ${component} - ) + unset(qtplugins) + if(ARGC GREATER 1) + set(qtplugins ${ARGV1}) + endif() + unset(libs) + if(ARGC GREATER 2) + set(libs ${ARGV2}) + endif() + unset(dirs) + if(ARGC GREATER 3) + set(dirs ${ARGV3}) + endif() + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(request_qt_conf) + if(ARGC GREATER 5) + set(request_qt_conf ${ARGV5}) + endif() + unset(component) + if(ARGC GREATER 6) + set(component ${ARGV6}) + endif() + + if(QT_LIBRARY_DIR) + list(APPEND dirs "${QT_LIBRARY_DIR}") + endif() + if(QT_BINARY_DIR) + list(APPEND dirs "${QT_BINARY_DIR}") + endif() + if(component) + set(component COMPONENT ${component}) + else() + unset(component) + endif() + + get_filename_component(executable_absolute "${executable}" ABSOLUTE) + if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}") + gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type) + elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}") + gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type) + endif() + if(qtcore_type STREQUAL "system") + set(qt_plugins_dir "") + endif() + + if(QT_IS_STATIC) + message(WARNING "Qt built statically: not installing plugins.") + else() + foreach(plugin ${qtplugins}) + set(installed_plugin_paths "") + install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") + list(APPEND libs ${installed_plugin_paths}) + endforeach() + endif() + + resolve_qt4_paths(libs "") + + install(CODE +"include(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\") +set(BU_CHMOD_BUNDLE_ITEMS TRUE) +FIXUP_QT4_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" + ${component} + ) endfunction() diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake index d684ccd..2000f7f 100644 --- a/Modules/FindBISON.cmake +++ b/Modules/FindBISON.cmake @@ -149,17 +149,25 @@ if(BISON_EXECUTABLE) set(BISON_TARGET_verbose_file "${ReportFile}") list(APPEND BISON_TARGET_cmdopt "--report-file=${BISON_TARGET_verbose_file}") endif() + if(NOT IS_ABSOLUTE "${BISON_TARGET_verbose_file}") + set(BISON_TARGET_verbose_file "${CMAKE_CURRENT_SOURCE_DIR}/${BISON_TARGET_verbose_file}") + endif() endmacro() # internal macro # adds a custom command and sets - # BISON_TARGET_cmdopt, BISON_TARGET_verbose_file, BISON_TARGET_extraoutputs + # BISON_TARGET_cmdopt, BISON_TARGET_extraoutputs macro(BISON_TARGET_option_verbose Name BisonOutput filename) list(APPEND BISON_TARGET_cmdopt "--verbose") - list(APPEND BISON_TARGET_extraoutputs + list(APPEND BISON_TARGET_outputs "${BISON_TARGET_verbose_file}") if (NOT "${filename}" STREQUAL "") - add_custom_command(OUTPUT ${filename} + if(IS_ABSOLUTE "${filename}") + set(BISON_TARGET_verbose_extra_file "${filename}") + else() + set(BISON_TARGET_verbose_extra_file "${CMAKE_CURRENT_SOURCE_DIR}/${filename}") + endif() + add_custom_command(OUTPUT ${BISON_TARGET_verbose_extra_file} COMMAND ${CMAKE_COMMAND} -E copy "${BISON_TARGET_verbose_file}" "${filename}" @@ -167,10 +175,10 @@ if(BISON_EXECUTABLE) DEPENDS "${BISON_TARGET_verbose_file}" COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - set(BISON_${Name}_VERBOSE_FILE ${filename}) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) list(APPEND BISON_TARGET_extraoutputs - "${filename}") + "${BISON_TARGET_verbose_extra_file}") + unset(BISON_TARGET_verbose_extra_file) endif() endmacro() @@ -226,7 +234,6 @@ if(BISON_EXECUTABLE) list(APPEND BISON_TARGET_outputs "${BISON_TARGET_output_header}") add_custom_command(OUTPUT ${BISON_TARGET_outputs} - ${BISON_TARGET_extraoutputs} COMMAND ${BISON_EXECUTABLE} ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput} VERBATIM DEPENDS ${BisonInput} diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 39b9b74..e955bc2 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -53,8 +53,10 @@ # * SGIMATH # * IBMESSL # * Intel10_32 (intel mkl v10 32 bit) -# * Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model) -# * Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model) +# * Intel10_64lp (intel mkl v10+ 64 bit, threaded code, lp64 model) +# * Intel10_64lp_seq (intel mkl v10+ 64 bit, sequential code, lp64 model) +# * Intel10_64ilp (intel mkl v10+ 64 bit, threaded code, ilp64 model) +# * Intel10_64ilp_seq (intel mkl v10+ 64 bit, sequential code, ilp64 model) # * Intel (older versions of mkl 32 and 64 bit) # * ACML # * ACML_MP @@ -199,9 +201,14 @@ if (BLA_VENDOR STREQUAL "All") endif() endif () -#BLAS in intel mkl 10 library? (em64t 64bit) +#BLAS in intel mkl 10+ library? (em64t 64bit) if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") if (NOT BLAS_LIBRARIES) + if (BLA_VENDOR MATCHES "_64ilp") + set(BLAS_mkl_ILP_MODE "ilp64") + else () + set(BLAS_mkl_ILP_MODE "lp64") + endif () if (NOT WIN32) set(LM "-lm") endif () @@ -230,9 +237,9 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") endif() - if (BLA_VENDOR MATCHES "^Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") + "mkl_blas95_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX} mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") endif () # Add threading/sequential libs @@ -262,23 +269,23 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide") endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") # old version list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide") + "mkl_blas95 mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide") # mkl >= 10.3 if (CMAKE_C_COMPILER MATCHES ".+gcc") list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp") + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp") else () list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5") + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5") endif () endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_sequential mkl_core") + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") endif () endif () else () @@ -297,9 +304,9 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") endif() - if (BLA_VENDOR MATCHES "^Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") + "mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") endif () # Add threading/sequential libs @@ -329,24 +336,24 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS "mkl_intel mkl_intel_thread mkl_core guide") endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") # old version list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_intel_thread mkl_core guide") + "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide") # mkl >= 10.3 if (CMAKE_C_COMPILER MATCHES ".+gcc") list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_gnu_thread mkl_core gomp") + "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp") else () list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5") + "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5") endif () endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_sequential mkl_core") + "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") endif () #older vesions of intel mkl libs @@ -376,6 +383,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") endforeach () endif () + unset(BLAS_mkl_ILP_MODE) endif () endif () diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index cc66532..da3d443 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1755,6 +1755,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) list(APPEND _boost_RELEASE_NAMES ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} ) if(_boost_STATIC_RUNTIME_WORKAROUND) set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index a3c87f8..7ca9950 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -278,6 +278,12 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") find_package(Threads REQUIRED) endif() + if (BLA_VENDOR MATCHES "_64ilp") + set(BLAS_mkl_ILP_MODE "ilp64") + else () + set(BLAS_mkl_ILP_MODE "lp64") + endif () + set(LAPACK_SEARCH_LIBS "") if (BLA_F95) @@ -292,7 +298,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND LAPACK_SEARCH_LIBS "mkl_intel_c") list(APPEND LAPACK_SEARCH_LIBS - "mkl_intel_lp64") + "mkl_intel_${BLAS_mkl_ILP_MODE}") else() set(LAPACK_mkl_SEARCH_SYMBOL "cheev") set(_LIBRARIES LAPACK_LIBRARIES) @@ -303,7 +309,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") "mkl_lapack") # new >= 10.3 list(APPEND LAPACK_SEARCH_LIBS - "mkl_gf_lp64") + "mkl_gf_${BLAS_mkl_ILP_MODE}") endif() # First try empty lapack libs @@ -332,6 +338,8 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") ) endif () endforeach () + + unset(BLAS_mkl_ILP_MODE) endif () endif() else() diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 3934867..06beb7d 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -397,7 +397,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma set(_pkg_check_modules_exist_query) # check whether version is given - if (_pkg_check_modules_pkg MATCHES "(.*[^><])(>=|=|<=)(.*)") + if (_pkg_check_modules_pkg MATCHES "(.*[^><])(=|[><]=?)(.*)") set(_pkg_check_modules_pkg_name "${CMAKE_MATCH_1}") set(_pkg_check_modules_pkg_op "${CMAKE_MATCH_2}") set(_pkg_check_modules_pkg_ver "${CMAKE_MATCH_3}") @@ -415,9 +415,11 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}") # create the final query which is of the format: + # * <pkg-name> > <version> # * <pkg-name> >= <version> # * <pkg-name> = <version> # * <pkg-name> <= <version> + # * <pkg-name> < <version> # * --exists <pkg-name> list(APPEND _pkg_check_modules_exist_query --print-errors --short-errors) if (_pkg_check_modules_pkg_op) @@ -538,12 +540,15 @@ endmacro() :command:`target_link_libraries`. The ``GLOBAL`` argument will make the imported target available in global scope. - Each ``<moduleSpec>`` must be in one of the following formats:: + Each ``<moduleSpec>`` can be either a bare module name or it can be a + module name with a version constraint (operators ``=``, ``<``, ``>``, + ``<=`` and ``>=`` are supported). The following are examples for a module + named ``foo`` with various constraints:: - {moduleName} ... matches any version - {moduleName}>={version} ... at least version <version> is required - {moduleName}={version} ... exactly version <version> is required - {moduleName}<={version} ... modules must not be newer than <version> + foo # Any version matches + foo<2 # Only match versions before 2 + foo>=3.1 # Match any version from 3.1 or later + foo=1.2.3 # Foo must be exactly version 1.2.3 The following variables may be set upon return. Two sets of values exist, one for the common case (``<XXX> = <prefix>``) and another for the diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index a8a73a7..5b1ed4b 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -230,7 +230,7 @@ if (${_PYTHON_PREFIX}_FIND_VERSION_COUNT GREATER 1) endif() endif() -# Anaconda distribution: define which architectures can be used +# Python and Anaconda distributions: define which architectures can be used if (CMAKE_SIZEOF_VOID_P) # In this case, search only for 64bit or 32bit math (EXPR _${_PYTHON_PREFIX}_ARCH "${CMAKE_SIZEOF_VOID_P} * 8") @@ -336,9 +336,13 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) NAMES_PER_DIR HINTS ${_${_PYTHON_PREFIX}_HINTS} PATHS [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] @@ -393,9 +397,13 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} NAMES_PER_DIR PATHS [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] @@ -463,6 +471,23 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) endif() if (${_PYTHON_PREFIX}_Interpreter_FOUND) + if (NOT CMAKE_SIZEOF_VOID_P) + # determine interpreter architecture + execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c "import sys; print(sys.maxsize > 2**32)" + RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT + OUTPUT_VARIABLE ${_PYTHON_PREFIX}_IS64BIT + ERROR_VARIABLE ${_PYTHON_PREFIX}_IS64BIT) + if (NOT _${_PYTHON_PREFIX}_RESULT) + if (${_PYTHON_PREFIX}_IS64BIT) + set (_${_PYTHON_PREFIX}_ARCH 64) + set (_${_PYTHON_PREFIX}_ARCH2 64) + else() + set (_${_PYTHON_PREFIX}_ARCH 32) + set (_${_PYTHON_PREFIX}_ARCH2 32) + endif() + endif() + endif() + # retrieve interpreter identity execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -V RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT @@ -769,9 +794,15 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS set (_${_PYTHON_PREFIX}_REGISTRY_PATHS [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath]) + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath]) if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "FIRST") find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 3ac1ce2..6da87a8 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -121,6 +121,34 @@ unset(_PYTHON1_VERSIONS) unset(_PYTHON2_VERSIONS) unset(_PYTHON3_VERSIONS) +# Python distribution: define which architectures can be used +if (CMAKE_SIZEOF_VOID_P) + # In this case, search only for 64bit or 32bit + math (EXPR _PYTHON_ARCH "${CMAKE_SIZEOF_VOID_P} * 8") + set (_PYTHON_ARCH2 _PYTHON_PREFIX_ARCH}) +else() + if (PYTHON_EXECUTABLE) + # determine interpreter architecture + execute_process (COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; print(sys.maxsize > 2**32)" + RESULT_VARIABLE _PYTHON_RESULT + OUTPUT_VARIABLE _PYTHON_IS64BIT + ERROR_VARIABLE _PYTHON_IS64BIT) + if (NOT _PYTHON_RESULT) + if (_PYTHON_IS64BIT) + set (_PYTHON_ARCH 64) + set (_PYTHON_ARCH2 64) + else() + set (_PYTHON_ARCH 32) + set (_PYTHON_ARCH2 32) + endif() + endif() + else() + # architecture unknown, search for both 64bit and 32bit + set (_PYTHON_ARCH 64) + set (_PYTHON_ARCH2 32) + endif() +endif() + foreach(_CURRENT_VERSION ${_Python_VERSIONS}) string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) if(WIN32) @@ -130,9 +158,17 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS}) HINTS ${_Python_LIBRARY_PATH_HINT} PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs/Debug + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs/Debug [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs/Debug + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs/Debug [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs ) endif() @@ -156,7 +192,11 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS}) PATHS ${PYTHON_FRAMEWORK_LIBRARIES} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs ) # Look for the static library in the Python config directory find_library(PYTHON_LIBRARY @@ -201,7 +241,11 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS}) PATHS ${PYTHON_FRAMEWORK_INCLUDES} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/include + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/include [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/include + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/include PATH_SUFFIXES python${_CURRENT_VERSION}mu python${_CURRENT_VERSION}m diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index a0148dd..75e83ea 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -208,7 +208,9 @@ if(THREADS_FOUND AND NOT TARGET Threads::Threads) add_library(Threads::Threads INTERFACE IMPORTED) if(THREADS_HAVE_PTHREAD_ARG) - set_property(TARGET Threads::Threads PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") + set_property(TARGET Threads::Threads + PROPERTY INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -pthread>" + "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-pthread>") endif() if(CMAKE_THREAD_LIBS_INIT) diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index 9dd464c..3dfcf8c 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -276,7 +276,7 @@ _GNUInstallDirs_cache_path(CMAKE_INSTALL_DATAROOTDIR "share" _GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}" "Read-only architecture-independent data (DATAROOTDIR)") -if(CMAKE_SYSTEM_NAME MATCHES "^(.*BSD|DragonFly)$") +if(CMAKE_SYSTEM_NAME MATCHES "^(([^k].*)?BSD|DragonFly)$") _GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_INFODIR "info" "Info documentation (info)") _GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_MANDIR "man" diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 36dd0a0..4ecba05 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -362,7 +362,7 @@ if(MSVC) ) endif() - # include the language dll's for vs8 as well as the actuall dll's + # include the language dll's for vs8 as well as the actual dll's set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. @@ -406,7 +406,7 @@ if(MSVC) ) endif() - # include the language dll's for vs9 as well as the actuall dll's + # include the language dll's for vs9 as well as the actual dll's set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. @@ -487,7 +487,7 @@ if(MSVC) endif() endif() - # include the language dll's as well as the actuall dll's + # include the language dll's as well as the actual dll's set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC") set(__install__libs ${__install__libs} "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll" diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 3bd5147..2de71ee 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -491,7 +491,7 @@ function(cpack_rpm_prepare_install_files INSTALL_FILES_LIST WDIR PACKAGE_PREFIXE list(LENGTH SYMLINK_RELOCATIONS SYMLINK_RELOCATIONS_COUNT) list(LENGTH POINT_RELOCATIONS POINT_RELOCATIONS_COUNT) else() - # location pointed to is ouside WDR so it should be treated as a permanent symlink + # location pointed to is outside WDR so it should be treated as a permanent symlink set(SYMLINK_POINT_WD_ "${SYMLINK_POINT_}") unset(SYMLINK_RELOCATIONS) diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 9001888..f75ae78 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -847,7 +847,7 @@ Section "Uninstall" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: @@ -866,7 +866,7 @@ Section "Uninstall" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" secondStartMenuDeleteLoop: diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake index f739ab1..9ed1e01 100644 --- a/Modules/Platform/Android-Clang.cmake +++ b/Modules/Platform/Android-Clang.cmake @@ -40,5 +40,6 @@ macro(__android_compiler_clang lang) endif() if(NOT CMAKE_${lang}_COMPILER_TARGET) set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}") + list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}") endif() endmacro() diff --git a/Modules/Platform/GNU.cmake b/Modules/Platform/GNU.cmake index e8c3b65..fac29a8 100644 --- a/Modules/Platform/GNU.cmake +++ b/Modules/Platform/GNU.cmake @@ -8,6 +8,33 @@ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") +# Debian policy requires that shared libraries be installed without +# executable permission. Fedora policy requires that shared libraries +# be installed with the executable permission. Since the native tools +# create shared libraries with execute permission in the first place a +# reasonable policy seems to be to install with execute permission by +# default. In order to support debian packages we provide an option +# here. The option default is based on the current distribution, but +# packagers can set it explicitly on the command line. +if(DEFINED CMAKE_INSTALL_SO_NO_EXE) + # Store the decision variable in the cache. This preserves any + # setting the user provides on the command line. + set(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL + "Install .so files without execute permission.") +else() + # Store the decision variable as an internal cache entry to avoid + # checking the platform every time. This option is advanced enough + # that only package maintainers should need to adjust it. They are + # capable of providing a setting on the command line. + if(EXISTS "/etc/debian_version") + set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL + "Install .so files without execute permission.") + else() + set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL + "Install .so files without execute permission.") + endif() +endif() + set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*") include(Platform/UnixPaths) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index dc4febc..f20a53b 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -500,6 +500,10 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) get_property (compile_options SOURCE "${infile}" PROPERTY GENERATED_COMPILE_OPTIONS) set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_OPTIONS $<TARGET_GENEX_EVAL:${target_name},$<TARGET_PROPERTY:${target_name},SWIG_GENERATED_COMPILE_OPTIONS>> ${compile_options}) + if (SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG MATCHES "php") + set_property (SOURCE "${swig_generated_file_fullname}" APPEND PROPERTY INCLUDE_DIRECTORIES "${outdir}") + endif() + set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files} PARENT_SCOPE) # legacy support |