diff options
-rw-r--r-- | Help/release/dev/FindwxWidgets-updates.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/cpack-deb-component-dependencies.rst | 12 | ||||
-rw-r--r-- | Help/release/dev/mingw-compile-features-C.rst | 5 | ||||
-rw-r--r-- | Modules/CMakeCInformation.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 2 | ||||
-rw-r--r-- | Modules/CPackDeb.cmake | 76 | ||||
-rw-r--r-- | Modules/Compiler/GNU-C.cmake | 4 | ||||
-rw-r--r-- | Modules/FindwxWidgets.cmake | 39 | ||||
-rw-r--r-- | Modules/Platform/GHS-MULTI-Initialize.cmake | 36 | ||||
-rw-r--r-- | Modules/Platform/Windows-GNU.cmake | 2 | ||||
-rw-r--r-- | Modules/UseSWIG.cmake | 10 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 23 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake | 33 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake | 16 | ||||
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 8 |
17 files changed, 214 insertions, 62 deletions
diff --git a/Help/release/dev/FindwxWidgets-updates.rst b/Help/release/dev/FindwxWidgets-updates.rst new file mode 100644 index 0000000..aa470f2 --- /dev/null +++ b/Help/release/dev/FindwxWidgets-updates.rst @@ -0,0 +1,4 @@ +FindwxWidgets-updates +--------------------- + +* The :module:`FindwxWidgets` module learned to support version requests. diff --git a/Help/release/dev/cpack-deb-component-dependencies.rst b/Help/release/dev/cpack-deb-component-dependencies.rst new file mode 100644 index 0000000..2714222 --- /dev/null +++ b/Help/release/dev/cpack-deb-component-dependencies.rst @@ -0,0 +1,12 @@ +cpack-deb-component-dependencies +-------------------------------- + +* The :module:`CPackDeb` module learned to set package dependencies + per component. See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES`, + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS` and + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS`. diff --git a/Help/release/dev/mingw-compile-features-C.rst b/Help/release/dev/mingw-compile-features-C.rst new file mode 100644 index 0000000..b3f99f1 --- /dev/null +++ b/Help/release/dev/mingw-compile-features-C.rst @@ -0,0 +1,5 @@ +mingw-compile-features-C +------------------------ + +* The :manual:`Compile Features <cmake-compile-features(7)>` functionality + is now aware of features supported by GNU C compilers on Windows. diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 7bcbb19..d2417aa 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -175,7 +175,7 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_C_ARCHIVE_CREATE) - set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_C_ARCHIVE_APPEND) set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 1aac9d3..091627b 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -266,7 +266,7 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE) - set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND) set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 835ffcf..79393d3 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -194,7 +194,7 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE) - set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND) set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 75e9966..6c94d8e 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -78,6 +78,7 @@ # # set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)") # +# # .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER # # The Debian package maintainer @@ -164,6 +165,7 @@ # * Default : - # # .. variable:: CPACK_DEBIAN_PACKAGE_PREDEPENDS +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS # # Sets the `Pre-Depends` field of the Debian package. # Like :variable:`Depends <CPACK_DEBIAN_PACKAGE_DEPENDS>`, except that it @@ -172,11 +174,16 @@ # pre-dependency. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_PREDEPENDS` for component-based +# installations. # # See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # .. variable:: CPACK_DEBIAN_PACKAGE_ENHANCES +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES # # Sets the `Enhances` field of the Debian package. # Similar to :variable:`Suggests <CPACK_DEBIAN_PACKAGE_SUGGESTS>` but works @@ -184,11 +191,16 @@ # functionality of another package. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_ENHANCES` for component-based +# installations. # # See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # .. variable:: CPACK_DEBIAN_PACKAGE_BREAKS +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS # # Sets the `Breaks` field of the Debian package. # When a binary package (P) declares that it breaks other packages (B), @@ -199,12 +211,17 @@ # packages (B) cannot be reconfigured again. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_BREAKS` for component-based +# installations. # # See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks # # # .. variable:: CPACK_DEBIAN_PACKAGE_CONFLICTS +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS # # Sets the `Conflicts` field of the Debian package. # When one binary package declares a conflict with another using a `Conflicts` @@ -212,7 +229,11 @@ # the same time. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_CONFLICTS` for component-based +# installations. # # See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts # @@ -225,48 +246,68 @@ # time. # # .. variable:: CPACK_DEBIAN_PACKAGE_PROVIDES +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES # # Sets the `Provides` field of the Debian package. # A virtual package is one which appears in the `Provides` control field of # another package. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_PROVIDES` for component-based +# installations. # # See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual # # # .. variable:: CPACK_DEBIAN_PACKAGE_REPLACES +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES # # Sets the `Replaces` field of the Debian package. # Packages can declare in their control file that they should overwrite # files in certain other packages, or completely replace other packages. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_REPLACES` for component-based +# installations. # # See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # # .. variable:: CPACK_DEBIAN_PACKAGE_RECOMMENDS +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS # # Sets the `Recommends` field of the Debian package. # Allows packages to declare a strong, but not absolute, dependency on other # packages. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_RECOMMENDS` for component-based +# installations. # # See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # # .. variable:: CPACK_DEBIAN_PACKAGE_SUGGESTS +# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS # # Sets the `Suggests` field of the Debian package. # Allows packages to declare a suggested package install grouping. # # * Mandatory : NO -# * Default : - +# * Default : +# +# - An empty string for non-component based installations +# - :variable:`CPACK_DEBIAN_PACKAGE_SUGGESTS` for component-based +# installations. # # See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # @@ -496,18 +537,21 @@ function(cpack_deb_prepare_package_vars) # You should set: DEBIAN_PACKAGE_DEPENDS # TODO: automate 'objdump -p | grep NEEDED' - # if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_DEPENDS + # if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_${dependency_type_} # automatic dependency discovery will be performed afterwards. if(CPACK_DEB_PACKAGE_COMPONENT) - set(_component_depends_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_DEPENDS") + foreach(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES) + set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${dependency_type_}") - # if set, overrides the global dependency - if(DEFINED ${_component_depends_var}) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${${_component_depends_var}}") - if(CPACK_DEBIAN_PACKAGE_DEBUG) - message("CPackDeb Debug: component '${_local_component_name}' dependencies set to '${CPACK_DEBIAN_PACKAGE_DEPENDS}'") + # if set, overrides the global dependency + if(DEFINED ${_component_var}) + set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${${_component_var}}") + if(CPACK_DEBIAN_PACKAGE_DEBUG) + message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_}" + "dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_}}'") + endif() endif() - endif() + endforeach() endif() # at this point, the CPACK_DEBIAN_PACKAGE_DEPENDS is properly set diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 89704e6..031ab73 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -34,10 +34,10 @@ macro(cmake_record_c_compile_features) endmacro() set(_result 0) - if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) _get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) endif() - if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) if (_result EQUAL 0) _get_gcc_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) endif() diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 9a70678..54a74f6 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -302,6 +302,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Find wxWidgets multilib base libraries. find_library(WX_base${_DBG} NAMES + wxbase31${_UCD}${_DBG} wxbase30${_UCD}${_DBG} wxbase29${_UCD}${_DBG} wxbase28${_UCD}${_DBG} @@ -315,6 +316,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") foreach(LIB net odbc xml) find_library(WX_${LIB}${_DBG} NAMES + wxbase31${_UCD}${_DBG}_${LIB} wxbase30${_UCD}${_DBG}_${LIB} wxbase29${_UCD}${_DBG}_${LIB} wxbase28${_UCD}${_DBG}_${LIB} @@ -330,6 +332,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Find wxWidgets monolithic library. find_library(WX_mono${_DBG} NAMES + wxmsw${_UNV}31${_UCD}${_DBG} wxmsw${_UNV}30${_UCD}${_DBG} wxmsw${_UNV}29${_UCD}${_DBG} wxmsw${_UNV}28${_UCD}${_DBG} @@ -346,6 +349,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") stc ribbon propgrid webview) find_library(WX_${LIB}${_DBG} NAMES + wxmsw${_UNV}31${_UCD}${_DBG}_${LIB} wxmsw${_UNV}30${_UCD}${_DBG}_${LIB} wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} @@ -386,7 +390,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Clear wxWidgets multilib libraries. foreach(LIB core adv aui html media xrc dbgrid gl qa richtext - stc ribbon propgrid) + webview stc ribbon propgrid) WX_CLEAR_LIB(WX_${LIB}${_DBG}) endforeach() endmacro() @@ -741,7 +745,7 @@ else() #----------------------------------------------------------------- # Support cross-compiling, only search in the target platform. find_program(wxWidgets_CONFIG_EXECUTABLE - NAMES wx-config wx-config-3.0 wx-config-2.9 wx-config-2.8 + NAMES wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8 DOC "Location of wxWidgets library configuration provider binary (wx-config)." ONLY_CMAKE_FIND_ROOT_PATH ) @@ -857,6 +861,28 @@ else() endif() endif() +# Check if a specfic version was requested by find_package(). +if(wxWidgets_FOUND) + find_file(_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH) + dbg_msg("_filename: ${_filename}") + + if(NOT _filename) + message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.") + endif() + + file(READ ${_filename} _wx_version_h) + + string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*" + "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" ) + string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*" + "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" ) + string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*" + "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" ) + set(wxWidgets_VERSION_STRING + "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" ) + dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}") +endif() + # Debug output: DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}") @@ -867,10 +893,13 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") #===================================================================== #===================================================================== + include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND) -# Maintain consistency with all other variables. -set(wxWidgets_FOUND ${WXWIDGETS_FOUND}) + +find_package_handle_standard_args(wxWidgets + REQUIRED_VARS wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS + VERSION_VAR wxWidgets_VERSION_STRING + ) #===================================================================== # Macros for use in wxWidgets apps. diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Initialize.cmake index 342ad21..9eb7a8a 100644 --- a/Modules/Platform/GHS-MULTI-Initialize.cmake +++ b/Modules/Platform/GHS-MULTI-Initialize.cmake @@ -13,13 +13,35 @@ # License text for the above reference.) #Setup Greenhills MULTI specific compilation information -find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122 - "C:/ghs/int1122" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104 - "C:/ghs/int1104" - DOC "Path to integrity directory" - ) + +if (NOT GHS_INT_DIRECTORY) + #Assume the C:/ghs/int#### directory that is latest is prefered + set(GHS_EXPECTED_ROOT "C:/ghs") + if (EXISTS ${GHS_EXPECTED_ROOT}) + FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE + ${GHS_EXPECTED_ROOT} ${GHS_EXPECTED_ROOT}/*) + string(REGEX MATCHALL "int[0-9][0-9][0-9][0-9]" GHS_CANDIDATE_INT_DIRS + ${GHS_CANDIDATE_INT_DIRS}) + if (GHS_CANDIDATE_INT_DIRS) + list(SORT GHS_CANDIDATE_INT_DIRS) + list(GET GHS_CANDIDATE_INT_DIRS -1 GHS_INT_DIRECTORY) + string(CONCAT GHS_INT_DIRECTORY ${GHS_EXPECTED_ROOT} "/" + ${GHS_INT_DIRECTORY}) + endif () + endif () + + #Try to look for known registry values + if (NOT GHS_INT_DIRECTORY) + find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122 + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104 + ) + endif () + + set(GHS_INT_DIRECTORY ${GHS_INT_DIRECTORY} CACHE PATH + "Path to integrity directory") +endif () + set(GHS_OS_DIR ${GHS_INT_DIRECTORY} CACHE PATH "OS directory") set(GHS_PRIMARY_TARGET "arm_integrity.tgt" CACHE STRING "target for compilation") set(GHS_BSP_NAME "simarm" CACHE STRING "BSP name") diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index b97409c..d8a423e 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -65,7 +65,7 @@ macro(__windows_compiler_gnu lang) if(MSYS OR MINGW) # Create archiving rules to support large object file lists for static libraries. - set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_${lang}_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>") diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 96b0b35..d757f65 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -153,10 +153,12 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) else() set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) endif() - SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} - swig_extra_generated_files - "${swig_outdir}" - "${swig_source_file_fullname}") + if (NOT SWIG_MODULE_${name}_NOPROXY) + SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} + swig_extra_generated_files + "${swig_outdir}" + "${swig_source_file_fullname}") + endif() set(swig_generated_file_fullname "${swig_outdir}/${swig_source_file_name_we}") # add the language into the name of the file (i.e. TCL_wrap) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5cf6ae9..42d6955 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 3) -set(CMake_VERSION_PATCH 20150909) +set(CMake_VERSION_PATCH 20150910) #set(CMake_VERSION_RC 1) diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 846b6e2..cae5c2f 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -151,10 +151,6 @@ void cmGhsMultiTargetGenerator::Generate() this->WriteTargetLinkLibraries(); } this->WriteCustomCommands(); - if (this->DynamicDownload) - { - *this->GetFolderBuildStreams() << " " << this->DDOption << std::endl; - } this->WriteSources(objectSources); } @@ -230,9 +226,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config, } if (this->IsTargetGroup()) { - *this->GetFolderBuildStreams() << " -non_shared" << std::endl; - *this->GetFolderBuildStreams() << " -o \"" << outputDir - << outputFilename << ".elf\"" + *this->GetFolderBuildStreams() + << " {optgroup=GhsCommonOptions} -o \"" << outputDir + << outputFilename << ".elf\"" << std::endl; + *this->GetFolderBuildStreams() << " :extraOutputFile=\"" << outputDir + << outputFilename << ".elf.ael\"" << std::endl; } else @@ -454,14 +452,17 @@ void cmGhsMultiTargetGenerator::WriteSources( this->Makefile->GetHomeOutputDirectory(), sgPath, GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath); - if ((*si)->GetExtension() == ".int") + std::string fullSourcePath((*si)->GetFullPath()); + if ((*si)->GetExtension() == "int" || (*si)->GetExtension() == "bsp") { - *this->FolderBuildStreams[sgPath] << "\"" << (*si)->GetFullPath() << "\"" - << std::endl; + *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl; } else { - *this->FolderBuildStreams[sgPath] << (*si)->GetFullPath() << std::endl; + //WORKAROUND: GHS MULTI needs the path to use backslashes without quotes + // to open files in search as of version 6.1.6 + cmsys::SystemTools::ReplaceString(fullSourcePath, "/", "\\"); + *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl; } if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() && diff --git a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake index 44c862d..ba39f2e 100644 --- a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake +++ b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake @@ -1,4 +1,4 @@ -function(checkDepends_ FILE REGEX) +function(checkDependencies_ FILE REGEX) set(whitespaces_ "[\t\n\r ]*") getPackageInfo("${FILE}" "FILE_INFO_") @@ -7,9 +7,28 @@ function(checkDepends_ FILE REGEX) endif() endfunction() -checkDepends_("${FOUND_FILE_1}" ".*Depends${whitespaces_}:${whitespaces_}depend-application, depend-application-b.*") -# use wildcard as we are using dependency auto detection -checkDepends_("${FOUND_FILE_2}" ".*Depends${whitespaces_}:${whitespaces_}.*depend-application, depend-application-b.*") -checkDepends_("${FOUND_FILE_3}" ".*Depends${whitespaces_}:${whitespaces_}depend-headers.*") -checkDepends_("${FOUND_FILE_4}" ".*Depends${whitespaces_}:${whitespaces_}depend-default, depend-default-b.*") -checkDepends_("${FOUND_FILE_5}" ".*Depends${whitespaces_}:${whitespaces_}depend-default, depend-default-b.*") +foreach(dependency_type_ DEPENDS CONFLICTS ENHANCES BREAKS REPLACES RECOMMENDS SUGGESTS) + string(TOLOWER "${dependency_type_}" lower_dependency_type_) + string(SUBSTRING ${lower_dependency_type_} 1 -1 lower_dependency_type_tail_) + string(SUBSTRING ${dependency_type_} 0 1 dependency_type_head_) + set(dependency_type_name_ "${dependency_type_head_}${lower_dependency_type_tail_}") + + checkDependencies_("${FOUND_FILE_1}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b.*") + checkDependencies_("${FOUND_FILE_2}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}.*${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b.*") + checkDependencies_("${FOUND_FILE_3}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-headers.*") + checkDependencies_("${FOUND_FILE_4}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b.*") + checkDependencies_("${FOUND_FILE_5}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b.*") +endforeach() + +checkDependencies_("${FOUND_FILE_1}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b") +checkDependencies_("${FOUND_FILE_2}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b") +checkDependencies_("${FOUND_FILE_3}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b") +checkDependencies_("${FOUND_FILE_4}" ".*Provides${whitespaces_}:${whitespaces_}provided-lib.*") +checkDependencies_("${FOUND_FILE_5}" ".*Provides${whitespaces_}:${whitespaces_}provided-lib_auto.*, provided-lib_auto-b.*") + +# PREDEPENDS +checkDependencies_("${FOUND_FILE_1}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-application, predepends-application-b.*") +checkDependencies_("${FOUND_FILE_2}" ".*Pre-Depends${whitespaces_}:${whitespaces_}.*predepends-application, predepends-application-b.*") +checkDependencies_("${FOUND_FILE_3}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-headers.*") +checkDependencies_("${FOUND_FILE_4}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-default, predepends-default-b.*") +checkDependencies_("${FOUND_FILE_5}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-default, predepends-default-b.*") diff --git a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake index 9e09428..96a9f14 100644 --- a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake +++ b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake @@ -7,9 +7,15 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS FALSE) # to determine their dependencies and we can not be certain if there will be any set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_SHLIBDEPS TRUE) -set(CPACK_DEBIAN_PACKAGE_DEPENDS "depend-default, depend-default-b") -set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DEPENDS "depend-application, depend-application-b") -set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_DEPENDS "depend-application, depend-application-b") -set(CPACK_DEBIAN_HEADERS_PACKAGE_DEPENDS "depend-headers") +foreach(dependency_type_ DEPENDS CONFLICTS PREDEPENDS ENHANCES BREAKS REPLACES RECOMMENDS SUGGESTS) + string(TOLOWER "${dependency_type_}" lower_dependency_type_) -# TODO add other dependency tests once CPackDeb supports them + set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b") + set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b") + set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b") + set(CPACK_DEBIAN_HEADERS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-headers") +endforeach() + +set(CPACK_DEBIAN_PACKAGE_PROVIDES "provided-default, provided-default-b") +set(CPACK_DEBIAN_LIBS_PACKAGE_PROVIDES "provided-lib") +set(CPACK_DEBIAN_LIBS_AUTO_PACKAGE_PROVIDES "provided-lib_auto, provided-lib_auto-b") diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index d12c73f..39b70c0 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -43,6 +43,14 @@ if(WIN32) set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton") endif() +# Starting with OSX 10.11 there is an unrelated libnetwork library which will +# be picked up during curl configuration. Linking against this library is +# unnecessary and breaks backward compatibility of the resulting binaries +# because libnetwork is unavailable on older OSX versions. +if(APPLE) + set(HAVE_LIBNETWORK 0 CACHE INTERNAL "Do not use libnetwork") +endif(APPLE) + # Disable warnings to avoid changing 3rd party code. if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$") |