diff options
127 files changed, 1151 insertions, 446 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 9967d00..072d7c5 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -325,6 +325,7 @@ Properties on Tests /prop_test/ATTACHED_FILES /prop_test/COST /prop_test/DEPENDS + /prop_test/DISABLED /prop_test/ENVIRONMENT /prop_test/FAIL_REGULAR_EXPRESSION /prop_test/FIXTURES_CLEANUP diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 063aea1..a11e2f9 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -315,6 +315,9 @@ The following ``cmake -E`` commands are available only on UNIX: ``create_symlink <old> <new>`` Create a symbolic link ``<new>`` naming ``<old>``. +.. note:: + Path to where ``<new>`` symbolic link will be created has to exist beforehand. + Windows-specific Command-Line Tools ----------------------------------- diff --git a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst index 69cdcb7..a064afa 100644 --- a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst +++ b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst @@ -21,3 +21,10 @@ extension is changed). See the :prop_tgt:`PUBLIC_HEADER`, :prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for specifying files meant for ``Headers``, ``PrivateHeaders``, or ``Resources`` directories. + +If the specified location is equal to ``Resources``, the resulting location +will be the same as if the :prop_tgt:`RESOURCE` property had been used. If +the specified location is a sub-folder of ``Resources``, it will be placed +into the respective sub-folder. Note: For iOS Apple uses a flat bundle layout +where no ``Resources`` folder exist. Therefore CMake strips the ``Resources`` +folder name from the specified location. diff --git a/Help/prop_test/DISABLED.rst b/Help/prop_test/DISABLED.rst new file mode 100644 index 0000000..c18ae7f --- /dev/null +++ b/Help/prop_test/DISABLED.rst @@ -0,0 +1,15 @@ +DISABLED +-------- + +If set to true, the test will be skipped and its status will be 'Not Run'. A +DISABLED test will not be counted in the total number of tests and its +completion status will be reported to CDash as 'Disabled'. + +A DISABLED test does not participate in test fixture dependency resolution. +If a DISABLED test has fixture requirements defined in its +:prop_test:`FIXTURES_REQUIRED` property, it will not cause setup or cleanup +tests for those fixtures to be added to the test set. + +If a test with the :prop_test:`FIXTURES_SETUP` property set is DISABLED, the +fixture behavior will be as though that setup test was passing and any test +case requiring that fixture will still run. diff --git a/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst b/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst new file mode 100644 index 0000000..1c6eb2b --- /dev/null +++ b/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst @@ -0,0 +1,5 @@ +cpack-rpm-debuginfo-honor-package-filename +------------------------------------------ + +* The :module:`CPackRPM` module learned to modify debuginfo package name. + See :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. diff --git a/Help/release/dev/ctest-disable-tests.rst b/Help/release/dev/ctest-disable-tests.rst new file mode 100644 index 0000000..9208f0c --- /dev/null +++ b/Help/release/dev/ctest-disable-tests.rst @@ -0,0 +1,5 @@ +ctest-disable-tests +------------------- + +* A :prop_test:`DISABLED` test property was added to mark tests that + are configured but explicitly disabled so they do not run. diff --git a/Help/variable/MSVC.rst b/Help/variable/MSVC.rst index 913ed08..22a087a 100644 --- a/Help/variable/MSVC.rst +++ b/Help/variable/MSVC.rst @@ -4,3 +4,5 @@ MSVC ``True`` when using Microsoft Visual C++. Set to ``true`` when the compiler is some version of Microsoft Visual C++. + +See also the :variable:`MSVC_VERSION` variable. diff --git a/Help/variable/MSVC10.rst b/Help/variable/MSVC10.rst index 98e0493..55c6337 100644 --- a/Help/variable/MSVC10.rst +++ b/Help/variable/MSVC10.rst @@ -1,5 +1,7 @@ MSVC10 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v100`` toolset (``cl`` version 16) or another compiler that simulates it. diff --git a/Help/variable/MSVC11.rst b/Help/variable/MSVC11.rst index 42b7b86..17943dc 100644 --- a/Help/variable/MSVC11.rst +++ b/Help/variable/MSVC11.rst @@ -1,5 +1,7 @@ MSVC11 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v110`` toolset (``cl`` version 17) or another compiler that simulates it. diff --git a/Help/variable/MSVC12.rst b/Help/variable/MSVC12.rst index 0648f35..a524fab 100644 --- a/Help/variable/MSVC12.rst +++ b/Help/variable/MSVC12.rst @@ -1,5 +1,7 @@ MSVC12 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v120`` toolset (``cl`` version 18) or another compiler that simulates it. diff --git a/Help/variable/MSVC14.rst b/Help/variable/MSVC14.rst index f67ebc7..79e0c10 100644 --- a/Help/variable/MSVC14.rst +++ b/Help/variable/MSVC14.rst @@ -1,5 +1,7 @@ MSVC14 ------ -``True`` when using the Microsoft Visual Studio ``v140`` toolset -(``cl`` version 19) or another compiler that simulates it. +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + +``True`` when using the Microsoft Visual Studio ``v140`` or ``v141`` +toolset (``cl`` version 19) or another compiler that simulates it. diff --git a/Help/variable/MSVC60.rst b/Help/variable/MSVC60.rst index 14f09cf..14164bf 100644 --- a/Help/variable/MSVC60.rst +++ b/Help/variable/MSVC60.rst @@ -1,6 +1,8 @@ MSVC60 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 6.0. Set to ``true`` when the compiler is version 6.0 of Microsoft Visual C++. diff --git a/Help/variable/MSVC70.rst b/Help/variable/MSVC70.rst index 76fa96f..ed3b0bb 100644 --- a/Help/variable/MSVC70.rst +++ b/Help/variable/MSVC70.rst @@ -1,6 +1,8 @@ MSVC70 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 7.0. Set to ``true`` when the compiler is version 7.0 of Microsoft Visual C++. diff --git a/Help/variable/MSVC71.rst b/Help/variable/MSVC71.rst index d69d4fc..0237592 100644 --- a/Help/variable/MSVC71.rst +++ b/Help/variable/MSVC71.rst @@ -1,6 +1,8 @@ MSVC71 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 7.1. Set to ``true`` when the compiler is version 7.1 of Microsoft Visual C++. diff --git a/Help/variable/MSVC80.rst b/Help/variable/MSVC80.rst index 0d33e82..1533218 100644 --- a/Help/variable/MSVC80.rst +++ b/Help/variable/MSVC80.rst @@ -1,5 +1,7 @@ MSVC80 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v80`` toolset (``cl`` version 14) or another compiler that simulates it. diff --git a/Help/variable/MSVC90.rst b/Help/variable/MSVC90.rst index 1716e6f..4981ecf 100644 --- a/Help/variable/MSVC90.rst +++ b/Help/variable/MSVC90.rst @@ -1,5 +1,7 @@ MSVC90 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v90`` toolset (``cl`` version 15) or another compiler that simulates it. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 6fce8e2..1abbc01 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -298,7 +298,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_toolset "") endif() if("${lang}" STREQUAL "Swift") - set(id_lang_version "SWIFT_VERSION = 2.3;") + if(CMAKE_Swift_LANGUAGE_VERSION) + set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};") + elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3) + set(id_lang_version "SWIFT_VERSION = 3.0;") + else() + set(id_lang_version "SWIFT_VERSION = 2.3;") + endif() else() set(id_lang_version "") endif() diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index f34ec5d..20dcf1b 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -35,7 +35,15 @@ if(CMAKE_HOST_UNIX) find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) if(CMAKE_UNAME) - exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "AIX") + exec_program(${CMAKE_UNAME} ARGS -v OUTPUT_VARIABLE _CMAKE_HOST_SYSTEM_MAJOR_VERSION) + exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE _CMAKE_HOST_SYSTEM_MINOR_VERSION) + set(CMAKE_HOST_SYSTEM_VERSION "${_CMAKE_HOST_SYSTEM_MAJOR_VERSION}.${_CMAKE_HOST_SYSTEM_MINOR_VERSION}") + unset(_CMAKE_HOST_SYSTEM_MAJOR_VERSION) + unset(_CMAKE_HOST_SYSTEM_MINOR_VERSION) + else() + exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) + endif() if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin|^GNU$") exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 10f2cfb..7ddd297 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -17,11 +17,26 @@ set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) -string(STRIP "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CMAKE_RC_FLAGS_INIT) +set(CMAKE_RC_FLAGS_INIT "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}") + +foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + string(STRIP "${CMAKE_RC_FLAGS${c}_INIT}" CMAKE_RC_FLAGS${c}_INIT) +endforeach() set (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_INIT}" CACHE STRING "Flags for Windows Resource Compiler.") +if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + set (CMAKE_RC_FLAGS_DEBUG "${CMAKE_RC_FLAGS_DEBUG_INIT}" CACHE STRING + "Flags for Windows Resource Compiler during debug builds.") + set (CMAKE_RC_FLAGS_MINSIZEREL "${CMAKE_RC_FLAGS_MINSIZEREL_INIT}" CACHE STRING + "Flags for Windows Resource Compiler during release builds for minimum size.") + set (CMAKE_RC_FLAGS_RELEASE "${CMAKE_RC_FLAGS_RELEASE_INIT}" CACHE STRING + "Flags for Windows Resource Compiler during release builds.") + set (CMAKE_RC_FLAGS_RELWITHDEBINFO "${CMAKE_RC_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING + "Flags for Windows Resource Compiler during release builds with debug info.") +endif() + # These are the only types of flags that should be passed to the rc # command, if COMPILE_FLAGS is used on a target this will be used # to filter out any other flags diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 2e69195..cc54032 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -721,14 +721,6 @@ # Debuginfo packages contain debug symbols and sources for debugging packaged # binaries. # -# .. note:: -# -# Currently multiple debuginfo packages are generated if component based -# packaging is used - one debuginfo package per component. This duplicates -# sources if multiple binaries are using them. This is a side effect of -# how CPackRPM currently generates component packages and will be addressed -# in later versions of the generator. -# # Debuginfo RPM packaging has it's own set of variables: # # .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE @@ -825,6 +817,30 @@ # is set then :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is automatically set to # ``ON`` when :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` is set. # +# .. variable:: CPACK_RPM_DEBUGINFO_FILE_NAME +# CPACK_RPM_<component>_DEBUGINFO_FILE_NAME +# +# Debuginfo package file name. +# +# * Mandatory : NO +# * Default : rpmbuild tool generated package file name +# +# Alternatively provided debuginfo package file name must end with ``.rpm`` +# suffix and should differ from file names of other generated packages. +# +# Variable may contain ``@cpack_component@`` placeholder which will be +# replaced by component name if component packaging is enabled otherwise it +# deletes the placeholder. +# +# Setting the variable to ``RPM-DEFAULT`` may be used to explicitly set +# filename generation to default. +# +# .. note:: +# +# :variable:`CPACK_RPM_FILE_NAME` also supports rpmbuild tool generated package +# file name - disabled by default but can be enabled by setting the variable to +# ``RPM-DEFAULT``. +# # Packaging of sources (SRPM) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ # @@ -1482,8 +1498,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) string(LENGTH "${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}" debuginfo_dir_len) if(source_dir_len_ LESS debuginfo_dir_len) message(FATAL_ERROR "CPackRPM: source dir path '${source_dir_}' is" - " longer than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!" - " Source dir path must be shorter than debuginfo sources dir path." + " shorter than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!" + " Source dir path must be longer than debuginfo sources dir path." " Set CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX variable to a shorter value" " or make source dir path longer." " Required for debuginfo packaging. See documentation of" @@ -2648,11 +2664,27 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT unset(expected_filenames_) unset(filenames_) if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") - string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" efn_) - list(APPEND expected_filenames_ "${efn_}") + list(APPEND expected_filenames_ + "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm") list(APPEND filenames_ "${CPACK_RPM_FILE_NAME}") endif() + if(CPACK_RPM_DEBUGINFO_PACKAGE) + cpack_rpm_variable_fallback("CPACK_RPM_DEBUGINFO_FILE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_DEBUGINFO_FILE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DEBUGINFO_FILE_NAME" + "CPACK_RPM_DEBUGINFO_FILE_NAME") + + if(CPACK_RPM_DEBUGINFO_FILE_NAME AND + NOT CPACK_RPM_DEBUGINFO_FILE_NAME STREQUAL "RPM-DEFAULT") + list(APPEND expected_filenames_ + "${CPACK_RPM_PACKAGE_NAME}-debuginfo-${CPACK_PACKAGE_VERSION}.*\\.rpm") + string(REPLACE "@cpack_component@" "${CPACK_RPM_PACKAGE_COMPONENT}" + CPACK_RPM_DEBUGINFO_FILE_NAME "${CPACK_RPM_DEBUGINFO_FILE_NAME}") + list(APPEND filenames_ "${CPACK_RPM_DEBUGINFO_FILE_NAME}") + endif() + endif() + # check if other files have to be renamed file(GLOB rename_files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.rpm_name") if(rename_files_) diff --git a/Modules/Compiler/SDCC-C-DetermineCompiler.cmake b/Modules/Compiler/SDCC-C-DetermineCompiler.cmake index 1d7dd78..4c70c5e 100644 --- a/Modules/Compiler/SDCC-C-DetermineCompiler.cmake +++ b/Modules/Compiler/SDCC-C-DetermineCompiler.cmake @@ -1,10 +1,16 @@ # sdcc, the small devices C compiler for embedded systems, # http://sdcc.sourceforge.net */ -set(_compiler_id_pp_test "defined(SDCC)") +set(_compiler_id_pp_test "defined(__SDCC_VERSION_MAJOR) || defined(SDCC)") set(_compiler_id_version_compute " +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR @MACRO_DEC@(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR @MACRO_DEC@(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH @MACRO_DEC@(__SDCC_VERSION_PATCH) +# else /* SDCC = VRP */ # define COMPILER_VERSION_MAJOR @MACRO_DEC@(SDCC/100) # define COMPILER_VERSION_MINOR @MACRO_DEC@(SDCC/10 % 10) -# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10)") +# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10) +# endif") diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 2886381..2dd08e1 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -445,7 +445,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) set(_boost_COMPILER "-vc71") elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck! set(_boost_COMPILER "-vc7") # yes, this is correct - else() # MSVC60 Good luck! + else() # VS 6.0 Good luck! set(_boost_COMPILER "-vc6") # yes, this is correct endif() elseif (BORLAND) @@ -746,6 +746,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_CHRONO_DEPENDENCIES system) set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time) set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time) set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time) set(_Boost_FILESYSTEM_DEPENDENCIES system) set(_Boost_IOSTREAMS_DEPENDENCIES regex) diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 2eca5f9..b87b9f3 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -105,7 +105,7 @@ # * 14236: Detect gthread library # Detect pangocairo on windows # Detect pangocairo with gtk module instead of with gtkmm -# * 14259: Use vc100 libraries with MSVC11 +# * 14259: Use vc100 libraries with VS 11 # * 14260: Export a GTK2_DEFINITIONS variable to set /vd2 when appropriate # (i.e. MSVC) # * Use the optimized/debug syntax for _LIBRARY and _LIBRARIES variables when @@ -354,13 +354,13 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) if(_expand_vc AND MSVC) # Add vc80/vc90/vc100 midfixes - if(MSVC80) + if(MSVC_VERSION EQUAL 1400) set(_library ${_library}-vc80) - elseif(MSVC90) + elseif(MSVC_VERSION EQUAL 1500) set(_library ${_library}-vc90) - elseif(MSVC10) + elseif(MSVC_VERSION EQUAL 1600) set(_library ${_library}-vc100) - elseif(MSVC11) + elseif(MSVC_VERSION EQUAL 1700) # Up to gtkmm-win 2.22.0-2 there are no vc110 libraries but vc100 can be used set(_library ${_library}-vc100) endif() diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index b0e9b47..a9f8d35 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -207,19 +207,19 @@ set(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_ if(WIN32) set( _RUBY_MSVC_RUNTIME "" ) - if( MSVC60 ) + if( MSVC_VERSION EQUAL 1200 ) set( _RUBY_MSVC_RUNTIME "60" ) endif() - if( MSVC70 ) + if( MSVC_VERSION EQUAL 1300 ) set( _RUBY_MSVC_RUNTIME "70" ) endif() - if( MSVC71 ) + if( MSVC_VERSION EQUAL 1310 ) set( _RUBY_MSVC_RUNTIME "71" ) endif() - if( MSVC80 ) + if( MSVC_VERSION EQUAL 1400 ) set( _RUBY_MSVC_RUNTIME "80" ) endif() - if( MSVC90 ) + if( MSVC_VERSION EQUAL 1500 ) set( _RUBY_MSVC_RUNTIME "90" ) endif() diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 77091f4..d30d35f 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -498,15 +498,17 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") set(_WX_TOOL gcc) elseif(MSVC) set(_WX_TOOL vc) - if(MSVC14) + if(MSVC_VERSION EQUAL 1910) + set(_WX_TOOLVER 141) + elseif(MSVC_VERSION EQUAL 1900) set(_WX_TOOLVER 140) - elseif(MSVC12) + elseif(MSVC_VERSION EQUAL 1800) set(_WX_TOOLVER 120) - elseif(MSVC11) + elseif(MSVC_VERSION EQUAL 1700) set(_WX_TOOLVER 110) - elseif(MSVC10) + elseif(MSVC_VERSION EQUAL 1600) set(_WX_TOOLVER 100) - elseif(MSVC90) + elseif(MSVC_VERSION EQUAL 1500) set(_WX_TOOLVER 90) endif() if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 7975bd4..a3478a3 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -69,147 +69,189 @@ if(MSVC) get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH) get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE) - if(MSVC70) + if(MSVC_VERSION EQUAL 1300) set(__install__libs "${SYSTEMROOT}/system32/msvcp70.dll" "${SYSTEMROOT}/system32/msvcr70.dll" ) endif() - if(MSVC71) + if(MSVC_VERSION EQUAL 1310) set(__install__libs "${SYSTEMROOT}/system32/msvcp71.dll" "${SYSTEMROOT}/system32/msvcr71.dll" ) endif() - if(MSVC80) + if(MSVC_VERSION EQUAL 1400) # Find the runtime library redistribution directory. get_filename_component(msvc_install_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE) - find_path(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest + if(DEFINED MSVC80_REDIST_DIR AND EXISTS "${MSVC80_REDIST_DIR}") + set(MSVC_REDIST_DIR "${MSVC80_REDIST_DIR}") # use old cache entry + endif() + find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest PATHS "${msvc_install_dir}/../../VC/redist" "${base_dir}/VC/redist" ) - mark_as_advanced(MSVC80_REDIST_DIR) - set(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT") + mark_as_advanced(MSVC_REDIST_DIR) + set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs - "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest" - "${MSVC80_CRT_DIR}/msvcm80.dll" - "${MSVC80_CRT_DIR}/msvcp80.dll" - "${MSVC80_CRT_DIR}/msvcr80.dll" + "${MSVC_CRT_DIR}/Microsoft.VC80.CRT.manifest" + "${MSVC_CRT_DIR}/msvcm80.dll" + "${MSVC_CRT_DIR}/msvcp80.dll" + "${MSVC_CRT_DIR}/msvcr80.dll" ) else() set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC80_CRT_DIR - "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT") + set(MSVC_CRT_DIR + "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT") set(__install__libs ${__install__libs} - "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest" - "${MSVC80_CRT_DIR}/msvcm80d.dll" - "${MSVC80_CRT_DIR}/msvcp80d.dll" - "${MSVC80_CRT_DIR}/msvcr80d.dll" + "${MSVC_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest" + "${MSVC_CRT_DIR}/msvcm80d.dll" + "${MSVC_CRT_DIR}/msvcp80d.dll" + "${MSVC_CRT_DIR}/msvcr80d.dll" ) endif() endif() - if(MSVC90) + if(MSVC_VERSION EQUAL 1500) # Find the runtime library redistribution directory. get_filename_component(msvc_install_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE) get_filename_component(msvc_express_install_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE) - find_path(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest + if(DEFINED MSVC90_REDIST_DIR AND EXISTS "${MSVC90_REDIST_DIR}") + set(MSVC_REDIST_DIR "${MSVC90_REDIST_DIR}") # use old cache entry + endif() + find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest PATHS "${msvc_install_dir}/../../VC/redist" "${msvc_express_install_dir}/../../VC/redist" "${base_dir}/VC/redist" ) - mark_as_advanced(MSVC90_REDIST_DIR) - set(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT") + mark_as_advanced(MSVC_REDIST_DIR) + set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs - "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest" - "${MSVC90_CRT_DIR}/msvcm90.dll" - "${MSVC90_CRT_DIR}/msvcp90.dll" - "${MSVC90_CRT_DIR}/msvcr90.dll" + "${MSVC_CRT_DIR}/Microsoft.VC90.CRT.manifest" + "${MSVC_CRT_DIR}/msvcm90.dll" + "${MSVC_CRT_DIR}/msvcp90.dll" + "${MSVC_CRT_DIR}/msvcr90.dll" ) else() set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC90_CRT_DIR - "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT") + set(MSVC_CRT_DIR + "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT") set(__install__libs ${__install__libs} - "${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest" - "${MSVC90_CRT_DIR}/msvcm90d.dll" - "${MSVC90_CRT_DIR}/msvcp90d.dll" - "${MSVC90_CRT_DIR}/msvcr90d.dll" + "${MSVC_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest" + "${MSVC_CRT_DIR}/msvcm90d.dll" + "${MSVC_CRT_DIR}/msvcp90d.dll" + "${MSVC_CRT_DIR}/msvcr90d.dll" ) endif() endif() - macro(MSVCRT_FILES_FOR_VERSION version) - set(v "${version}") + if(MSVC_VERSION EQUAL 1910) + set(_MSVCRT_DLL_VERSION 140) + set(_MSVCRT_IDE_VERSION 15) + elseif(MSVC_VERSION EQUAL 1900) + set(_MSVCRT_DLL_VERSION 140) + set(_MSVCRT_IDE_VERSION 14) + elseif(MSVC_VERSION EQUAL 1800) + set(_MSVCRT_DLL_VERSION 120) + set(_MSVCRT_IDE_VERSION 12) + elseif(MSVC_VERSION EQUAL 1700) + set(_MSVCRT_DLL_VERSION 110) + set(_MSVCRT_IDE_VERSION 11) + elseif(MSVC_VERSION EQUAL 1600) + set(_MSVCRT_DLL_VERSION 100) + set(_MSVCRT_IDE_VERSION 10) + else() + set(_MSVCRT_DLL_VERSION "") + set(_MSVCRT_IDE_VERSION "") + endif() + + if(_MSVCRT_DLL_VERSION) + set(v "${_MSVCRT_DLL_VERSION}") + set(vs "${_MSVCRT_IDE_VERSION}") # Find the runtime library redistribution directory. - get_filename_component(msvc_install_dir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE) - set(programfilesx86 "ProgramFiles(x86)") - find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT - PATHS - "${msvc_install_dir}/../../VC/redist" + if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}") + set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry + endif() + if(NOT vs VERSION_LESS 15) + set(_vs_redist_paths "") + cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query + if(IS_DIRECTORY "${_vs_dir}") + file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*") + endif() + unset(_vs_dir) + else() + get_filename_component(_vs_dir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE) + set(programfilesx86 "ProgramFiles(x86)") + set(_vs_redist_paths + "${_vs_dir}/../../VC/redist" "${base_dir}/VC/redist" - "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist" - "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist" - ) - mark_as_advanced(MSVC${v}_REDIST_DIR) - set(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT") + "$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist" + "$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist" + ) + unset(_vs_dir) + unset(programfilesx86) + endif() + find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT PATHS ${_vs_redist_paths}) + unset(_vs_redist_paths) + mark_as_advanced(MSVC_REDIST_DIR) + set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT") if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs - "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll" + "${MSVC_CRT_DIR}/msvcp${v}.dll" ) - if(NOT v VERSION_LESS 14) + if(NOT vs VERSION_LESS 14) list(APPEND __install__libs - "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll" - "${MSVC${v}_CRT_DIR}/concrt${v}0.dll" + "${MSVC_CRT_DIR}/vcruntime${v}.dll" + "${MSVC_CRT_DIR}/concrt${v}.dll" ) else() - list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll") endif() else() set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC${v}_CRT_DIR - "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT") + set(MSVC_CRT_DIR + "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugCRT") set(__install__libs ${__install__libs} - "${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll" + "${MSVC_CRT_DIR}/msvcp${v}d.dll" ) - if(NOT v VERSION_LESS 14) + if(NOT vs VERSION_LESS 14) list(APPEND __install__libs - "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll" - "${MSVC${v}_CRT_DIR}/concrt${v}0d.dll" + "${MSVC_CRT_DIR}/vcruntime${v}d.dll" + "${MSVC_CRT_DIR}/concrt${v}d.dll" ) else() - list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll") endif() endif() - if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14) + if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14) # Find the Windows Kits directory. get_filename_component(windows_kits_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE) @@ -232,225 +274,232 @@ if(MSVC) list(APPEND __install__libs ${__ucrt_dlls}) endif() endif() - endmacro() - - if(MSVC10) - MSVCRT_FILES_FOR_VERSION(10) - endif() - - if(MSVC11) - MSVCRT_FILES_FOR_VERSION(11) - endif() - - if(MSVC12) - MSVCRT_FILES_FOR_VERSION(12) - endif() - - if(MSVC14) - MSVCRT_FILES_FOR_VERSION(14) endif() if(CMAKE_INSTALL_MFC_LIBRARIES) - if(MSVC70) + if(MSVC_VERSION EQUAL 1300) set(__install__libs ${__install__libs} "${SYSTEMROOT}/system32/mfc70.dll" ) endif() - if(MSVC71) + if(MSVC_VERSION EQUAL 1310) set(__install__libs ${__install__libs} "${SYSTEMROOT}/system32/mfc71.dll" ) endif() - if(MSVC80) + if(MSVC_VERSION EQUAL 1400) if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC80_MFC_DIR - "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC") + set(MSVC_MFC_DIR + "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC") set(__install__libs ${__install__libs} - "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest" - "${MSVC80_MFC_DIR}/mfc80d.dll" - "${MSVC80_MFC_DIR}/mfc80ud.dll" - "${MSVC80_MFC_DIR}/mfcm80d.dll" - "${MSVC80_MFC_DIR}/mfcm80ud.dll" + "${MSVC_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest" + "${MSVC_MFC_DIR}/mfc80d.dll" + "${MSVC_MFC_DIR}/mfc80ud.dll" + "${MSVC_MFC_DIR}/mfcm80d.dll" + "${MSVC_MFC_DIR}/mfcm80ud.dll" ) endif() - set(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC") + set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs ${__install__libs} - "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest" - "${MSVC80_MFC_DIR}/mfc80.dll" - "${MSVC80_MFC_DIR}/mfc80u.dll" - "${MSVC80_MFC_DIR}/mfcm80.dll" - "${MSVC80_MFC_DIR}/mfcm80u.dll" + "${MSVC_MFC_DIR}/Microsoft.VC80.MFC.manifest" + "${MSVC_MFC_DIR}/mfc80.dll" + "${MSVC_MFC_DIR}/mfc80u.dll" + "${MSVC_MFC_DIR}/mfcm80.dll" + "${MSVC_MFC_DIR}/mfcm80u.dll" ) endif() # include the language dll's for vs8 as well as the actuall dll's - set(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC") + 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. set(__install__libs ${__install__libs} - "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest" - "${MSVC80_MFCLOC_DIR}/mfc80chs.dll" - "${MSVC80_MFCLOC_DIR}/mfc80cht.dll" - "${MSVC80_MFCLOC_DIR}/mfc80enu.dll" - "${MSVC80_MFCLOC_DIR}/mfc80esp.dll" - "${MSVC80_MFCLOC_DIR}/mfc80deu.dll" - "${MSVC80_MFCLOC_DIR}/mfc80fra.dll" - "${MSVC80_MFCLOC_DIR}/mfc80ita.dll" - "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll" - "${MSVC80_MFCLOC_DIR}/mfc80kor.dll" + "${MSVC_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest" + "${MSVC_MFCLOC_DIR}/mfc80chs.dll" + "${MSVC_MFCLOC_DIR}/mfc80cht.dll" + "${MSVC_MFCLOC_DIR}/mfc80enu.dll" + "${MSVC_MFCLOC_DIR}/mfc80esp.dll" + "${MSVC_MFCLOC_DIR}/mfc80deu.dll" + "${MSVC_MFCLOC_DIR}/mfc80fra.dll" + "${MSVC_MFCLOC_DIR}/mfc80ita.dll" + "${MSVC_MFCLOC_DIR}/mfc80jpn.dll" + "${MSVC_MFCLOC_DIR}/mfc80kor.dll" ) endif() - if(MSVC90) + if(MSVC_VERSION EQUAL 1500) if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC90_MFC_DIR - "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC") + set(MSVC_MFC_DIR + "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC") set(__install__libs ${__install__libs} - "${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest" - "${MSVC90_MFC_DIR}/mfc90d.dll" - "${MSVC90_MFC_DIR}/mfc90ud.dll" - "${MSVC90_MFC_DIR}/mfcm90d.dll" - "${MSVC90_MFC_DIR}/mfcm90ud.dll" + "${MSVC_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest" + "${MSVC_MFC_DIR}/mfc90d.dll" + "${MSVC_MFC_DIR}/mfc90ud.dll" + "${MSVC_MFC_DIR}/mfcm90d.dll" + "${MSVC_MFC_DIR}/mfcm90ud.dll" ) endif() - set(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC") + set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC") # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs ${__install__libs} - "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest" - "${MSVC90_MFC_DIR}/mfc90.dll" - "${MSVC90_MFC_DIR}/mfc90u.dll" - "${MSVC90_MFC_DIR}/mfcm90.dll" - "${MSVC90_MFC_DIR}/mfcm90u.dll" + "${MSVC_MFC_DIR}/Microsoft.VC90.MFC.manifest" + "${MSVC_MFC_DIR}/mfc90.dll" + "${MSVC_MFC_DIR}/mfc90u.dll" + "${MSVC_MFC_DIR}/mfcm90.dll" + "${MSVC_MFC_DIR}/mfcm90u.dll" ) endif() # include the language dll's for vs9 as well as the actuall dll's - set(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC") + 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. set(__install__libs ${__install__libs} - "${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest" - "${MSVC90_MFCLOC_DIR}/mfc90chs.dll" - "${MSVC90_MFCLOC_DIR}/mfc90cht.dll" - "${MSVC90_MFCLOC_DIR}/mfc90enu.dll" - "${MSVC90_MFCLOC_DIR}/mfc90esp.dll" - "${MSVC90_MFCLOC_DIR}/mfc90deu.dll" - "${MSVC90_MFCLOC_DIR}/mfc90fra.dll" - "${MSVC90_MFCLOC_DIR}/mfc90ita.dll" - "${MSVC90_MFCLOC_DIR}/mfc90jpn.dll" - "${MSVC90_MFCLOC_DIR}/mfc90kor.dll" + "${MSVC_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest" + "${MSVC_MFCLOC_DIR}/mfc90chs.dll" + "${MSVC_MFCLOC_DIR}/mfc90cht.dll" + "${MSVC_MFCLOC_DIR}/mfc90enu.dll" + "${MSVC_MFCLOC_DIR}/mfc90esp.dll" + "${MSVC_MFCLOC_DIR}/mfc90deu.dll" + "${MSVC_MFCLOC_DIR}/mfc90fra.dll" + "${MSVC_MFCLOC_DIR}/mfc90ita.dll" + "${MSVC_MFCLOC_DIR}/mfc90jpn.dll" + "${MSVC_MFCLOC_DIR}/mfc90kor.dll" ) endif() - macro(MFC_FILES_FOR_VERSION version) - set(v "${version}") + if(MSVC_VERSION EQUAL 1910) + set(_MFC_DLL_VERSION 140) + set(_MFC_IDE_VERSION 15) + elseif(MSVC_VERSION EQUAL 1900) + set(_MFC_DLL_VERSION 140) + set(_MFC_IDE_VERSION 14) + elseif(MSVC_VERSION EQUAL 1800) + set(_MFC_DLL_VERSION 120) + set(_MFC_IDE_VERSION 12) + elseif(MSVC_VERSION EQUAL 1700) + set(_MFC_DLL_VERSION 110) + set(_MFC_IDE_VERSION 11) + elseif(MSVC_VERSION EQUAL 1600) + set(_MFC_DLL_VERSION 100) + set(_MFC_IDE_VERSION 10) + else() + set(_MFC_DLL_VERSION "") + set(_MFC_IDE_VERSION "") + endif() + + if(_MFC_DLL_VERSION) + set(v "${_MFC_DLL_VERSION}") + set(vs "${_MFC_IDE_VERSION}") + + # Starting with VS 15 the MFC DLLs may be in a different directory. + if (NOT vs VERSION_LESS 15) + file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*") + find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC + PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH) + mark_as_advanced(MSVC_REDIST_MFC_DIR) + unset(_MSVC_REDIST_DIRS) + else() + set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}") + endif() # Multi-Byte Character Set versions of MFC are available as optional # addon since Visual Studio 12. So for version 12 or higher, check # whether they are available and exclude them if they are not. if(CMAKE_INSTALL_DEBUG_LIBRARIES) - set(MSVC${v}_MFC_DIR - "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC") + set(MSVC_MFC_DIR + "${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugMFC") set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0ud.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0ud.dll" + "${MSVC_MFC_DIR}/mfc${v}ud.dll" + "${MSVC_MFC_DIR}/mfcm${v}ud.dll" ) - if("${v}" LESS 12 OR EXISTS "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll") + if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll") set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll" + "${MSVC_MFC_DIR}/mfc${v}d.dll" + "${MSVC_MFC_DIR}/mfcm${v}d.dll" ) endif() endif() - set(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC") + set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC") if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0u.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0u.dll" + "${MSVC_MFC_DIR}/mfc${v}u.dll" + "${MSVC_MFC_DIR}/mfcm${v}u.dll" ) - if("${v}" LESS 12 OR EXISTS "${MSVC${v}_MFC_DIR}/mfc${v}0.dll") + if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll") set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0.dll" + "${MSVC_MFC_DIR}/mfc${v}.dll" + "${MSVC_MFC_DIR}/mfcm${v}.dll" ) endif() endif() # include the language dll's as well as the actuall dll's - set(MSVC${v}_MFCLOC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC") + set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFCLOC") set(__install__libs ${__install__libs} - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0chs.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0cht.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0deu.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0enu.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0esn.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0fra.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0ita.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0jpn.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0kor.dll" - "${MSVC${v}_MFCLOC_DIR}/mfc${v}0rus.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}deu.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}enu.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}esn.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}fra.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}ita.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}kor.dll" + "${MSVC_MFCLOC_DIR}/mfc${v}rus.dll" ) - endmacro() - - if(MSVC10) - MFC_FILES_FOR_VERSION(10) - endif() - - if(MSVC11) - MFC_FILES_FOR_VERSION(11) - endif() - - if(MSVC12) - MFC_FILES_FOR_VERSION(12) - endif() - - if(MSVC14) - MFC_FILES_FOR_VERSION(14) endif() endif() # MSVC 8 was the first version with OpenMP # Furthermore, there is no debug version of this if(CMAKE_INSTALL_OPENMP_LIBRARIES) - macro(OPENMP_FILES_FOR_VERSION version_a version_b) - set(va "${version_a}") - set(vb "${version_b}") - set(MSVC${va}_OPENMP_DIR "${MSVC${va}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vb}.OPENMP") + if(MSVC_VERSION EQUAL 1910) + set(_MSOMP_DLL_VERSION 140) + set(_MSOMP_IDE_VERSION 15) + elseif(MSVC_VERSION EQUAL 1900) + set(_MSOMP_DLL_VERSION 140) + set(_MSOMP_IDE_VERSION 14) + elseif(MSVC_VERSION EQUAL 1800) + set(_MSOMP_DLL_VERSION 120) + set(_MSOMP_IDE_VERSION 12) + elseif(MSVC_VERSION EQUAL 1700) + set(_MSOMP_DLL_VERSION 110) + set(_MSOMP_IDE_VERSION 11) + elseif(MSVC_VERSION EQUAL 1600) + set(_MSOMP_DLL_VERSION 100) + set(_MSOMP_IDE_VERSION 10) + elseif(MSVC_VERSION EQUAL 1500) + set(_MSOMP_DLL_VERSION 90) + set(_MSOMP_IDE_VERSION 9) + elseif(MSVC_VERSION EQUAL 1400) + set(_MSOMP_DLL_VERSION 80) + set(_MSOMP_IDE_VERSION 8) + else() + set(_MSOMP_DLL_VERSION "") + set(_MSOMP_IDE_VERSION "") + endif() + + if(_MSOMP_DLL_VERSION) + set(v "${_MSOMP_DLL_VERSION}") + set(vs "${_MSOMP_IDE_VERSION}") + set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.OPENMP") if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs ${__install__libs} - "${MSVC${va}_OPENMP_DIR}/vcomp${vb}.dll") + "${MSVC_OPENMP_DIR}/vcomp${v}.dll") endif() - endmacro() - - if(MSVC80) - OPENMP_FILES_FOR_VERSION(80 80) - endif() - if(MSVC90) - OPENMP_FILES_FOR_VERSION(90 90) - endif() - if(MSVC10) - OPENMP_FILES_FOR_VERSION(10 100) - endif() - if(MSVC11) - OPENMP_FILES_FOR_VERSION(11 110) - endif() - if(MSVC12) - OPENMP_FILES_FOR_VERSION(12 120) - endif() - if(MSVC14) - OPENMP_FILES_FOR_VERSION(14 140) endif() endif() diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index ffa6277..4f6aa75 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -30,19 +30,20 @@ ;-------------------------------- ;General !ifdef INNER - OutFile "$%TEMP%\tempinstaller.exe" + OutFile "${TEMPINSTALLER}.exe" SetCompress off ; for speed !else ; Call makensis again, defining INNER. This writes an installer for us which, when ; it is invoked, will just write the uninstaller to some location, and then exit. ; Be sure to substitute the name of this script here. - - !system "$\"${NSISDIR}\makensis$\" /DINNER $\"@CPACK_TEMPORARY_DIRECTORY@/../project.nsi$\"" = 0 + !tempfile TEMPINSTALLER + !tempfile TEMPUNINSTALLER + !system "$\"${NSISDIR}\makensis$\" /DTEMPINSTALLER=$\"${TEMPINSTALLER}$\" /DTEMPUNINSTALLER=$\"${TEMPUNINSTALLER}$\" /DINNER $\"@CPACK_TEMPORARY_DIRECTORY@/../project.nsi$\"" = 0 ; So now run that installer we just created as %TEMP%\tempinstaller.exe. Since it ; calls quit the return value isn't zero. - !system "$%TEMP%\tempinstaller.exe" = 2 + !system "$\"${TEMPINSTALLER}.exe$\"" = 2 ; That will have written an uninstaller binary for us. Now we sign it with your ; favourite code signing tool. @@ -52,7 +53,7 @@ !include "${INCEXIST}" !delfile "${INCEXIST}" !ifdef HAVE_SIGN_UNINST - !system '"@CPACK_NSIS_SIGN_UNINSTALLER@" "$%TEMP%\Uninstall.exe"' = 0 + !system '"@CPACK_NSIS_SIGN_UNINSTALLER@" "${TEMPUNINSTALLER}.exe"' = 0 !endif ; Good. Now we can carry on writing the real installer. @@ -674,7 +675,7 @@ Section "-Core installation" ;Create uninstaller !ifndef INNER ; this packages the signed uninstaller - File "$%TEMP%\Uninstall.exe" + File "/oname=Uninstall.exe" "${TEMPUNINSTALLER}.exe" !endif Push "DisplayName" Push "@CPACK_NSIS_DISPLAY_NAME@" @@ -938,7 +939,7 @@ Function .onInit ; the installer. This is better than processing a command line option as it means ; this entire code path is not present in the final (real) installer. - WriteUninstaller "$%TEMP%\Uninstall.exe" + WriteUninstaller "${TEMPUNINSTALLER}.exe" Quit ; just bail out quickly when running the "inner" installer !endif StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 0e90d35..e4aca6e 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -78,7 +78,9 @@ if(NOT MSVC_VERSION) set(MSVC90) set(CMAKE_COMPILER_2005) set(CMAKE_COMPILER_SUPPORTS_PDBTYPE) - if(NOT "${_compiler_version}" VERSION_LESS 19) + if(NOT "${_compiler_version}" VERSION_LESS 20) + # We no longer provide per-version variables. Use MSVC_VERSION instead. + elseif(NOT "${_compiler_version}" VERSION_LESS 19) set(MSVC14 1) elseif(NOT "${_compiler_version}" VERSION_LESS 18) set(MSVC12 1) @@ -308,6 +310,9 @@ macro(__windows_compiler_msvc lang) if(NOT CMAKE_RC_FLAGS_INIT) string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}") endif() + if(NOT CMAKE_RC_FLAGS_DEBUG_INIT) + string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " /D_DEBUG") + endif() enable_language(RC) set(CMAKE_NINJA_CMCLDEPS_RC 1) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 48f10be..58c9390 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 8) -set(CMake_VERSION_PATCH 20170322) +set(CMake_VERSION_PATCH 20170331) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx index a471d26..3158343 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx @@ -9,9 +9,7 @@ #include <cmSystemTools.h> #include <cmUuid.h> -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> +#include "cm_sys_stat.h" cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger, std::string const& filename, diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index 92475d9..bd22cec 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -15,7 +15,7 @@ // system tools because it is not implemented robustly enough to move // files across directories. #ifdef _WIN32 -#include <sys/stat.h> +#include "cm_sys_stat.h" #include <windows.h> #endif diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5c50da8..ed87238 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -8,6 +8,7 @@ #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include "cm_sys_stat.h" #include <cmsys/Glob.hxx> #include <limits.h> @@ -16,7 +17,6 @@ #include <set> #include <stdio.h> #include <string.h> -#include <sys/stat.h> #include <utility> // NOTE: diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 57b8fff..39fd2cc 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -17,20 +17,6 @@ class cmCPackLog; class cmInstalledFile; class cmMakefile; -#define cmCPackTypeMacro(klass, superclass) \ - typedef superclass Superclass; \ - const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \ - static cmCPackGenerator* CreateGenerator() { return new klass; } \ - class cmCPackTypeMacro_UseTrailingSemicolon - -#define cmCPackLogger(logType, msg) \ - do { \ - std::ostringstream cmCPackLog_msg; \ - cmCPackLog_msg << msg; \ - this->Logger->Log(logType, __FILE__, __LINE__, \ - cmCPackLog_msg.str().c_str()); \ - } while (false) - /** \class cmCPackGenerator * \brief A superclass of all CPack Generators * @@ -311,4 +297,18 @@ private: cmMakefile* MakefileMap; }; +#define cmCPackTypeMacro(klass, superclass) \ + typedef superclass Superclass; \ + const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \ + static cmCPackGenerator* CreateGenerator() { return new klass; } \ + class cmCPackTypeMacro_UseTrailingSemicolon + +#define cmCPackLogger(logType, msg) \ + do { \ + std::ostringstream cmCPackLog_msg; \ + cmCPackLog_msg << msg; \ + this->Logger->Log(logType, __FILE__, __LINE__, \ + cmCPackLog_msg.str().c_str()); \ + } while (false) + #endif diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index 0d8dc48..8ea88a8 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -3,12 +3,12 @@ #include "cmCPackOSXX11Generator.h" #include <sstream> -#include <sys/stat.h> #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include "cm_sys_stat.h" cmCPackOSXX11Generator::cmCPackOSXX11Generator() { diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 682394e..2765e2a 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -8,13 +8,10 @@ #include <string> #include <vector> -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> - #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmSystemTools.h" +#include "cm_sys_stat.h" cmCPackSTGZGenerator::cmCPackSTGZGenerator() { diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ff465ab..2d4726c 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -163,7 +163,9 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) this->TestRunningMap[test] = false; this->RunningCount -= GetProcessorsUsed(test); testRun->EndTest(this->Completed, this->Total, false); - this->Failed->push_back(this->Properties[test]->Name); + if (!this->Properties[test]->Disabled) { + this->Failed->push_back(this->Properties[test]->Name); + } delete testRun; } } diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index f148f30..94aa4bd 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -215,6 +215,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) if (this->TestProperties->SkipReturnCode >= 0 && this->TestProperties->SkipReturnCode == retVal) { this->TestResult.Status = cmCTestTestHandler::NOT_RUN; + std::ostringstream s; + s << "SKIP_RETURN_CODE=" << this->TestProperties->SkipReturnCode; + this->TestResult.CompletionStatus = s.str(); cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped "); } else if ((success && !this->TestProperties->WillFail) || (!success && this->TestProperties->WillFail)) { @@ -253,6 +256,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) cmCTestLog(this->CTest, HANDLER_OUTPUT, "Other"); this->TestResult.Status = cmCTestTestHandler::OTHER_FAULT; } + } else if ("Disabled" == this->TestResult.CompletionStatus) { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Not Run (Disabled) "); } else // cmsysProcess_State_Error { cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Not Run "); @@ -413,6 +418,24 @@ bool cmCTestRunTest::StartTest(size_t total) << this->TestProperties->Index << ": " << this->TestProperties->Name << std::endl); this->ProcessOutput.clear(); + + // Return immediately if test is disabled + if (this->TestProperties->Disabled) { + this->TestResult.Properties = this->TestProperties; + this->TestResult.ExecutionTime = 0; + this->TestResult.CompressOutput = false; + this->TestResult.ReturnValue = -1; + this->TestResult.CompletionStatus = "Disabled"; + this->TestResult.Status = cmCTestTestHandler::NOT_RUN; + this->TestResult.TestCount = this->TestProperties->Index; + this->TestResult.Name = this->TestProperties->Name; + this->TestResult.Path = this->TestProperties->Directory; + this->TestProcess = new cmProcess; + this->TestResult.Output = "Disabled"; + this->TestResult.FullCommandLine = ""; + return false; + } + this->ComputeArguments(); std::vector<std::string>& args = this->TestProperties->Args; this->TestResult.Properties = this->TestProperties; @@ -437,7 +460,7 @@ bool cmCTestRunTest::StartTest(size_t total) cmCTestLog(this->CTest, HANDLER_OUTPUT, msg << std::endl); this->TestResult.Output = msg; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Fixture dependency failed"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -457,7 +480,7 @@ bool cmCTestRunTest::StartTest(size_t total) cmCTestLog(this->CTest, ERROR_MESSAGE, msg << std::endl); this->TestResult.Output = msg; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Missing Configuration"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -477,7 +500,7 @@ bool cmCTestRunTest::StartTest(size_t total) "Unable to find required file: " << file << std::endl); this->TestResult.Output = "Unable to find required file: " + file; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Required Files Missing"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -493,7 +516,7 @@ bool cmCTestRunTest::StartTest(size_t total) "Unable to find executable: " << args[1] << std::endl); this->TestResult.Output = "Unable to find executable: " + args[1]; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Unable to find executable"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index cc399b0..88193b0 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -25,8 +25,8 @@ #if defined(CTEST_USE_XMLRPC) #include "cmVersion.h" +#include "cm_sys_stat.h" #include <cm_xmlrpc.h> -#include <sys/stat.h> #endif #define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120 diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 9d22065..814b310 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -487,6 +487,19 @@ int cmCTestTestHandler::ProcessHandler() } } + typedef std::set<cmCTestTestHandler::cmCTestTestResult, + cmCTestTestResultLess> + SetOfTests; + SetOfTests resultsSet(this->TestResults.begin(), this->TestResults.end()); + std::vector<cmCTestTestHandler::cmCTestTestResult> disabledTests; + + for (SetOfTests::iterator ftit = resultsSet.begin(); + ftit != resultsSet.end(); ++ftit) { + if (ftit->CompletionStatus == "Disabled") { + disabledTests.push_back(*ftit); + } + } + float percent = float(passed.size()) * 100.0f / float(total); if (!failed.empty() && percent > 99) { percent = 99; @@ -505,21 +518,33 @@ int cmCTestTestHandler::ProcessHandler() "\nTotal Test time (real) = " << realBuf << "\n", this->Quiet); + if (!disabledTests.empty()) { + cmGeneratedFileStream ofs; + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl + << "The following tests are disabled and did not run:" + << std::endl); + this->StartLogFile("TestsDisabled", ofs); + + for (std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator dtit = + disabledTests.begin(); + dtit != disabledTests.end(); ++dtit) { + ofs << dtit->TestCount << ":" << dtit->Name << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" + << std::setw(3) << dtit->TestCount << " - " << dtit->Name + << std::endl); + } + } + if (!failed.empty()) { cmGeneratedFileStream ofs; cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "The following tests FAILED:" << std::endl); this->StartLogFile("TestsFailed", ofs); - typedef std::set<cmCTestTestHandler::cmCTestTestResult, - cmCTestTestResultLess> - SetOfTests; - SetOfTests resultsSet(this->TestResults.begin(), - this->TestResults.end()); - for (SetOfTests::iterator ftit = resultsSet.begin(); ftit != resultsSet.end(); ++ftit) { - if (ftit->Status != cmCTestTestHandler::COMPLETED) { + if (ftit->Status != cmCTestTestHandler::COMPLETED && + ftit->CompletionStatus != "Disabled") { ofs << ftit->TestCount << ":" << ftit->Name << std::endl; cmCTestLog( this->CTest, HANDLER_OUTPUT, "\t" @@ -841,6 +866,11 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const size_t fixtureTestsAdded = 0; std::set<std::string> addedFixtures; for (size_t i = 0; i < tests.size(); ++i) { + // Skip disabled tests + if (tests[i].Disabled) { + continue; + } + // There are two things to do for each test: // 1. For every fixture required by this test, record that fixture as // being required and create dependencies on that fixture's setup @@ -1200,6 +1230,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) cmCTestTestResult* result = &this->TestResults[cc]; this->WriteTestResultHeader(xml, result); xml.StartElement("Results"); + if (result->Status != cmCTestTestHandler::NOT_RUN) { if (result->Status != cmCTestTestHandler::COMPLETED || result->ReturnValue) { @@ -1208,6 +1239,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.Attribute("name", "Exit Code"); xml.Element("Value", this->GetTestStatus(result->Status)); xml.EndElement(); // NamedMeasurement + xml.StartElement("NamedMeasurement"); xml.Attribute("type", "text/string"); xml.Attribute("name", "Exit Value"); @@ -1222,8 +1254,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.EndElement(); // NamedMeasurement if (!result->Reason.empty()) { const char* reasonType = "Pass Reason"; - if (result->Status != cmCTestTestHandler::COMPLETED && - result->Status != cmCTestTestHandler::NOT_RUN) { + if (result->Status != cmCTestTestHandler::COMPLETED) { reasonType = "Fail Reason"; } xml.StartElement("NamedMeasurement"); @@ -1232,12 +1263,14 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.Element("Value", result->Reason); xml.EndElement(); // NamedMeasurement } - xml.StartElement("NamedMeasurement"); - xml.Attribute("type", "text/string"); - xml.Attribute("name", "Completion Status"); - xml.Element("Value", result->CompletionStatus); - xml.EndElement(); // NamedMeasurement } + + xml.StartElement("NamedMeasurement"); + xml.Attribute("type", "text/string"); + xml.Attribute("name", "Completion Status"); + xml.Element("Value", result->CompletionStatus); + xml.EndElement(); // NamedMeasurement + xml.StartElement("NamedMeasurement"); xml.Attribute("type", "text/string"); xml.Attribute("name", "Command Line"); @@ -2000,6 +2033,9 @@ bool cmCTestTestHandler::SetTestsProperties( if (key == "WILL_FAIL") { rtit->WillFail = cmSystemTools::IsOn(val.c_str()); } + if (key == "DISABLED") { + rtit->Disabled = cmSystemTools::IsOn(val.c_str()); + } if (key == "ATTACHED_FILES") { cmSystemTools::ExpandListArgument(val, rtit->AttachedFiles); } @@ -2178,6 +2214,7 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args) test.IsInBasedOnREOptions = true; test.WillFail = false; + test.Disabled = false; test.RunSerial = false; test.Timeout = 0; test.ExplicitTimeout = false; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 5b07e98..a95f088 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -114,6 +114,7 @@ public: std::map<std::string, std::string> Measurements; bool IsInBasedOnREOptions; bool WillFail; + bool Disabled; float Cost; int PreviousRuns; bool RunSerial; diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 5e03c39..b2f0b2d 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -184,9 +184,9 @@ int main(int argc, char** argv) } #if defined(Q_OS_MAC) +#include "cm_sys_stat.h" #include <errno.h> #include <string.h> -#include <sys/stat.h> #include <unistd.h> static bool cmOSXInstall(std::string const& dir, std::string const& tool) { diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 7da93ac..e135ac6 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -7,6 +7,12 @@ #include "cmMakefile.h" #include "cmsys/SystemInformation.hxx" +#if defined(_WIN32) +#include "cmSystemTools.h" +#include "cmVSSetupHelper.h" +#define HAVE_VS_SETUP_HELPER +#endif + class cmExecutionStatus; // cmCMakeHostSystemInformation @@ -70,6 +76,13 @@ bool cmCMakeHostSystemInformationCommand::GetValue( value = this->ValueToString(info.GetTotalPhysicalMemory()); } else if (key == "AVAILABLE_PHYSICAL_MEMORY") { value = this->ValueToString(info.GetAvailablePhysicalMemory()); +#ifdef HAVE_VS_SETUP_HELPER + } else if (key == "VS_15_DIR") { + cmVSSetupAPIHelper vsSetupAPIHelper; + if (vsSetupAPIHelper.GetVSInstanceInfo(value)) { + cmSystemTools::ConvertToUnixSlashes(value); + } +#endif } else { std::string e = "does not recognize <key> " + key; this->SetError(e); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index ebdc8b0..be736da 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -20,22 +20,6 @@ class cmGeneratedFileStream; class cmMakefile; class cmXMLWriter; -#define cmCTestLog(ctSelf, logType, msg) \ - do { \ - std::ostringstream cmCTestLog_msg; \ - cmCTestLog_msg << msg; \ - (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \ - cmCTestLog_msg.str().c_str()); \ - } while (false) - -#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \ - do { \ - std::ostringstream cmCTestLog_msg; \ - cmCTestLog_msg << msg; \ - (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \ - cmCTestLog_msg.str().c_str(), suppress); \ - } while (false) - /** \class cmCTest * \brief Represents a ctest invocation. * @@ -647,4 +631,20 @@ inline std::ostream& operator<<(std::ostream& os, const cmCTestLogWrite& c) return os; } +#define cmCTestLog(ctSelf, logType, msg) \ + do { \ + std::ostringstream cmCTestLog_msg; \ + cmCTestLog_msg << msg; \ + (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \ + cmCTestLog_msg.str().c_str()); \ + } while (false) + +#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \ + do { \ + std::ostringstream cmCTestLog_msg; \ + cmCTestLog_msg << msg; \ + (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \ + cmCTestLog_msg.str().c_str(), suppress); \ + } while (false) + #endif diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 2d66344..1222d5a 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommandArgumentParserHelper.h" -#include <cm_kwiml.h> - #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" #include "cmState.h" diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 26f1df2..5f89ba1 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -3,7 +3,7 @@ #ifndef cmConfigure_h #define cmConfigure_h -#include <cmsys/Configure.hxx> // IWYU pragma: keep +#include <cmsys/Configure.hxx> // IWYU pragma: export #ifdef _MSC_VER #pragma warning(disable : 4786) diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index a30b642..39a59fc 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -4,7 +4,6 @@ #include <cmConfigure.h> -#include <cmsys/DynamicLoader.hxx> #include <map> #include <string> #include <utility> diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index d14f81e..5d69400 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -10,7 +10,7 @@ #include <cmConfigure.h> // IWYU pragma: keep -#include <cmsys/DynamicLoader.hxx> +#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export class cmDynamicLoader { diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 957b4cb..63012a5 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -16,10 +16,6 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> - #include "cmAlgorithms.h" #include "cmCommandArgumentsHelper.h" #include "cmCryptoHash.h" @@ -35,11 +31,13 @@ #include "cmSystemTools.h" #include "cmTimestamp.h" #include "cm_auto_ptr.hxx" +#include "cm_sys_stat.h" #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmCurl.h" #include "cmFileLockResult.h" +#include <cm_curl.h> #endif #if defined(CMAKE_USE_ELF_PARSER) @@ -1031,8 +1029,6 @@ protected: { } }; - struct MatchRule; - friend struct MatchRule; struct MatchRule { cmsys::RegularExpression Regex; @@ -1489,6 +1485,9 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile) // Remove the destination file so we can always create the symlink. cmSystemTools::RemoveFile(toFile); + // Create destination directory if it doesn't exist + cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(toFile)); + // Create the symlink. if (!cmSystemTools::CreateSymlink(symlinkTarget, toFile)) { std::ostringstream e; diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index 991ebb8..ef4337b 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -10,7 +10,7 @@ // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) -#include <sys/stat.h> +#include "cm_sys_stat.h" #define cmFileTimeComparison_Type struct stat #else #include <cmsys/Encoding.hxx> diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index e8273fb..024b00a 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -54,8 +54,7 @@ void cmFortranParser_RuleElse(cmFortranParser* parser); void cmFortranParser_RuleEndif(cmFortranParser* parser); /* Define the parser stack element type. */ -typedef union cmFortran_yystype_u cmFortran_yystype; -union cmFortran_yystype_u +struct cmFortran_yystype { char* string; }; diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 1a5e6c5..1abe673 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFortranParser.h" -#include "cmFortranLexer.h" #include "cmSystemTools.h" #include <assert.h> diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 26135df..1223ffd 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -11,12 +11,7 @@ #include "cmGeneratorExpression.h" #include "cm_auto_ptr.hxx" - -#if defined(_MSC_VER) -typedef unsigned short mode_t; -#else -#include <sys/types.h> -#endif +#include "cm_sys_stat.h" class cmLocalGenerator; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c8422d4..73d2009 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3380,8 +3380,18 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const // were not listed in one of the other lists. if (const char* location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) { flags.MacFolder = location; + const bool stripResources = + this->GlobalGenerator->ShouldStripResourcePath(this->Makefile); if (strcmp(location, "Resources") == 0) { flags.Type = cmGeneratorTarget::SourceFileTypeResource; + if (stripResources) { + flags.MacFolder = ""; + } + } else if (cmSystemTools::StringStartsWith(location, "Resources/")) { + flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource; + if (stripResources) { + flags.MacFolder += strlen("Resources/"); + } } else { flags.Type = cmGeneratorTarget::SourceFileTypeMacContent; } @@ -3435,7 +3445,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const if (cmSourceFile* sf = this->Makefile->GetSource(*it)) { SourceFileFlags& flags = this->SourceFlagsMap[sf]; flags.MacFolder = ""; - if (!this->Makefile->PlatformIsAppleIos()) { + if (!this->GlobalGenerator->ShouldStripResourcePath(this->Makefile)) { flags.MacFolder = "Resources"; } flags.Type = cmGeneratorTarget::SourceFileTypeResource; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 2510407..fcab4aa 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -425,7 +425,9 @@ public: SourceFileTypePublicHeader, // is in "PUBLIC_HEADER" target property SourceFileTypeResource, // is in "RESOURCE" target property *or* // has MACOSX_PACKAGE_LOCATION=="Resources" - SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources" + SourceFileTypeDeepResource, // MACOSX_PACKAGE_LOCATION starts with + // "Resources/" + SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources[/]" }; struct SourceFileFlags { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0d53bf7..851290a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2487,6 +2487,11 @@ std::string cmGlobalGenerator::GenerateRuleFile( return ruleFile; } +bool cmGlobalGenerator::ShouldStripResourcePath(cmMakefile* mf) const +{ + return mf->PlatformIsAppleIos(); +} + std::string cmGlobalGenerator::GetSharedLibFlagsForLanguage( std::string const& l) const { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 6432538..b228d41 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -339,6 +339,10 @@ public: relevant for mixed macOS and iOS builds. */ virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; } + /** Return whether the "Resources" folder prefix should be stripped from + MacFolder. */ + virtual bool ShouldStripResourcePath(cmMakefile*) const; + std::string GetSharedLibFlagsForLanguage(std::string const& lang) const; /** Generate an <output>.rule file path for a given command output. */ diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 45993ce..416af14 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1154,8 +1154,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // dstPath in frameworks is relative to Versions/<version> ostr << mit->first; } else if (mit->first != "MacOS") { - // dstPath in bundles is relative to Contents/MacOS - ostr << "../" << mit->first.c_str(); + if (gtgt->Target->GetMakefile()->PlatformIsAppleIos()) { + ostr << mit->first; + } else { + // dstPath in bundles is relative to Contents/MacOS + ostr << "../" << mit->first; + } } copyFilesBuildPhase->AddAttribute("dstPath", this->CreateString(ostr.str())); @@ -1173,6 +1177,45 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( } } + // create vector of "resource content file" build phases - only for + // framework or bundle targets + if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { + typedef std::map<std::string, std::vector<cmSourceFile*> > + mapOfVectorOfSourceFiles; + mapOfVectorOfSourceFiles bundleFiles; + for (std::vector<cmSourceFile*>::const_iterator i = classes.begin(); + i != classes.end(); ++i) { + cmGeneratorTarget::SourceFileFlags tsFlags = + gtgt->GetTargetSourceFileFlags(*i); + if (tsFlags.Type == cmGeneratorTarget::SourceFileTypeDeepResource) { + bundleFiles[tsFlags.MacFolder].push_back(*i); + } + } + mapOfVectorOfSourceFiles::iterator mit; + for (mit = bundleFiles.begin(); mit != bundleFiles.end(); ++mit) { + cmXCodeObject* copyFilesBuildPhase = + this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase); + copyFilesBuildPhase->SetComment("Copy files"); + copyFilesBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + copyFilesBuildPhase->AddAttribute("dstSubfolderSpec", + this->CreateString("7")); + copyFilesBuildPhase->AddAttribute("dstPath", + this->CreateString(mit->first)); + copyFilesBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + copyFilesBuildPhase->AddAttribute("files", buildFiles); + std::vector<cmSourceFile*>::iterator sfIt; + for (sfIt = mit->second.begin(); sfIt != mit->second.end(); ++sfIt) { + cmXCodeObject* xsf = this->CreateXCodeSourceFile( + this->CurrentLocalGenerator, *sfIt, gtgt); + buildFiles->AddObject(xsf); + } + contentBuildPhases.push_back(copyFilesBuildPhase); + } + } + // create framework build phase cmXCodeObject* frameworkBuildPhase = 0; if (!externalObjFiles.empty()) { @@ -3077,10 +3120,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateString(this->GeneratorToolset)); } if (this->GetLanguageEnabled("Swift")) { - std::string swiftVersion = "2.3"; + std::string swiftVersion; if (const char* vers = this->CurrentMakefile->GetDefinition( "CMAKE_Swift_LANGUAGE_VERSION")) { swiftVersion = vers; + } else if (this->XcodeVersion >= 83) { + swiftVersion = "3.0"; + } else { + swiftVersion = "2.3"; } buildSettings->AddAttribute("SWIFT_VERSION", this->CreateString(swiftVersion)); @@ -3660,6 +3707,12 @@ bool cmGlobalXCodeGenerator::UseEffectivePlatformName(cmMakefile* mf) const return cmSystemTools::IsOn(epnValue); } +bool cmGlobalXCodeGenerator::ShouldStripResourcePath(cmMakefile*) const +{ + // Xcode determines Resource location itself + return true; +} + void cmGlobalXCodeGenerator::ComputeTargetObjectDirectory( cmGeneratorTarget* gt) const { diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 9eacdef..172e414 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -88,6 +88,8 @@ public: bool UseEffectivePlatformName(cmMakefile* mf) const CM_OVERRIDE; + bool ShouldStripResourcePath(cmMakefile*) const CM_OVERRIDE; + bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) CM_OVERRIDE; void AppendFlag(std::string& flags, std::string const& flag); diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 1c0a99e..bda6b75 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -150,6 +150,11 @@ void cmIDEOptions::AddDefines(const std::vector<std::string>& defines) this->Defines.insert(this->Defines.end(), defines.begin(), defines.end()); } +std::vector<std::string> const& cmIDEOptions::GetDefines() const +{ + return this->Defines; +} + void cmIDEOptions::AddFlag(const char* flag, const char* value) { this->FlagMap[flag] = value; diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 465cf2c..11f8aba 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -24,6 +24,8 @@ public: void AddDefine(const std::string& define); void AddDefines(const char* defines); void AddDefines(const std::vector<std::string>& defines); + std::vector<std::string> const& GetDefines() const; + void AddFlag(const char* flag, const char* value); void AddFlag(const char* flag, std::vector<std::string> const& value); void AppendFlag(std::string const& flag, std::string const& value); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index cd5b46b..260a84b 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -749,11 +749,13 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( if (this->FortranProject) { // Intel Fortran >= 15.0 uses TargetName property. - std::string targetNameFull = target->GetFullName(configName); - std::string targetName = + std::string const targetNameFull = target->GetFullName(configName); + std::string const targetName = cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull); - std::string targetExt = - cmSystemTools::GetFilenameLastExtension(targetNameFull); + std::string const targetExt = + target->GetType() == cmStateEnums::OBJECT_LIBRARY + ? ".lib" + : cmSystemTools::GetFilenameLastExtension(targetNameFull); /* clang-format off */ fout << "\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c4a488f..f7d822a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -38,6 +38,7 @@ #include "cmVersion.h" #include "cmWorkingDirectory.h" #include "cm_auto_ptr.hxx" +#include "cm_sys_stat.h" #include "cmake.h" #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index eac3ecf..aaeb659 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -552,10 +552,6 @@ static int calculateCommandLineLengthLimit(int linkRuleLength) #ifdef _WIN32 8000, #endif -#if defined(_SC_ARG_MAX) - // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac - ((int)sysconf(_SC_ARG_MAX)) - 1000, -#endif #if defined(__linux) // #define MAX_ARG_STRLEN (PAGE_SIZE * 32) in Linux's binfmts.h ((int)sysconf(_SC_PAGESIZE) * 32) - 1000, @@ -564,7 +560,15 @@ static int calculateCommandLineLengthLimit(int linkRuleLength) }; size_t const arrSz = cmArraySize(limits); - int const sz = *std::min_element(limits, limits + arrSz); + int sz = *std::min_element(limits, limits + arrSz); +#if defined(_SC_ARG_MAX) + // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac + int const szArgMax = static_cast<int>(sysconf(_SC_ARG_MAX)); + // a return value of -1 signifies an unrestricted value + if (szArgMax != -1) { + sz = std::min(sz, szArgMax - 1000); + } +#endif if (sz == std::numeric_limits<int>::max()) { return 0; } diff --git a/Source/cmQtAutoGeneratorCommon.cxx b/Source/cmQtAutoGeneratorCommon.cxx index dcd61a3..2498fe8 100644 --- a/Source/cmQtAutoGeneratorCommon.cxx +++ b/Source/cmQtAutoGeneratorCommon.cxx @@ -8,6 +8,7 @@ #include <cmsys/RegularExpression.hxx> #include <sstream> +#include <stddef.h> // - Static functions diff --git a/Source/cmQtAutoGeneratorCommon.h b/Source/cmQtAutoGeneratorCommon.h index b54b6fa..b004005 100644 --- a/Source/cmQtAutoGeneratorCommon.h +++ b/Source/cmQtAutoGeneratorCommon.h @@ -3,13 +3,10 @@ #ifndef cmQtAutoGeneratorCommon_h #define cmQtAutoGeneratorCommon_h -#include <cmConfigure.h> // IWYU pragma: keep +#include <cmConfigure.h> #include <string> #include <vector> -class cmGeneratorTarget; -class cmLocalGenerator; - class cmQtAutoGeneratorCommon { // - Types and statics diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 6ebc234..d69794c 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -7,15 +7,15 @@ #include "cmCustomCommandLines.h" #include "cmFilePathChecksum.h" #include "cmGeneratorTarget.h" -#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmSourceFile.h" -#include "cmSourceFileLocation.h" +#include "cmSourceGroup.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cm_sys_stat.h" #include "cmake.h" #if defined(_WIN32) && !defined(__CYGWIN__) @@ -25,13 +25,9 @@ #include <algorithm> #include <cmConfigure.h> #include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> #include <map> #include <set> -#include <sstream> -#include <string.h> #include <string> -#include <sys/stat.h> #include <utility> #include <vector> diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 334a05a..a5c1a23 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -255,6 +255,27 @@ static void setErrorMessage(std::string* errorMessage, const std::string& text) } } +static bool testHomeDirectory(cmState* state, std::string& value, + std::string* errorMessage) +{ + const std::string cachedValue = + std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY")); + const std::string suffix = "/CMakeLists.txt"; + const std::string cachedValueCML = cachedValue + suffix; + const std::string valueCML = value + suffix; + if (!cmSystemTools::SameFile(valueCML, cachedValueCML)) { + setErrorMessage(errorMessage, + std::string("\"CMAKE_HOME_DIRECTORY\" is set but " + "incompatible with configured " + "source directory value.")); + return false; + } + if (value.empty()) { + value = cachedValue; + } + return true; +} + static bool testValue(cmState* state, const std::string& key, std::string& value, const std::string& keyDescription, std::string* errorMessage) @@ -314,8 +335,7 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, } // check sourcedir: - if (!testValue(state, "CMAKE_HOME_DIRECTORY", sourceDirectory, - "source directory", errorMessage)) { + if (!testHomeDirectory(state, sourceDirectory, errorMessage)) { return false; } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index b7afa10..ee751f2 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmProcessOutput.h" +#include "cm_sys_stat.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmArchiveWrite.h" @@ -33,7 +34,6 @@ #include <cmsys/FStream.hxx> #include <cmsys/RegularExpression.hxx> #include <cmsys/System.h> -#include <cmsys/SystemTools.hxx> #include <cmsys/Terminal.h> #include <ctype.h> #include <errno.h> @@ -43,7 +43,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/stat.h> #include <time.h> #include <utility> diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 10e8280..e93eaae 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -5,19 +5,13 @@ #include <cmConfigure.h> // IWYU pragma: keep +#include "cmsys/SystemTools.hxx" // IWYU pragma: export #include <cmProcessOutput.h> #include <cmsys/Process.h> -#include <cmsys/SystemTools.hxx> #include <stddef.h> #include <string> #include <vector> -#if defined(_MSC_VER) -typedef unsigned short mode_t; -#else -#include <sys/types.h> -#endif - class cmSystemToolsFileTime; /** \class cmSystemTools diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2ab72dc..a9ccc68 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2405,6 +2405,11 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions( std::string(this->Makefile->GetSafeDefinition(rcConfigFlagsVar)); rcOptions.Parse(flags.c_str()); + + // For historical reasons, add the C preprocessor defines to RC. + Options& clOptions = *(this->ClOptions[configName]); + rcOptions.AddDefines(clOptions.GetDefines()); + this->RcOptions[configName] = pOptions.release(); return true; } @@ -2417,12 +2422,9 @@ void cmVisualStudio10TargetGenerator::WriteRCOptions( } this->WriteString("<ResourceCompile>\n", 2); - // Preprocessor definitions and includes are shared with clOptions. - Options& clOptions = *(this->ClOptions[configName]); - clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n", "RC"); - Options& rcOptions = *(this->RcOptions[configName]); + rcOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", + "\n", "RC"); rcOptions.AppendFlag("AdditionalIncludeDirectories", includes); rcOptions.AppendFlag("AdditionalIncludeDirectories", "%(AdditionalIncludeDirectories)"); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 1ca6b9c..abc4924 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -1,5 +1,6 @@ #include "cmVisualStudioGeneratorOptions.h" +#include "cmAlgorithms.h" #include "cmLocalVisualStudioGenerator.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" @@ -403,8 +404,10 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( fout << prefix << tag << "=\""; } const char* sep = ""; + std::vector<std::string>::const_iterator de = + cmRemoveDuplicates(this->Defines); for (std::vector<std::string>::const_iterator di = this->Defines.begin(); - di != this->Defines.end(); ++di) { + di != de; ++di) { // Escape the definition for the compiler. std::string define; if (this->Version < cmGlobalVisualStudioGenerator::VS10) { diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index 96c8e27..ce2de57 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -4,12 +4,9 @@ #include <cmsys/FStream.hxx> -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> - #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cm_sys_stat.h" class cmExecutionStatus; diff --git a/Source/cm_sys_stat.h b/Source/cm_sys_stat.h new file mode 100644 index 0000000..26e4baa --- /dev/null +++ b/Source/cm_sys_stat.h @@ -0,0 +1,14 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cm_sys_stat_h +#define cm_sys_stat_h + +#if defined(_MSC_VER) +typedef unsigned short mode_t; +#endif + +#include <sys/types.h> +// include sys/stat.h after sys/types.h +#include <sys/stat.h> + +#endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3af3be6..4363c12 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -25,6 +25,7 @@ #include "cmVersionConfig.h" #include "cmWorkingDirectory.h" #include "cm_auto_ptr.hxx" +#include "cm_sys_stat.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include <cm_jsoncpp_writer.h> @@ -106,10 +107,6 @@ #include <sys/time.h> #endif -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> // struct stat - #include <algorithm> #include <cmsys/FStream.hxx> #include <cmsys/Glob.hxx> diff --git a/Source/kwsys/.gitattributes b/Source/kwsys/.gitattributes index a121ad1..3583f39 100644 --- a/Source/kwsys/.gitattributes +++ b/Source/kwsys/.gitattributes @@ -1,12 +1,15 @@ .git* export-ignore -*.c whitespace=tab-in-indent,no-lf-at-eof -*.h whitespace=tab-in-indent,no-lf-at-eof -*.h.in whitespace=tab-in-indent,no-lf-at-eof -*.cxx whitespace=tab-in-indent,no-lf-at-eof -*.hxx whitespace=tab-in-indent,no-lf-at-eof -*.hxx.in whitespace=tab-in-indent,no-lf-at-eof -*.txt whitespace=tab-in-indent,no-lf-at-eof -*.cmake whitespace=tab-in-indent,no-lf-at-eof +*.c our-c-style +*.c.in our-c-style +*.cxx our-c-style +*.h our-c-style +*.h.in our-c-style +*.hxx our-c-style +*.hxx.in our-c-style +*.cmake whitespace=tab-in-indent *.rst whitespace=tab-in-indent conflict-marker-size=79 +*.txt whitespace=tab-in-indent + +* -format.clang-format diff --git a/Source/kwsys/ConsoleBuf.hxx.in b/Source/kwsys/ConsoleBuf.hxx.in index cb58865..32e680c 100644 --- a/Source/kwsys/ConsoleBuf.hxx.in +++ b/Source/kwsys/ConsoleBuf.hxx.in @@ -25,8 +25,7 @@ namespace @KWSYS_NAMESPACE@ { #if defined(_WIN32) template <class CharT, class Traits = std::char_traits<CharT> > -class @KWSYS_NAMESPACE@_EXPORT BasicConsoleBuf - : public std::basic_streambuf<CharT, Traits> +class BasicConsoleBuf : public std::basic_streambuf<CharT, Traits> { public: typedef typename Traits::int_type int_type; diff --git a/Source/kwsys/Encoding.hxx.in b/Source/kwsys/Encoding.hxx.in index 6639efd..bf93f50 100644 --- a/Source/kwsys/Encoding.hxx.in +++ b/Source/kwsys/Encoding.hxx.in @@ -13,7 +13,7 @@ class @KWSYS_NAMESPACE@_EXPORT Encoding { public: // Container class for argc/argv. - class CommandLineArguments + class @KWSYS_NAMESPACE@_EXPORT CommandLineArguments { public: // On Windows, get the program command line arguments diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in index 736214f..d4bc6c9 100644 --- a/Source/kwsys/FStream.hxx.in +++ b/Source/kwsys/FStream.hxx.in @@ -170,8 +170,6 @@ template <typename CharType, typename Traits = std::char_traits<CharType> > class basic_ifstream : public std::basic_istream<CharType, Traits>, public basic_efilebuf<CharType, Traits> { - using basic_efilebuf<CharType, Traits>::is_open; - public: typedef typename basic_efilebuf<CharType, Traits>::internal_buffer_type internal_buffer_type; @@ -201,6 +199,8 @@ public: void close() { this->_set_state(this->_close(), this, this); } + using basic_efilebuf<CharType, Traits>::is_open; + internal_buffer_type* rdbuf() const { return this->buf_; } ~basic_ifstream() @KWSYS_NAMESPACE@_FStream_NOEXCEPT { close(); } @@ -269,7 +269,7 @@ enum BOM // If a BOM exists, the stream is advanced to after the BOM. // This function requires a seekable stream (but not a relative // seekable stream). -BOM ReadBOM(std::istream& in); +@KWSYS_NAMESPACE@_EXPORT BOM ReadBOM(std::istream& in); } } diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx index 88743b0..403c896 100644 --- a/Tests/CMakeLib/testEncoding.cxx +++ b/Tests/CMakeLib/testEncoding.cxx @@ -1,8 +1,10 @@ -#include <fstream> +#include <cmsys/FStream.hxx> #include <iostream> #include <string> +#ifdef _WIN32 #include <cmsys/ConsoleBuf.hxx> +#endif #ifdef _WIN32 void setEncoding(cmsys::ConsoleBuf::Manager& buf, UINT codepage) @@ -37,7 +39,7 @@ int main(int argc, char* argv[]) setEncoding(consoleOut, CP_OEMCP); } // else AUTO #endif - std::ifstream file(argv[2]); + cmsys::ifstream file(argv[2]); if (!file.is_open()) { std::cout << "Failed to open file: " << argv[2] << std::endl; return 2; diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index fc90d09..a5b38fd 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -205,14 +205,14 @@ if(CPackGen MATCHES "RPM") /usr/foo/bar/non_relocatable/depth_two /usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path /usr/foo/bar/other_relocatable -/usr/foo/bar/other_relocatable/depth_two$") +/usr/foo/bar/other_relocatable/depth_two(\n.*\.build-id.*)*$") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_HEADERS_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_HEADERS_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") set(check_file_match_expected_architecture "noarch") set(spec_regex "*headers*") - set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h(\n.*\.build-id.*)*$") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") @@ -221,7 +221,7 @@ if(CPackGen MATCHES "RPM") set(spec_regex "*applications*") set(check_content_list "^/usr/foo/bar /usr/foo/bar/bin -/usr/foo/bar/bin/mylibapp$") +/usr/foo/bar/bin/mylibapp(\n.*\.build-id.*)*$") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") @@ -241,7 +241,7 @@ if(CPackGen MATCHES "RPM") /usr/foo/bar/share/man/mylib/man3 /usr/foo/bar/share/man/mylib/man3/mylib.1 /usr/foo/bar/share/man/mylib/man3/mylib.1/mylib -/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2$") +/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2(\n.*\.build-id.*)*$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt index cbe1e67..1d93be7 100644 --- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt +++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt @@ -10,3 +10,8 @@ add_library(CudaMixedObjectLib OBJECT static.cu static.cpp) add_executable(CudaObjectLibrary main.cpp $<TARGET_OBJECTS:CudaMixedObjectLib>) +if(APPLE) + # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that + # the static cuda runtime can find it at runtime. + target_link_libraries(CudaObjectLibrary PRIVATE -Wl,-rpath,/usr/local/cuda/lib) +endif() diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 86af746..101b396 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -82,9 +82,14 @@ target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) # -- Test # When a file listed in a .qrc file changes the target must be rebuilt +set(timeformat "%Y%j%H%M%S") +set(RCC_DEPENDS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends") +set(RCC_DEPENDS_BIN "${CMAKE_CURRENT_BINARY_DIR}/rccDepends") +configure_file(${RCC_DEPENDS_SRC}/res1a.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY) +configure_file(${RCC_DEPENDS_SRC}/res2a.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY) try_compile(RCC_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/rccDepends" - "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends" + "${RCC_DEPENDS_BIN}" + "${RCC_DEPENDS_SRC}" rccDepends CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" "-DQT_TEST_VERSION=${QT_TEST_VERSION}" @@ -94,47 +99,82 @@ try_compile(RCC_DEPENDS if (NOT RCC_DEPENDS) message(SEND_ERROR "Initial build of rccDepends failed. Output: ${output}") endif() - # Get name and timestamp of the output binary -file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/target1.txt" target1List) -list(GET target1List 0 binFile) -set(timeformat "%Y%j%H%M%S") -file(TIMESTAMP "${binFile}" timeBegin "${timeformat}") - -# Touch first qrc input file and rebuild +file(STRINGS "${RCC_DEPENDS_BIN}/target.txt" targetList) +list(GET targetList 0 rccDependsBin) +file(TIMESTAMP "${rccDependsBin}" timeBegin "${timeformat}") +# Sleep, touch regular qrc input file, rebuild and compare timestamp execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/res1/input.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rccDepends" - RESULT_VARIABLE rccDepends_result -) -if (rccDepends_result) +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/input.txt") +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) message(SEND_ERROR "Second build of rccDepends failed.") endif() -# Compare timestamps -file(TIMESTAMP "${binFile}" timeStep1 "${timeformat}") +file(TIMESTAMP "${rccDependsBin}" timeStep1 "${timeformat}") if (NOT timeStep1 GREATER timeBegin) - message(SEND_ERROR "File (${binFile}) should have changed in the first step!") + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the first step!") endif() - -# Touch second qrc input file and rebuild +# Sleep, update regular qrc file, rebuild and compare timestamp execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/res2/input.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rccDepends" - RESULT_VARIABLE rccDepends_result -) -if (rccDepends_result) +configure_file(${RCC_DEPENDS_SRC}/res1b.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY) +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) message(SEND_ERROR "Third build of rccDepends failed.") endif() -# Compare timestamps -file(TIMESTAMP "${binFile}" timeStep2 "${timeformat}") +file(TIMESTAMP "${rccDependsBin}" timeStep2 "${timeformat}") if (NOT timeStep2 GREATER timeStep1) - message(SEND_ERROR "File (${binFile}) should have changed in the second step!") + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the second step!") +endif() +# Sleep, touch regular qrc newly added input file, rebuild and compare timestamp +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/inputAdded.txt") +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) + message(SEND_ERROR "Fourth build of rccDepends failed.") +endif() +file(TIMESTAMP "${rccDependsBin}" timeStep3 "${timeformat}") +if (NOT timeStep3 GREATER timeStep2) + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the third step!") +endif() +# Sleep, touch generated qrc input file, rebuild and compare timestamp +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/input.txt") +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) + message(SEND_ERROR "Fifth build of rccDepends failed.") +endif() +file(TIMESTAMP "${rccDependsBin}" timeStep4 "${timeformat}") +if (NOT timeStep4 GREATER timeStep3) + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fourth step!") +endif() +# Sleep, update generated qrc file, rebuild and compare timestamp +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. +configure_file(${RCC_DEPENDS_SRC}/res2b.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY) +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) + message(SEND_ERROR "Sixth build of rccDepends failed.") +endif() +file(TIMESTAMP "${rccDependsBin}" timeStep5 "${timeformat}") +if (NOT timeStep5 GREATER timeStep4) + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fitfh step!") +endif() +# Sleep, touch generated qrc newly added input file, rebuild and compare timestamp +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/inputAdded.txt") +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) +if (result) + message(SEND_ERROR "Seventh build of rccDepends failed.") +endif() +file(TIMESTAMP "${rccDependsBin}" timeStep6 "${timeformat}") +if (NOT timeStep6 GREATER timeStep5) + message(SEND_ERROR "File (${rccDependsBin}) should have changed in the sixth step!") endif() + # -- Test # Ensure a repeated build succeeds when a header containing a QObject changes +set(timeformat "%Y%j%H%M%S") +configure_file(mocRerun/test1a.h.in mocRerun/test1.h COPYONLY) try_compile(MOC_RERUN "${CMAKE_CURRENT_BINARY_DIR}/mocRerun" "${CMAKE_CURRENT_SOURCE_DIR}/mocRerun" @@ -147,13 +187,10 @@ try_compile(MOC_RERUN if (NOT MOC_RERUN) message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}") endif() - # Get name and timestamp of the output binary file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/mocRerun/target1.txt" target1List) list(GET target1List 0 binFile) -set(timeformat "%Y%j%H%M%S") file(TIMESTAMP "${binFile}" timeBegin "${timeformat}") - # Change file content and rebuild execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) configure_file(mocRerun/test1b.h.in mocRerun/test1.h COPYONLY) @@ -164,7 +201,6 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build . if (mocRerun_result) message(SEND_ERROR "Second build of mocRerun failed.") endif() - # Compare timestamps file(TIMESTAMP "${binFile}" timeStep1 "${timeformat}") if (NOT timeStep1 GREATER timeBegin) diff --git a/Tests/QtAutogen/mocRerun/CMakeLists.txt b/Tests/QtAutogen/mocRerun/CMakeLists.txt index 6689f50..69ea8d7 100644 --- a/Tests/QtAutogen/mocRerun/CMakeLists.txt +++ b/Tests/QtAutogen/mocRerun/CMakeLists.txt @@ -16,10 +16,9 @@ endif() set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -configure_file(test1a.h.in test1.h COPYONLY) # Generated source file add_custom_command(OUTPUT main.cpp - COMMAND ${CMAKE_COMMAND} -E sleep 3 + COMMAND ${CMAKE_COMMAND} -E sleep 2 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/main.cpp ) diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt index de98573..878ae5d 100644 --- a/Tests/QtAutogen/rccDepends/CMakeLists.txt +++ b/Tests/QtAutogen/rccDepends/CMakeLists.txt @@ -15,22 +15,21 @@ else() set(QT_CORE_TARGET Qt5::Core) endif() -configure_file(res/input1.txt.in res1/input.txt @ONLY) -configure_file(res/input2.txt.in res2/input.txt @ONLY) -# Configure time generated qrc file -configure_file(res1.qrc.in res1.qrc @ONLY) +configure_file(res/input1.txt.in res1/input.txt COPYONLY) +configure_file(res/input1.txt.in res1/inputAdded.txt COPYONLY) +configure_file(res/input2.txt.in res2/input.txt COPYONLY) +configure_file(res/input2.txt.in res2/inputAdded.txt COPYONLY) # Dependency generated qrc file add_custom_command(OUTPUT res2.qrc - COMMAND ${CMAKE_COMMAND} -E sleep 3 - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in + COMMAND ${CMAKE_COMMAND} -E sleep 2 + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc ) - add_executable(rccDepends main.cpp ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc - ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc -) + ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc ) target_link_libraries(rccDepends ${QT_CORE_TARGET}) add_custom_command(TARGET rccDepends POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target1.txt) + ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target.txt) diff --git a/Tests/QtAutogen/rccDepends/res1.qrc.in b/Tests/QtAutogen/rccDepends/res1a.qrc.in index 2a5417b..d111ffb 100644 --- a/Tests/QtAutogen/rccDepends/res1.qrc.in +++ b/Tests/QtAutogen/rccDepends/res1a.qrc.in @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/"> + <qresource prefix="/Texts1"> <file>res1/input.txt</file> </qresource> </RCC> diff --git a/Tests/QtAutogen/rccDepends/res1b.qrc.in b/Tests/QtAutogen/rccDepends/res1b.qrc.in new file mode 100644 index 0000000..4cb3f04 --- /dev/null +++ b/Tests/QtAutogen/rccDepends/res1b.qrc.in @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/Texts1"> + <file>res1/input.txt</file> + <file alias="Added">res1/inputAdded.txt</file> + </qresource> +</RCC> diff --git a/Tests/QtAutogen/rccDepends/res2.qrc.in b/Tests/QtAutogen/rccDepends/res2a.qrc.in index 18b916a..19f34ac 100644 --- a/Tests/QtAutogen/rccDepends/res2.qrc.in +++ b/Tests/QtAutogen/rccDepends/res2a.qrc.in @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/"> + <qresource prefix="/Texts2"> <file>res2/input.txt</file> </qresource> </RCC> diff --git a/Tests/QtAutogen/rccDepends/res2b.qrc.in b/Tests/QtAutogen/rccDepends/res2b.qrc.in new file mode 100644 index 0000000..19e8ba1 --- /dev/null +++ b/Tests/QtAutogen/rccDepends/res2b.qrc.in @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/Texts2"> + <file>res2/input.txt</file> + <file alias="Added">res2/inputAdded.txt</file> + </qresource> +</RCC> diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 0715a1a..73a4965 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -203,6 +203,7 @@ endif() add_RunCMake_test(ctest_start) add_RunCMake_test(ctest_submit) add_RunCMake_test(ctest_test) +add_RunCMake_test(ctest_disabled_test) add_RunCMake_test(ctest_upload) add_RunCMake_test(ctest_fixtures) add_RunCMake_test(file) diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake index bbc358c8..d8012b1 100644 --- a/Tests/RunCMake/CPack/RPM/Helpers.cmake +++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake @@ -36,6 +36,10 @@ function(getPackageContentList FILE RESULT_VAR) OUTPUT_STRIP_TRAILING_WHITESPACE) string(REGEX REPLACE "\n" ";" package_content_ "${package_content_}") + # never versions of rpmbuild (introduced in rpm 4.13.0.1) add build_id links + # to packages - tests should ignore them + list(FILTER package_content_ EXCLUDE REGEX ".*\.build-id.*") + set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) endfunction() diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake index 06e56d3..3d8de74 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -3,14 +3,16 @@ set(whitespaces_ "[\t\n\r ]*") set(EXPECTED_FILES_COUNT "5") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) +set(EXPECTED_FILE_1_NAME "Debuginfo") set(EXPECTED_FILE_1_COMPONENT "applications") set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") -set(EXPECTED_FILE_2 "debuginfo*-headers.rpm") +set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.rpm") set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") -set(EXPECTED_FILE_3 "debuginfo*-libs.rpm") +set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.rpm") set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/libtest_lib.so") +set(EXPECTED_FILE_4_NAME "Debuginfo") set(EXPECTED_FILE_4_COMPONENT "applications-debuginfo") set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") -set(EXPECTED_FILE_5_COMPONENT "libs-debuginfo") +set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm") set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake index 0642d83..f1b6738 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake @@ -25,6 +25,16 @@ install(TARGETS test_lib DESTINATION bas COMPONENT libs) set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON) + +# test that components with debuginfo enabled still honor +# CPACK_PACKAGE_FILE_NAME setting +set(CPACK_RPM_PACKAGE_NAME "Debuginfo") +set(CPACK_PACKAGE_FILE_NAME "TestDinfo-pkg") set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON) +# test debuginfo package rename +set(CPACK_RPM_DEBUGINFO_FILE_NAME + "@cpack_component@-DebugInfoPackage.rpm") +set(CPACK_RPM_APPLICATIONS_DEBUGINFO_FILE_NAME "RPM-DEFAULT") + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/src") diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake index bc54d79..73d7481 100644 --- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake @@ -21,7 +21,9 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --define "_topdir ${CMAKE_CURRENT set(output_error_message_ "\n${RPMBUILD_EXECUTABLE} error: '${error_}';\nresult: '${result_}';\n${output_error_message}") -set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog$") +# expected file content are test_prog and optional build-id links that are +# generated by rpmbuild (introduced in rpm 4.13.0.1) +set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog(${whitespaces_}.*\.build-id.*)*$") file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm") list(APPEND foundFiles_ "${FOUND_FILE_}") diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index ae32134..dcfbd2d 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -4,11 +4,17 @@ enable_language(C) add_library(Framework ${FRAMEWORK_TYPE} foo.c foo.h - res.txt) + res.txt + flatresource.txt + deepresource.txt + some.txt) set_target_properties(Framework PROPERTIES FRAMEWORK TRUE PUBLIC_HEADER foo.h RESOURCE "res.txt") +set_source_files_properties(flatresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources) +set_source_files_properties(deepresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources/deep) +set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir) add_custom_command(TARGET Framework POST_BUILD COMMAND /usr/bin/file $<TARGET_FILE:Framework>) diff --git a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake index da1ccb4..1a543d8 100644 --- a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake @@ -1,8 +1,11 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") set(framework-resources "${framework-dir}/Resources") set(framework-resource-file "${framework-resources}/res.txt") +set(framework-flat-resource-file "${framework-resources}/flatresource.txt") +set(framework-deep-resource-file "${framework-resources}/deep/deepresource.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") +set(framework-some-file "${framework-versions}/Current/somedir/some.txt") set(plist-file "${framework-resources}/Info.plist") set(framework-header "${framework-dir}/Headers/foo.h") @@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file}) message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") endif() +if(NOT EXISTS ${framework-flat-resource-file}) + message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}") +endif() + +if(NOT EXISTS ${framework-deep-resource-file}) + message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}") +endif() + +if(NOT EXISTS ${framework-some-file}) + message(SEND_ERROR "Framework some file not found at ${framework-some-file}") +endif() + if(NOT EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions not found at ${framework-versions}") endif() diff --git a/Tests/RunCMake/Framework/deepresource.txt b/Tests/RunCMake/Framework/deepresource.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Framework/deepresource.txt diff --git a/Tests/RunCMake/Framework/flatresource.txt b/Tests/RunCMake/Framework/flatresource.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Framework/flatresource.txt diff --git a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake index b81a5f7..e068a3a 100644 --- a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake @@ -1,6 +1,9 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") set(framework-resources "${framework-dir}/Resources") set(framework-resource-file "${framework-dir}/res.txt") +set(framework-flat-resource-file "${framework-dir}/flatresource.txt") +set(framework-deep-resource-file "${framework-dir}/deep/deepresource.txt") +set(framework-some-file "${framework-dir}/somedir/some.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") set(plist-file "${framework-dir}/Info.plist") @@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file}) message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") endif() +if(NOT EXISTS ${framework-flat-resource-file}) + message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}") +endif() + +if(NOT EXISTS ${framework-deep-resource-file}) + message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}") +endif() + +if(NOT EXISTS ${framework-some-file}) + message(SEND_ERROR "Framework some file not found at ${framework-some-file}") +endif() + if(EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions found at ${framework-versions}") endif() diff --git a/Tests/RunCMake/Framework/some.txt b/Tests/RunCMake/Framework/some.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Framework/some.txt diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 5f66da0..9e2fe7a 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -101,7 +101,7 @@ function(run_cmake test) endif() foreach(o out err) string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}") - string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:|Error kstat returned|[^\n]*is a member of multiple groups|[^\n]*from Time Machine by path|[^\n]*Bullseye Testing Technology)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}") + string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:|Error kstat returned|Hit xcodebuild bug|[^\n]*is a member of multiple groups|[^\n]*from Time Machine by path|[^\n]*Bullseye Testing Technology)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}") string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}") set(expect_${o} "") if(DEFINED expect_std${o}) diff --git a/Tests/RunCMake/ctest_disabled_test/CMakeLists.txt.in b/Tests/RunCMake/ctest_disabled_test/CMakeLists.txt.in new file mode 100644 index 0000000..d34fcac --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/CMakeLists.txt.in @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.7) +project(@CASE_NAME@ NONE) +include(CTest) + +add_test(NAME SuccessfulTest COMMAND "${CMAKE_COMMAND}" --version) +@CASE_CMAKELISTS_SUFFIX_CODE@ diff --git a/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in new file mode 100644 index 0000000..c0d7e42 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in @@ -0,0 +1 @@ +set(CTEST_PROJECT_NAME "@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_disabled_test/DisableAllTests-result.txt b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stderr.txt b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stderr.txt new file mode 100644 index 0000000..eafba1c --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stderr.txt @@ -0,0 +1 @@ +No tests were found!!! diff --git a/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stdout.txt new file mode 100644 index 0000000..6c824f6 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableAllTests-stdout.txt @@ -0,0 +1,2 @@ + Start 1: SuccessfulTest +1/1 Test #1: SuccessfulTest ...................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt new file mode 100644 index 0000000..ee0dc51 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt @@ -0,0 +1,11 @@ + Start 1: SuccessfulTest +1/2 Test #1: SuccessfulTest ................... Passed +[0-9.]+ sec + Start 2: CleanupTest +2/2 Test #2: CleanupTest ......................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 1 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*2 \- CleanupTest diff --git a/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt new file mode 100644 index 0000000..e2c9f92 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt @@ -0,0 +1,9 @@ +50% tests passed, 1 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*3 \- DisabledFailingTest ++ +The following tests FAILED: +.*2 \- FailingTest \(Failed\) diff --git a/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-result.txt b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stderr.txt b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stderr.txt new file mode 100644 index 0000000..83c332b --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stderr.txt @@ -0,0 +1 @@ +Unable to find executable: invalidCommand diff --git a/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt new file mode 100644 index 0000000..d8bf966 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt @@ -0,0 +1,17 @@ + Start 1: SuccessfulTest +1/3 Test #1: SuccessfulTest ................... Passed +[0-9.]+ sec + Start 2: DisabledTest +2/3 Test #2: DisabledTest .....................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec + Start 3: NotRunTest +.* +3/3 Test #3: NotRunTest .......................\*\*\*\Not Run +[0-9.]+ sec ++ +50% tests passed, 1 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*2 \- DisabledTest ++ +The following tests FAILED: +.*3 - NotRunTest \(Not Run\) diff --git a/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt new file mode 100644 index 0000000..886efb8 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt @@ -0,0 +1,13 @@ + Start 1: SuccessfulTest +1/3 Test #1: SuccessfulTest ................... Passed +[0-9.]+ sec + Start 2: DisabledTest +2/3 Test #2: DisabledTest .....................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec + Start 3: SuccessfulCleanupTest +3/3 Test #3: SuccessfulCleanupTest ............ Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*2 \- DisabledTest diff --git a/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt new file mode 100644 index 0000000..dc27950 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt @@ -0,0 +1,13 @@ + Start 2: DisabledTest +1/3 Test #2: DisabledTest .....................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec + Start 1: SuccessfulTest +2/3 Test #1: SuccessfulTest ................... Passed +[0-9.]+ sec + Start 3: SuccessfulCleanupTest +3/3 Test #3: SuccessfulCleanupTest ............ Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*2 \- DisabledTest diff --git a/Tests/RunCMake/ctest_disabled_test/DisabledTest-result.txt b/Tests/RunCMake/ctest_disabled_test/DisabledTest-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisabledTest-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_disabled_test/DisabledTest-stderr.txt b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stderr.txt new file mode 100644 index 0000000..83c332b --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stderr.txt @@ -0,0 +1 @@ +Unable to find executable: invalidCommand diff --git a/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt new file mode 100644 index 0000000..d8bf966 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt @@ -0,0 +1,17 @@ + Start 1: SuccessfulTest +1/3 Test #1: SuccessfulTest ................... Passed +[0-9.]+ sec + Start 2: DisabledTest +2/3 Test #2: DisabledTest .....................\*\*\*\Not Run \(Disabled\) +[0-9.]+ sec + Start 3: NotRunTest +.* +3/3 Test #3: NotRunTest .......................\*\*\*\Not Run +[0-9.]+ sec ++ +50% tests passed, 1 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests are disabled and did not run: +.*2 \- DisabledTest ++ +The following tests FAILED: +.*3 - NotRunTest \(Not Run\) diff --git a/Tests/RunCMake/ctest_disabled_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_disabled_test/RunCMakeTest.cmake new file mode 100644 index 0000000..12541c4 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/RunCMakeTest.cmake @@ -0,0 +1,89 @@ +include(RunCTest) + +function(run_DisableNotRunTest) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_test(NAME DisabledTest COMMAND notACommand --version) +add_test(NAME NotRunTest COMMAND invalidCommand --version) + +set_tests_properties(SuccessfulTest PROPERTIES DISABLED false) +set_tests_properties(DisabledTest PROPERTIES DISABLED true) + ]]) + run_ctest(DisableNotRunTest) +endfunction() +run_DisableNotRunTest() + +function(run_DisableFailingTest) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +set(someFile "${CMAKE_CURRENT_SOURCE_DIR}/test.cmake") +add_test(NAME FailingTest + COMMAND ${CMAKE_COMMAND} -E compare_files "${someFile}" "${someFile}xxx") +add_test(NAME DisabledFailingTest + COMMAND ${CMAKE_COMMAND} -E compare_files "${someFile}" "${someFile}xxx") + +set_tests_properties(FailingTest PROPERTIES DISABLED false) +set_tests_properties(DisabledFailingTest PROPERTIES DISABLED true) + ]]) + run_ctest(DisableFailingTest) +endfunction() +run_DisableFailingTest() + +function(run_DisableSetupTest) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_test(NAME DisabledTest COMMAND "${CMAKE_COMMAND}" --version) +add_test(NAME SuccessfulCleanupTest COMMAND "${CMAKE_COMMAND}" --version) + +set_tests_properties(DisabledTest PROPERTIES DISABLED true + FIXTURES_SETUP "Foo") +set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_REQUIRED "Foo") +set_tests_properties(SuccessfulCleanupTest PROPERTIES FIXTURES_CLEANUP "Foo") + ]]) +run_ctest(DisableSetupTest) +endfunction() +run_DisableSetupTest() + +function(run_DisableRequiredTest) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_test(NAME DisabledTest COMMAND "${CMAKE_COMMAND}" --version) +add_test(NAME SuccessfulCleanupTest COMMAND "${CMAKE_COMMAND}" --version) + +set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_SETUP "Foo") +set_tests_properties(DisabledTest PROPERTIES DISABLED true + FIXTURES_REQUIRED "Foo") +set_tests_properties(SuccessfulCleanupTest PROPERTIES FIXTURES_CLEANUP "Foo") + ]]) +run_ctest(DisableRequiredTest) +endfunction() +run_DisableRequiredTest() + +function(run_DisableCleanupTest) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_test(NAME CleanupTest COMMAND "${CMAKE_COMMAND}" --version) + +set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_REQUIRED "Foo") +set_tests_properties(CleanupTest PROPERTIES DISABLED true + FIXTURES_CLEANUP "Foo") + ]]) +run_ctest(DisableCleanupTest) +endfunction() +run_DisableCleanupTest() + +# Consider a fixture that has a setup test, a cleanup test and a disabled test +# which requires that fixture. Limit the test list with a regular expression +# that matches the disabled test but not the setup or cleanup tests, so the +# initial set of tests to be executed contains just the disabled test. Since +# the only test requiring the fixture is disabled, CTest should not +# automatically add in the setup and cleanup tests for the fixture, since no +# enabled test requires them. +function(run_DisableAllTests) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_test(NAME SetupTest COMMAND "${CMAKE_COMMAND}" --version) +add_test(NAME CleanupTest COMMAND "${CMAKE_COMMAND}" --version) + +set_tests_properties(SetupTest PROPERTIES FIXTURES_SETUP "Foo") +set_tests_properties(SuccessfulTest PROPERTIES DISABLED true + FIXTURES_REQUIRED "Foo") +set_tests_properties(CleanupTest PROPERTIES FIXTURES_CLEANUP "Foo") + ]]) +run_ctest(DisableAllTests -R Successful) +endfunction() +run_DisableAllTests() diff --git a/Tests/RunCMake/ctest_disabled_test/test.cmake.in b/Tests/RunCMake/ctest_disabled_test/test.cmake.in new file mode 100644 index 0000000..ca23c83 --- /dev/null +++ b/Tests/RunCMake/ctest_disabled_test/test.cmake.in @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.7) + +set(CTEST_SITE "test-site") +set(CTEST_BUILD_NAME "test-build-name") +set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@") +set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build") +set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") +set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") + +set(ctest_test_args "@CASE_CTEST_TEST_ARGS@") +ctest_start(Experimental) +ctest_configure() +ctest_build() +ctest_test(${ctest_test_args}) diff --git a/Tests/RunCMake/file/INSTALL-SYMLINK-stdout.txt b/Tests/RunCMake/file/INSTALL-SYMLINK-stdout.txt new file mode 100644 index 0000000..9fb8e10 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-SYMLINK-stdout.txt @@ -0,0 +1,3 @@ +-- Before Installing +-- Installing: .*/Tests/RunCMake/file/INSTALL-SYMLINK-build/dst/current_dir_symlink +-- After Installing diff --git a/Tests/RunCMake/file/INSTALL-SYMLINK.cmake b/Tests/RunCMake/file/INSTALL-SYMLINK.cmake new file mode 100644 index 0000000..5a4284a --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-SYMLINK.cmake @@ -0,0 +1,13 @@ +set(src "${CMAKE_CURRENT_BINARY_DIR}/src") +set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst") +file(REMOVE RECURSE "${src}") +file(REMOVE RECURSE "${dst}") + +file(MAKE_DIRECTORY "${src}") +execute_process(COMMAND + ${CMAKE_COMMAND} -E create_symlink source "${src}/current_dir_symlink") + +message(STATUS "Before Installing") +file(INSTALL FILES "${src}/current_dir_symlink" + DESTINATION ${dst} TYPE DIRECTORY) +message(STATUS "After Installing") diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 3f3c0da..63cbdd9 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -36,4 +36,5 @@ run_cmake(GLOB-noexp-LIST_DIRECTORIES) if(NOT WIN32 OR CYGWIN) run_cmake(GLOB_RECURSE-cyclic-recursion) + run_cmake(INSTALL-SYMLINK) endif() diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 4cf7355..f8068b1 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -365,6 +365,7 @@ set(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install") set(CMAKE_INSTALL_MFC_LIBRARIES 1) set(CMAKE_INSTALL_DEBUG_LIBRARIES 1) set(CMAKE_INSTALL_UCRT_LIBRARIES 1) +set(CMAKE_INSTALL_OPENMP_LIBRARIES 1) include(InstallRequiredSystemLibraries) if(CTEST_TEST_CPACK) diff --git a/Tests/SwiftMix/ObjCMain.m b/Tests/SwiftMix/ObjCMain.m index 7fa90ae..20f0bf1 100644 --- a/Tests/SwiftMix/ObjCMain.m +++ b/Tests/SwiftMix/ObjCMain.m @@ -1,4 +1,4 @@ #import "SwiftMix-Swift.h" int ObjCMain(int argc, char const* const argv[]) { - return [SwiftMainClass SwiftMain:argc argv:argv]; + return [SwiftMainClass SwiftMain]; } diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift index 3629ac8..a4a0a62 100644 --- a/Tests/SwiftMix/SwiftMain.swift +++ b/Tests/SwiftMix/SwiftMain.swift @@ -1,12 +1,8 @@ import Foundation @objc class SwiftMainClass : NSObject { - class func SwiftMain(argc:Int, argv:UnsafePointer<UnsafePointer<CChar>>) -> Int32 { - dump("argc: \(argc)") - for (var i = 0; i < argc; ++i) { - let argi = String.fromCString(argv[i]) - dump("arg[\(i)]: \(argi)"); - } + class func SwiftMain() -> Int32 { + dump("Hello World!"); return 0; } } diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index ee1a0dc..b2c21b7 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -40,7 +40,8 @@ elseif(CMAKE_CREATE_VERSION STREQUAL "nightly") set(GIT_FETCH "${GIT_COMMAND} fetch origin refs/${nightly}:refs/remotes/origin/${nightly}") set(GIT_BRANCH origin/${nightly}) else() - set(GIT_FETCH "") + set(stage stage/master/head) + set(GIT_FETCH "${GIT_COMMAND} fetch origin refs/${stage}:refs/remotes/origin/${stage}") set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) endif() diff --git a/Utilities/Scripts/update-kwsys.bash b/Utilities/Scripts/update-kwsys.bash index 83da8a4..d5485aa 100755 --- a/Utilities/Scripts/update-kwsys.bash +++ b/Utilities/Scripts/update-kwsys.bash @@ -15,6 +15,7 @@ readonly paths=" extract_source () { git_archive + disable_custom_gitattributes } export HOOKS_ALLOW_KWSYS=1 diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash index 3b8358e..670946e 100644 --- a/Utilities/Scripts/update-third-party.bash +++ b/Utilities/Scripts/update-third-party.bash @@ -52,6 +52,14 @@ git_archive () { tar -C "$extractdir" -x } +disable_custom_gitattributes() { + pushd "${extractdir}/${name}-reduced" + # Git does not allow custom attributes in a subdirectory where we + # are about to merge the `.gitattributes` file, so disable them. + sed -i '/^\[attr\]/ {s/^/#/}' .gitattributes + popd +} + die () { echo >&2 "$@" exit 1 diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index e3afc78..7878ad2 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -54,6 +54,26 @@ html_show_sourcelink = True html_static_path = ['@conf_path@/static'] html_style = 'cmake.css' html_theme = 'default' +html_theme_options = { + 'footerbgcolor': '#00182d', + 'footertextcolor': '#ffffff', + 'sidebarbgcolor': '#e4ece8', + 'sidebarbtncolor': '#00a94f', + 'sidebartextcolor': '#333333', + 'sidebarlinkcolor': '#00a94f', + 'relbarbgcolor': '#00529b', + 'relbartextcolor': '#ffffff', + 'relbarlinkcolor': '#ffffff', + 'bgcolor': '#ffffff', + 'textcolor': '#444444', + 'headbgcolor': '#f2f2f2', + 'headtextcolor': '#003564', + 'headlinkcolor': '#3d8ff2', + 'linkcolor': '#2b63a8', + 'visitedlinkcolor': '#2b63a8', + 'codebgcolor': '#eeeeee', + 'codetextcolor': '#333333', +} html_title = 'CMake %s Documentation' % release html_short_title = '%s Documentation' % release html_favicon = '@conf_path@/static/cmake-favicon.ico' |