summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/BasicConfigVersion-AnyNewerVersion.cmake.in5
-rw-r--r--Modules/BasicConfigVersion-ExactVersion.cmake.in5
-rw-r--r--Modules/BasicConfigVersion-SameMajorVersion.cmake.in5
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeFortranInformation.cmake2
-rw-r--r--Modules/CMakeGenericSystem.cmake10
-rw-r--r--Modules/CMakePlatformId.h.in3
-rw-r--r--Modules/CheckCCompilerFlag.cmake4
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake4
-rw-r--r--Modules/Compiler/XL.cmake2
-rw-r--r--Modules/ExternalProject.cmake109
-rw-r--r--Modules/FeatureSummary.cmake4
-rw-r--r--Modules/FindPythonLibs.cmake5
-rw-r--r--Modules/FindQt4.cmake20
-rw-r--r--Modules/FindwxWidgets.cmake4
-rw-r--r--Modules/Platform/Darwin-icc.cmake6
-rw-r--r--Modules/Platform/Darwin.cmake10
-rw-r--r--Modules/Platform/SunOS.cmake2
-rw-r--r--Modules/Platform/Windows-Intel.cmake2
-rw-r--r--Modules/Qt4Macros.cmake40
21 files changed, 173 insertions, 73 deletions
diff --git a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
index cf53db8..9f7f03e 100644
--- a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
+++ b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
@@ -18,6 +18,11 @@ else()
endif()
endif()
+# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+ return()
+endif()
+
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
diff --git a/Modules/BasicConfigVersion-ExactVersion.cmake.in b/Modules/BasicConfigVersion-ExactVersion.cmake.in
index c610baa..63f3f03 100644
--- a/Modules/BasicConfigVersion-ExactVersion.cmake.in
+++ b/Modules/BasicConfigVersion-ExactVersion.cmake.in
@@ -34,6 +34,11 @@ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
endif()
+# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+ return()
+endif()
+
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
index 2317fdb..7bcea88 100644
--- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
+++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
@@ -33,6 +33,11 @@ else()
endif()
+# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+ return()
+endif()
+
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 6b5efba..afac7a4 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -164,7 +164,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
# create a C shared module just copy the shared library rule
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 25abb8c..608b833 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -242,7 +242,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a shared C++ library
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
# create a c++ shared module copy the shared library rule by default
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 76cf34e..2cbd7f8 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -171,7 +171,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a Fortran shared library
IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
# create a Fortran shared module just copy the shared library rule
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index ee8040e..c733969 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -12,7 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
@@ -42,7 +42,7 @@ SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
-SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
+SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
@@ -77,6 +77,8 @@ function(GetDefaultWindowsPrefixBase var)
#
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
set(arch_hint "x64")
+ elseif("${CMAKE_GENERATOR}" MATCHES "ARM")
+ set(arch_hint "ARM")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(arch_hint "x64")
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
@@ -168,6 +170,10 @@ ELSE(CMAKE_HOST_UNIX)
SET(CMAKE_GENERIC_PROGRAM_FILES)
ENDIF(CMAKE_HOST_UNIX)
+# Set a variable which will be used as component name in install() commands
+# where no COMPONENT has been given:
+SET(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "Unspecified")
+
MARK_AS_ADVANCED(
CMAKE_SKIP_RPATH
CMAKE_SKIP_INSTALL_RPATH
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index b69bf63..6341dca 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -97,6 +97,9 @@
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
+# elif defined(_M_ARM)
+# define ARCHITECTURE_ID "ARM"
+
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 1c08c59..90d04ac 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -33,7 +33,9 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
- FAIL_REGEX "option .*not supported" # Intel
+ FAIL_REGEX "option.*not supported" # Intel
+ FAIL_REGEX "invalid argument .*option" # Intel
+ FAIL_REGEX "ignoring option .*argument required" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 6fa69b1..19963ea 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -33,7 +33,9 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
- FAIL_REGEX "option .*not supported" # Intel
+ FAIL_REGEX "option.*not supported" # Intel
+ FAIL_REGEX "invalid argument .*option" # Intel
+ FAIL_REGEX "ignoring option .*argument required" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index d2567d5..d293610 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -47,7 +47,7 @@ macro(__compiler_xl lang)
# files so that we export only the symbols actually provided by the sources.
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>"
- "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
+ "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
)
endif()
endmacro()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 301d1fc..a0a9aea 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -252,12 +252,23 @@ define_property(DIRECTORY PROPERTY "EP_STEP_TARGETS" INHERITED
)
-function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir)
+function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir gitclone_infofile gitclone_stampfile)
file(WRITE ${script_filename}
"if(\"${git_tag}\" STREQUAL \"\")
message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
endif()
+set(run 0)
+
+if(\"${gitclone_infofile}\" IS_NEWER_THAN \"${gitclone_stampfile}\")
+ set(run 1)
+endif()
+
+if(NOT run)
+ message(STATUS \"Avoiding repeated git clone, stamp file is up to date: '${gitclone_stampfile}'\")
+ return()
+endif()
+
execute_process(
COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
RESULT_VARIABLE error_code
@@ -302,6 +313,19 @@ if(error_code)
message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
endif()
+# Complete success, update the script-last-run stamp file:
+#
+execute_process(
+ COMMAND \${CMAKE_COMMAND} -E copy
+ \"${gitclone_infofile}\"
+ \"${gitclone_stampfile}\"
+ WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to copy script-last-run stamp file: '${gitclone_stampfile}'\")
+endif()
+
"
)
@@ -688,8 +712,12 @@ function(_ep_get_build_command name step cmd_var)
endif()
else() # if(cfg_cmd_id STREQUAL "configure")
# Non-CMake project. Guess "make" and "make install" and "make test".
- # But use "$(MAKE)" to get recursive parallel make.
- set(cmd "$(MAKE)")
+ if("${CMAKE_GENERATOR}" MATCHES "Makefiles")
+ # Try to get the parallel arguments
+ set(cmd "$(MAKE)")
+ else()
+ set(cmd "make")
+ endif()
if(step STREQUAL "INSTALL")
set(args install)
endif()
@@ -824,15 +852,23 @@ function(_ep_get_configuration_subdir_suffix suffix_var)
endfunction(_ep_get_configuration_subdir_suffix)
-function(ExternalProject_Add_StepTargets name)
- set(steps ${ARGN})
+function(_ep_get_step_stampfile name step stampfile_var)
+ ExternalProject_Get_Property(${name} stamp_dir)
_ep_get_configuration_subdir_suffix(cfgdir)
- ExternalProject_Get_Property(${name} stamp_dir)
+ set(stampfile "${stamp_dir}${cfgdir}/${name}-${step}")
+
+ set(${stampfile_var} "${stampfile}" PARENT_SCOPE)
+endfunction()
+
+
+function(ExternalProject_Add_StepTargets name)
+ set(steps ${ARGN})
foreach(step ${steps})
+ _ep_get_step_stampfile(${name} ${step} stamp_file)
add_custom_target(${name}-${step}
- DEPENDS ${stamp_dir}${cfgdir}/${name}-${step})
+ DEPENDS ${stamp_file})
# Depend on other external projects (target-level).
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
@@ -845,23 +881,26 @@ endfunction(ExternalProject_Add_StepTargets)
function(ExternalProject_Add_Step name step)
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
- ExternalProject_Get_Property(${name} stamp_dir)
-
_ep_get_configuration_subdir_suffix(cfgdir)
+ set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
+ _ep_get_step_stampfile(${name} ${step} stamp_file)
+
add_custom_command(APPEND
- OUTPUT ${cmf_dir}${cfgdir}/${name}-complete
- DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
+ OUTPUT ${complete_stamp_file}
+ DEPENDS ${stamp_file}
)
+
_ep_parse_arguments(ExternalProject_Add_Step
- ${name} _EP_${step}_ "${ARGN}")
+ ${name} _EP_${step}_ "${ARGN}")
# Steps depending on this step.
get_property(dependers TARGET ${name} PROPERTY _EP_${step}_DEPENDERS)
foreach(depender IN LISTS dependers)
+ _ep_get_step_stampfile(${name} ${depender} depender_stamp_file)
add_custom_command(APPEND
- OUTPUT ${stamp_dir}${cfgdir}/${name}-${depender}
- DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
+ OUTPUT ${depender_stamp_file}
+ DEPENDS ${stamp_file}
)
endforeach()
@@ -871,7 +910,8 @@ function(ExternalProject_Add_Step name step)
# Dependencies on steps.
get_property(dependees TARGET ${name} PROPERTY _EP_${step}_DEPENDEES)
foreach(dependee IN LISTS dependees)
- list(APPEND depends ${stamp_dir}${cfgdir}/${name}-${dependee})
+ _ep_get_step_stampfile(${name} ${dependee} dependee_stamp_file)
+ list(APPEND depends ${dependee_stamp_file})
endforeach()
# The command to run.
@@ -901,10 +941,10 @@ function(ExternalProject_Add_Step name step)
# Run every time?
get_property(always TARGET ${name} PROPERTY _EP_${step}_ALWAYS)
if(always)
- set_property(SOURCE ${stamp_dir}${cfgdir}/${name}-${step} PROPERTY SYMBOLIC 1)
+ set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1)
set(touch)
else()
- set(touch ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-${step})
+ set(touch ${CMAKE_COMMAND} -E touch ${stamp_file})
endif()
# Wrap with log script?
@@ -914,7 +954,7 @@ function(ExternalProject_Add_Step name step)
endif()
add_custom_command(
- OUTPUT ${stamp_dir}${cfgdir}/${name}-${step}
+ OUTPUT ${stamp_file}
COMMENT ${comment}
COMMAND ${command}
COMMAND ${touch}
@@ -1079,9 +1119,15 @@ function(_ep_add_download_command name)
set(git_tag "master")
endif()
+ # For the download step, and the git clone operation, only the repository
+ # should be recorded in a configured RepositoryInfo file. If the repo
+ # changes, the clone script should be run again. But if only the tag
+ # changes, avoid running the clone script again. Let the 'always' running
+ # update step checkout the new tag.
+ #
set(repository ${git_repository})
set(module)
- set(tag ${git_tag})
+ set(tag)
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${stamp_dir}/${name}-gitinfo.txt"
@@ -1097,6 +1143,7 @@ function(_ep_add_download_command name)
#
_ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${src_name} ${work_dir}
+ ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt
)
set(comment "Performing download step (git clone) for '${name}'")
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
@@ -1277,14 +1324,12 @@ endfunction(_ep_add_patch_command)
function(_ep_add_configure_command name)
ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir)
- _ep_get_configuration_subdir_suffix(cfgdir)
-
# Depend on other external projects (file-level).
set(file_deps)
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
foreach(dep IN LISTS deps)
- get_property(dep_stamp_dir TARGET ${dep} PROPERTY _EP_STAMP_DIR)
- list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)
+ _ep_get_step_stampfile(${dep} "done" done_stamp_file)
+ list(APPEND file_deps ${done_stamp_file})
endforeach()
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
@@ -1447,11 +1492,14 @@ function(ExternalProject_Add name)
# Add a custom target for the external project.
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
- add_custom_target(${name} ALL DEPENDS ${cmf_dir}${cfgdir}/${name}-complete)
+ set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
+
+ add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
_ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}")
_ep_set_directories(${name})
- ExternalProject_Get_Property(${name} stamp_dir)
+ _ep_get_step_stampfile(${name} "done" done_stamp_file)
+ _ep_get_step_stampfile(${name} "install" install_stamp_file)
# The 'complete' step depends on all other steps and creates a
# 'done' mark. A dependent external project's 'configure' step
@@ -1462,19 +1510,18 @@ function(ExternalProject_Add name)
# parallel builds. However, the Ninja generator needs to see the entire
# dependency graph, and can cope with custom commands belonging to
# multiple targets, so we add the 'done' mark as an output for Ninja only.
- set(complete_outputs ${cmf_dir}${cfgdir}/${name}-complete)
+ set(complete_outputs ${complete_stamp_file})
if(${CMAKE_GENERATOR} MATCHES "Ninja")
- set(complete_outputs
- ${complete_outputs} ${stamp_dir}${cfgdir}/${name}-done)
+ set(complete_outputs ${complete_outputs} ${done_stamp_file})
endif()
add_custom_command(
OUTPUT ${complete_outputs}
COMMENT "Completed '${name}'"
COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}${cfgdir}
- COMMAND ${CMAKE_COMMAND} -E touch ${cmf_dir}${cfgdir}/${name}-complete
- COMMAND ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-done
- DEPENDS ${stamp_dir}${cfgdir}/${name}-install
+ COMMAND ${CMAKE_COMMAND} -E touch ${complete_stamp_file}
+ COMMAND ${CMAKE_COMMAND} -E touch ${done_stamp_file}
+ DEPENDS ${install_stamp_file}
VERBATIM
)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index cef647e..a5b94d1 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -318,7 +318,7 @@ FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
FOREACH(_purpose ${_info})
- SET(_currentFeatureText "${_currentFeatureText}\n * ${_purpose}")
+ SET(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
ENDFOREACH()
ENDIF(includeThisOne)
@@ -399,7 +399,7 @@ FUNCTION(FEATURE_SUMMARY)
SET(_tmp)
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
IF(_tmp)
- SET(_fullText "${_fullText}\n\n-- ${title_${part}}\n${_tmp}")
+ SET(_fullText "${_fullText}\n-- ${title_${part}}\n${_tmp}\n")
IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
SET(requiredPackagesNotFound TRUE)
ENDIF()
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 591b3e6..478ebcb 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -13,6 +13,11 @@
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
# version numbers that should be taken into account when searching for Python.
# You need to set this variable before calling find_package(PythonLibs).
+#
+# If you'd like to specify the installation of Python to use, you should modify
+# the following cache variables:
+# PYTHON_LIBRARY - path to the python library
+# PYTHON_INCLUDE_DIR - path to where Python.h is found
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 226a4b1..391797e 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1173,10 +1173,22 @@ ELSE( Qt4_FIND_COMPONENTS )
ENDIF( Qt4_FIND_COMPONENTS )
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
- REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
- VERSION_VAR QTVERSION
- )
+if (QT_VERSION_MAJOR GREATER 4)
+ SET(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
+ SET(QT4_FOUND FALSE)
+ IF(Qt4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
+ ELSE(Qt4_FIND_REQUIRED)
+ IF(NOT Qt4_FIND_QUIETLY)
+ MESSAGE( STATUS "${VERSION_MSG}")
+ ENDIF(NOT Qt4_FIND_QUIETLY)
+ ENDIF(Qt4_FIND_REQUIRED)
+else()
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
+ REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
+ VERSION_VAR QTVERSION
+ )
+endif()
#######################################
#
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 0bc6172..865a6c5 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -167,9 +167,9 @@ SET(wxWidgets_CXX_FLAGS "")
# http://www.cmake.org/pipermail/cmake/2008-April/021115.html
# http://www.cmake.org/pipermail/cmake/2008-April/021146.html
#
-IF(APPLE)
+IF(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
-ENDIF(APPLE)
+ENDIF()
# DEPRECATED: This is a patch to support the DEPRECATED use of
# wxWidgets_USE_LIBS.
diff --git a/Modules/Platform/Darwin-icc.cmake b/Modules/Platform/Darwin-icc.cmake
index b62036c..e675c0e 100644
--- a/Modules/Platform/Darwin-icc.cmake
+++ b/Modules/Platform/Darwin-icc.cmake
@@ -84,11 +84,11 @@ ENDIF(XCODE)
SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index f9d37c3..a19bfe7 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -207,11 +207,11 @@ ENDIF()
SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
@@ -223,9 +223,9 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_C_CREATE_MACOSX_FRAMEWORK
- "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
- "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 9f2ee2e..2291c34 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -8,7 +8,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
IF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ELSE(CMAKE_COMPILER_IS_GNUCC)
# Take default rule from CMakeDefaultMakeRuleVariables.cmake.
ENDIF(CMAKE_COMPILER_IS_GNUCC)
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index e7462ba..2a54a98 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -92,7 +92,7 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
- set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /GZ")
+ set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1")
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/DNDEBUG /MD /O2")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/DNDEBUG /MD /Zi /O2")
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index f327125..f867bc5 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -182,23 +182,31 @@ MACRO (QT4_ADD_RESOURCES outfiles )
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
- # parse file for dependencies
- # all files are absolute paths or relative to the location of the qrc file
- FILE(READ "${infile}" _RC_FILE_CONTENTS)
- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+
SET(_RC_DEPENDS)
- FOREACH(_RC_FILE ${_RC_FILES})
- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
- IF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
- ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
- ENDFOREACH(_RC_FILE)
- # Since this cmake macro is doing the dependency scanning for these files,
- # let's make a configured file and add it as a dependency so cmake is run
- # again when dependencies need to be recomputed.
- QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
- CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
+ IF(EXISTS "${infile}")
+ # parse file for dependencies
+ # all files are absolute paths or relative to the location of the qrc file
+ FILE(READ "${infile}" _RC_FILE_CONTENTS)
+ STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+ FOREACH(_RC_FILE ${_RC_FILES})
+ STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+ IF(NOT IS_ABSOLUTE "${_RC_FILE}")
+ SET(_RC_FILE "${rc_path}/${_RC_FILE}")
+ ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
+ SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+ ENDFOREACH(_RC_FILE)
+ # Since this cmake macro is doing the dependency scanning for these files,
+ # let's make a configured file and add it as a dependency so cmake is run
+ # again when dependencies need to be recomputed.
+ QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
+ CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
+ ELSE(EXISTS "${infile}")
+ # The .qrc file does not exist (yet). Let's add a dependency and hope
+ # that it will be generated later
+ SET(out_depends)
+ ENDIF(EXISTS "${infile}")
+
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}