summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCUDACompiler.cmake.in2
-rwxr-xr-xModules/CPack.STGZ_Header.sh.in5
-rw-r--r--Modules/CPackIFW.cmake85
-rw-r--r--Modules/Compiler/GNU-C-DetermineCompiler.cmake (renamed from Modules/Compiler/GNU-DetermineCompiler.cmake)0
-rw-r--r--Modules/Compiler/GNU-CXX-DetermineCompiler.cmake15
-rw-r--r--Modules/FindCUDA/select_compute_arch.cmake20
-rw-r--r--Modules/FindGTK2.cmake82
-rw-r--r--Modules/FindLua.cmake16
-rw-r--r--Modules/FindMPI.cmake13
-rw-r--r--Modules/FindPkgConfig.cmake5
-rw-r--r--Modules/Platform/Android-Common.cmake9
-rw-r--r--Modules/Platform/Android/ndk-stl-c++.cmake5
-rw-r--r--Modules/Qt4Macros.cmake2
13 files changed, 170 insertions, 89 deletions
diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in
index 7e8efa7..158d12b 100644
--- a/Modules/CMakeCUDACompiler.cmake.in
+++ b/Modules/CMakeCUDACompiler.cmake.in
@@ -13,7 +13,7 @@ set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX")
set(CMAKE_CUDA_COMPILER_ID_RUN 1)
set(CMAKE_CUDA_SOURCE_FILE_EXTENSIONS cu)
-set(CMAKE_CUDA_LINKER_PREFERENCE 10)
+set(CMAKE_CUDA_LINKER_PREFERENCE 15)
set(CMAKE_CUDA_LINKER_PREFERENCE_PROPAGATES 1)
set(CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES@")
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index dee576f..c615851 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -130,7 +130,10 @@ echo ""
use_new_tail_syntax="-n"
tail $use_new_tail_syntax +1 "$0" > /dev/null 2> /dev/null || use_new_tail_syntax=""
-tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
+extractor="pax -r"
+command -v pax > /dev/null 2> /dev/null || extractor="tar xf -"
+
+tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && ${extractor}) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
echo "Unpacking finished successfully"
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index ae595fb..deb724c 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -227,18 +227,21 @@
# ::
#
# cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL] [VIRTUAL]
-# [FORCED_INSTALLATION]
+# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
# [DISPLAY_NAME <display_name>]
# [DESCRIPTION <description>]
+# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
# [SCRIPT <script>]
-# [PRIORITY <priority>]
-# [DEPENDS <com_id> ...]
+# [PRIORITY|SORTING_PRIORITY <sorting_priority>] # Note: PRIORITY is deprecated
+# [DEPENDS|DEPENDENCIES <com_id> ...]
+# [AUTO_DEPEND_ON <comp_id> ...]
# [LICENSES <display_name> <file_path> ...]
# [DEFAULT <value>]
-# [USER_INTERFACES <file_path> <file_path> ...])
+# [USER_INTERFACES <file_path> <file_path> ...]
+# [TRANSLATIONS <file_path> <file_path> ...])
#
# This command should be called after :command:`cpack_add_component` command.
#
@@ -260,6 +263,9 @@
# It is a equivalent of the ``REQUARED`` option from the
# :command:`cpack_add_component` command.
#
+# ``REQUIRES_ADMIN_RIGHTS``
+# set it if the component needs to be installed with elevated permissions.
+#
# ``NAME``
# is used to create domain-like identification for this component.
# By default used origin component name.
@@ -272,6 +278,10 @@
# set to rewrite original description configured by
# :command:`cpack_add_component` command.
#
+# ``UPDATE_TEXT``
+# will be added to the component description if this is an update to
+# the component.
+#
# ``VERSION``
# is version of component.
# By default used :variable:`CPACK_PACKAGE_VERSION`.
@@ -283,11 +293,18 @@
# is a relative or absolute path to operations script
# for this component.
#
-# ``PRIORITY``
+# ``PRIORITY`` | ``SORTING_PRIORITY``
# is priority of the component in the tree.
+# The ``PRIORITY`` option is deprecated and will be removed in a future
+# version of CMake. Please use ``SORTING_PRIORITY`` option instead.
+#
+# ``DEPENDS`` | ``DEPENDENCIES``
+# list of dependency component or component group identifiers in
+# QtIFW_ style.
#
-# ``DEPENDS``
-# list of dependency component identifiers in QtIFW_ style.
+# ``AUTO_DEPEND_ON``
+# list of identifiers of component or component group in QtIFW_ style
+# that this component has an automatic dependency on.
#
# ``LICENSES``
# pair of <display_name> and <file_path> of license text for this
@@ -300,7 +317,10 @@
# as a value of the ``SCRIPT`` option).
#
# ``USER_INTERFACES``
-# a list of <file_path> representing pages to load
+# is a list of <file_path> ('.ui' files) representing pages to load.
+#
+# ``TRANSLATIONS``
+# is a list of <file_path> ('.qm' files) representing translations to load.
#
#
# .. command:: cpack_ifw_configure_component_group
@@ -310,17 +330,21 @@
# ::
#
# cpack_ifw_configure_component_group(<groupname> [VIRTUAL]
-# [FORCED_INSTALLATION]
+# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
# [DISPLAY_NAME <display_name>]
# [DESCRIPTION <description>]
+# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
# [SCRIPT <script>]
-# [PRIORITY <priority>]
+# [PRIORITY|SORTING_PRIORITY <sorting_priority>] # Note: PRIORITY is deprecated
+# [DEPENDS|DEPENDENCIES <com_id> ...]
+# [AUTO_DEPEND_ON <comp_id> ...]
# [LICENSES <display_name> <file_path> ...]
# [DEFAULT <value>]
-# [USER_INTERFACES <file_path> <file_path> ...])
+# [USER_INTERFACES <file_path> <file_path> ...]
+# [TRANSLATIONS <file_path> <file_path> ...])
#
# This command should be called after :command:`cpack_add_component_group`
# command.
@@ -332,6 +356,10 @@
# ``FORCED_INSTALLATION``
# if set, then the group must always be installed.
#
+# ``REQUIRES_ADMIN_RIGHTS``
+# set it if the component group needs to be installed with elevated
+# permissions.
+#
# ``NAME``
# is used to create domain-like identification for this component group.
# By default used origin component group name.
@@ -344,6 +372,10 @@
# set to rewrite original description configured by
# :command:`cpack_add_component_group` command.
#
+# ``UPDATE_TEXT``
+# will be added to the component group description if this is an update to
+# the component group.
+#
# ``VERSION``
# is version of component group.
# By default used :variable:`CPACK_PACKAGE_VERSION`.
@@ -355,8 +387,18 @@
# is a relative or absolute path to operations script
# for this component group.
#
-# ``PRIORITY``
+# ``PRIORITY`` | ``SORTING_PRIORITY``
# is priority of the component group in the tree.
+# The ``PRIORITY`` option is deprecated and will be removed in a future
+# version of CMake. Please use ``SORTING_PRIORITY`` option instead.
+#
+# ``DEPENDS`` | ``DEPENDENCIES``
+# list of dependency component or component group identifiers in
+# QtIFW_ style.
+#
+# ``AUTO_DEPEND_ON``
+# list of identifiers of component or component group in QtIFW_ style
+# that this component group has an automatic dependency on.
#
# ``LICENSES``
# pair of <display_name> and <file_path> of license text for this
@@ -370,7 +412,10 @@
# the script as a value of the ``SCRIPT`` option).
#
# ``USER_INTERFACES``
-# a list of <file_path> representing pages to load
+# is a list of <file_path> ('.ui' files) representing pages to load.
+#
+# ``TRANSLATIONS``
+# is a list of <file_path> ('.qm' files) representing translations to load.
#
#
# .. command:: cpack_ifw_add_repository
@@ -711,14 +756,15 @@ macro(cpack_ifw_configure_component compname)
string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
- set(_IFW_OPT COMMON ESSENTIAL VIRTUAL FORCED_INSTALLATION)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY DEFAULT)
- set(_IFW_MULTI_ARGS DEPENDS LICENSES USER_INTERFACES)
+ set(_IFW_OPT COMMON ESSENTIAL VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
+ set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_SCRIPT)
_cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_LICENSES)
_cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_USER_INTERFACES)
+ _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_TRANSLATIONS)
set(_CPACK_IFWCOMP_STR "\n# Configuration for IFW component \"${compname}\"\n")
@@ -751,14 +797,15 @@ macro(cpack_ifw_configure_component_group grpname)
string(TOUPPER ${grpname} _CPACK_IFWGRP_UNAME)
- set(_IFW_OPT VIRTUAL FORCED_INSTALLATION)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY DEFAULT)
- set(_IFW_MULTI_ARGS LICENSES USER_INTERFACES)
+ set(_IFW_OPT VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
+ set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_SCRIPT)
_cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_LICENSES)
_cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_USER_INTERFACES)
+ _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_TRANSLATIONS)
set(_CPACK_IFWGRP_STR "\n# Configuration for IFW component group \"${grpname}\"\n")
diff --git a/Modules/Compiler/GNU-DetermineCompiler.cmake b/Modules/Compiler/GNU-C-DetermineCompiler.cmake
index 6ddc566..6ddc566 100644
--- a/Modules/Compiler/GNU-DetermineCompiler.cmake
+++ b/Modules/Compiler/GNU-C-DetermineCompiler.cmake
diff --git a/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake b/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake
new file mode 100644
index 0000000..c25b147
--- /dev/null
+++ b/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake
@@ -0,0 +1,15 @@
+
+set(_compiler_id_pp_test "defined(__GNUC__) || defined(__GNUG__)")
+
+set(_compiler_id_version_compute "
+# if defined(__GNUC__)
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
+# else
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
+# endif")
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index 5ce71a9..19fc14f 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -44,9 +44,10 @@ endif ()
#
function(CUDA_DETECT_INSTALLED_GPUS OUT_VARIABLE)
if(NOT CUDA_GPU_DETECT_OUTPUT)
- set(cufile ${PROJECT_BINARY_DIR}/detect_cuda_archs.cu)
+ set(file ${PROJECT_BINARY_DIR}/detect_cuda_compute_capabilities.cpp)
- file(WRITE ${cufile} ""
+ file(WRITE ${file} ""
+ "#include <cuda_runtime.h>\n"
"#include <cstdio>\n"
"int main()\n"
"{\n"
@@ -62,14 +63,15 @@ function(CUDA_DETECT_INSTALLED_GPUS OUT_VARIABLE)
" return 0;\n"
"}\n")
- execute_process(COMMAND "${CUDA_NVCC_EXECUTABLE}" "--run" "${cufile}"
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles/"
- RESULT_VARIABLE nvcc_res OUTPUT_VARIABLE nvcc_out
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ try_run(run_result compile_result ${PROJECT_BINARY_DIR} ${file}
+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${CUDA_INCLUDE_DIRS}"
+ LINK_LIBRARIES ${CUDA_LIBRARIES}
+ RUN_OUTPUT_VARIABLE compute_capabilities)
- if(nvcc_res EQUAL 0)
- string(REPLACE "2.1" "2.1(2.0)" nvcc_out "${nvcc_out}")
- set(CUDA_GPU_DETECT_OUTPUT ${nvcc_out} CACHE INTERNAL "Returned GPU architetures from detect_gpus tool" FORCE)
+ if(run_result EQUAL 0)
+ string(REPLACE "2.1" "2.1(2.0)" compute_capabilities "${compute_capabilities}")
+ set(CUDA_GPU_DETECT_OUTPUT ${compute_capabilities}
+ CACHE INTERNAL "Returned GPU architetures from detect_gpus tool" FORCE)
endif()
endif()
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index e1b22b6..6747be5 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -529,52 +529,54 @@ function(_GTK2_ADD_TARGET _var)
cmake_parse_arguments(_${_var} "" "" "GTK2_DEPENDS;GTK2_OPTIONAL_DEPENDS;OPTIONAL_INCLUDES" ${ARGN})
- if(GTK2_${_var}_FOUND AND NOT TARGET GTK2::${_basename})
- # Do not create the target if dependencies are missing
- foreach(_dep ${_${_var}_GTK2_DEPENDS})
- if(NOT TARGET GTK2::${_dep})
- return()
- endif()
- endforeach()
+ if(GTK2_${_var}_FOUND)
+ if(NOT TARGET GTK2::${_basename})
+ # Do not create the target if dependencies are missing
+ foreach(_dep ${_${_var}_GTK2_DEPENDS})
+ if(NOT TARGET GTK2::${_dep})
+ return()
+ endif()
+ endforeach()
- add_library(GTK2::${_basename} UNKNOWN IMPORTED)
+ add_library(GTK2::${_basename} UNKNOWN IMPORTED)
- set(GTK2_TARGETS ${GTK2_TARGETS} GTK2::${_basename})
- set(GTK2_TARGETS ${GTK2_TARGETS} PARENT_SCOPE)
+ if(GTK2_${_var}_LIBRARY_RELEASE)
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+ set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_RELEASE "${GTK2_${_var}_LIBRARY_RELEASE}" )
+ endif()
- if(GTK2_${_var}_LIBRARY_RELEASE)
- set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_RELEASE "${GTK2_${_var}_LIBRARY_RELEASE}" )
- endif()
+ if(GTK2_${_var}_LIBRARY_DEBUG)
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+ set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_DEBUG "${GTK2_${_var}_LIBRARY_DEBUG}" )
+ endif()
- if(GTK2_${_var}_LIBRARY_DEBUG)
- set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_DEBUG "${GTK2_${_var}_LIBRARY_DEBUG}" )
- endif()
+ if(GTK2_${_var}_INCLUDE_DIR)
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}_INCLUDE_DIR}")
+ endif()
- if(GTK2_${_var}_INCLUDE_DIR)
- set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}_INCLUDE_DIR}")
- endif()
+ if(GTK2_${_var}CONFIG_INCLUDE_DIR AND NOT "x${GTK2_${_var}CONFIG_INCLUDE_DIR}" STREQUAL "x${GTK2_${_var}_INCLUDE_DIR}")
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}")
+ endif()
- if(GTK2_${_var}CONFIG_INCLUDE_DIR AND NOT "x${GTK2_${_var}CONFIG_INCLUDE_DIR}" STREQUAL "x${GTK2_${_var}_INCLUDE_DIR}")
- set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}")
- endif()
+ if(GTK2_DEFINITIONS)
+ set_property(TARGET GTK2::${_basename} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${GTK2_DEFINITIONS}")
+ endif()
- if(GTK2_DEFINITIONS)
- set_property(TARGET GTK2::${_basename} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${GTK2_DEFINITIONS}")
- endif()
+ if(_${_var}_GTK2_DEPENDS)
+ _GTK2_ADD_TARGET_DEPENDS(${_var} ${_${_var}_GTK2_DEPENDS} ${_${_var}_GTK2_OPTIONAL_DEPENDS})
+ endif()
- if(_${_var}_GTK2_DEPENDS)
- _GTK2_ADD_TARGET_DEPENDS(${_var} ${_${_var}_GTK2_DEPENDS} ${_${_var}_GTK2_OPTIONAL_DEPENDS})
+ if(_${_var}_OPTIONAL_INCLUDES)
+ foreach(_D ${_${_var}_OPTIONAL_INCLUDES})
+ if(_D)
+ _GTK2_ADD_TARGET_INCLUDE_DIRS(${_var} ${_D})
+ endif()
+ endforeach()
+ endif()
endif()
- if(_${_var}_OPTIONAL_INCLUDES)
- foreach(_D ${_${_var}_OPTIONAL_INCLUDES})
- if(_D)
- _GTK2_ADD_TARGET_INCLUDE_DIRS(${_var} ${_D})
- endif()
- endforeach()
- endif()
+ set(GTK2_TARGETS ${GTK2_TARGETS} GTK2::${_basename})
+ set(GTK2_TARGETS ${GTK2_TARGETS} PARENT_SCOPE)
if(GTK2_USE_IMPORTED_TARGETS)
set(GTK2_${_var}_LIBRARY GTK2::${_basename} PARENT_SCOPE)
@@ -735,9 +737,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(APPLE)
_GTK2_FIND_LIBRARY (GDK gdk-quartz false true)
endif()
- if(NOT GTK2_GDK_FOUND)
- _GTK2_FIND_LIBRARY (GDK gdk-x11 false true)
- endif()
+ _GTK2_FIND_LIBRARY (GDK gdk-x11 false true)
else()
_GTK2_FIND_LIBRARY (GDK gdk-win32 false true)
endif()
@@ -749,9 +749,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(APPLE)
_GTK2_FIND_LIBRARY (GTK gtk-quartz false true)
endif()
- if(NOT GTK2_GTK_FOUND)
- _GTK2_FIND_LIBRARY (GTK gtk-x11 false true)
- endif()
+ _GTK2_FIND_LIBRARY (GTK gtk-x11 false true)
else()
_GTK2_FIND_LIBRARY (GTK gtk-win32 false true)
endif()
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index c777970..b59b9b3 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -75,16 +75,9 @@ function(_lua_set_version_vars)
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
- list(APPEND _lua_library_names
- lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
- lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
- lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
- lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
- )
endforeach ()
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
- set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
endfunction(_lua_set_version_vars)
@@ -152,6 +145,15 @@ endif ()
unset(_lua_include_subdirs)
unset(_lua_append_versions)
+if (LUA_VERSION_STRING)
+ set(_lua_library_names
+ lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}
+ lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
+ lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
+ lua.${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
+ )
+endif ()
+
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
HINTS
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 842acef..e91a6a9 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -113,9 +113,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
#
# Start out with the generic MPI compiler names, as these are most commonly used.
-set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r)
+set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r mpicc.bat)
set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++
- mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r)
+ mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r
+ mpicxx.bat)
set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r
mpif90 mpif90_r mpf90 mpf90_r
mpif77 mpif77_r mpf77 mpf77_r)
@@ -127,9 +128,9 @@ set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r
mpig77 mpig77_r mpg77 mpg77_r)
# Intel MPI compiler names
-set(_MPI_Intel_C_COMPILER_NAMES mpiicc)
-set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC)
-set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77)
+set(_MPI_Intel_C_COMPILER_NAMES mpiicc mpiicc.bat)
+set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC mpiicpc.bat)
+set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77 mpiifort.bat)
# PGI compiler names
set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc)
@@ -325,6 +326,8 @@ function (interrogate_mpi_compiler lang try_libs)
foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
string(REPLACE "//" "/" IPATH ${IPATH})
+ string(REPLACE "\"" "" IPATH ${IPATH})
+ file(TO_CMAKE_PATH "${IPATH}" IPATH)
list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
endforeach()
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 8b7131b..1958f4b 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -585,10 +585,13 @@ endmacro()
macro(pkg_check_modules _prefix _module0)
_pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN})
# check cached value
- if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
+ if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}")
_pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" ${_no_cmake_path} ${_no_cmake_environment_path} ${_imp_target} "${_prefix}" ${_pkg_modules})
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
+ if (${_prefix}_FOUND)
+ _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}")
+ endif()
elseif (${_prefix}_FOUND AND ${_imp_target})
_pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path)
endif()
diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index 8755d4f..cf2785a 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -149,4 +149,13 @@ macro(__android_compiler_common lang)
if("x${lang}" STREQUAL "xCXX")
__android_stl(CXX)
endif()
+
+ # <ndk>/build/core/definitions.mk appends the sysroot's include directory
+ # explicitly at the end of the command-line include path so that it
+ # precedes the toolchain's builtin include directories. This is
+ # necessary so that Android API-version-specific headers are preferred
+ # over those in the toolchain's `include-fixed` directory (which cannot
+ # possibly match all versions).
+ list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include")
+ list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include")
endmacro()
diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake
index b27015d..a12411c 100644
--- a/Modules/Platform/Android/ndk-stl-c++.cmake
+++ b/Modules/Platform/Android/ndk-stl-c++.cmake
@@ -6,16 +6,15 @@ macro(__android_stl_cxx lang filename)
if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
# r12 and below
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1)
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1)
else()
# r13 and above
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1)
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1)
endif()
- # Add a secondary include directory if it exists.
- __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
-
# Add the library file.
__android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1)
endmacro()
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 0279d1c..0478918 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -439,7 +439,7 @@ macro(QT4_CREATE_TRANSLATION _qm_files)
get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
string(APPEND _pro_includes " \\\n \"${_abs_include}\"")
endforeach()
- file(WRITE ${_ts_pro} "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n")
+ file(GENERATE OUTPUT ${_ts_pro} CONTENT "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n")
endif()
add_custom_command(OUTPUT ${_ts_file}
COMMAND Qt4::lupdate