diff options
-rw-r--r-- | Help/release/dev/UseSWIG-SWIG_OUTFILE_DIR.rst | 6 | ||||
-rw-r--r-- | Modules/CPackDeb.cmake | 2 | ||||
-rw-r--r-- | Modules/CPackRPM.cmake | 6 | ||||
-rw-r--r-- | Modules/Platform/Darwin-Initialize.cmake | 8 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 24 | ||||
-rw-r--r-- | Modules/UseSWIG.cmake | 16 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmRulePlaceholderExpander.cxx | 2 |
8 files changed, 27 insertions, 39 deletions
diff --git a/Help/release/dev/UseSWIG-SWIG_OUTFILE_DIR.rst b/Help/release/dev/UseSWIG-SWIG_OUTFILE_DIR.rst new file mode 100644 index 0000000..c001a88 --- /dev/null +++ b/Help/release/dev/UseSWIG-SWIG_OUTFILE_DIR.rst @@ -0,0 +1,6 @@ +UseSWIG-SWIG_OUTFILE_DIR +------------------------ + +* The :module:`UseSWIG` module ``swig_add_source_to_module`` command + learned a new ``SWIG_OUTFILE_DIR`` option to control the output + file location (``swig -o``). diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 4a7a6b8..909a12b 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -34,7 +34,7 @@ # # List of CPackDEB specific variables: # -# .. variable:: CPACK_DEB_PACKAGE_COMPONENT +# .. variable:: CPACK_DEB_COMPONENT_INSTALL # # Enable component packaging for CPackDEB # diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 6017ce3..2483a13 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -45,7 +45,7 @@ # # List of CPackRPM specific variables: # -# .. variable:: CPACK_RPM_PACKAGE_COMPONENT +# .. variable:: CPACK_RPM_COMPONENT_INSTALL # # Enable component packaging for CPackRPM # @@ -472,7 +472,7 @@ # May be used to embed a pre (un)installation script in the spec file. # The referred script file (or both) will be read and directly # put after the ``%pre`` or ``%preun`` section -# If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install +# If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install # script for each component can be overridden with # ``CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE`` and # ``CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE``. @@ -491,7 +491,7 @@ # May be used to embed a post (un)installation script in the spec file. # The referred script file (or both) will be read and directly # put after the ``%post`` or ``%postun`` section. -# If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install +# If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install # script for each component can be overridden with # ``CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE`` and # ``CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE``. diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 39374e1..b539e45 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -113,7 +113,6 @@ set(CMAKE_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_DEFAULT}" CACHE ${_CMAKE_OSX_SYSROOT "The product will be built against the headers and libraries located inside the indicated SDK.") # Transform the cached value to something we can use. -set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") set(_CMAKE_OSX_SYSROOT_PATH "") if(CMAKE_OSX_SYSROOT) if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") @@ -122,13 +121,10 @@ if(CMAKE_OSX_SYSROOT) message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n ${CMAKE_OSX_SYSROOT}\n" "because the directory does not exist.") set(CMAKE_OSX_SYSROOT "") - set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - endif() - - if(CMAKE_OSX_SYSROOT) - # Transform the (maybe unversioned) sysroot into a versioned path. + else() + # Transform the sdk name into a path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index c09bac4..727baa6 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -64,30 +64,6 @@ if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) mark_as_advanced(CMAKE_INSTALL_NAME_TOOL) endif() -# Make sure the combination of SDK and Deployment Target are allowed -if(CMAKE_OSX_DEPLOYMENT_TARGET) - if("${_CMAKE_OSX_SYSROOT_PATH}" MATCHES "/MacOSX([0-9]+\\.[0-9]+)[^/]*\\.sdk") - set(_sdk_ver "${CMAKE_MATCH_1}") - elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$") - set(_sdk_ver "${CMAKE_MATCH_1}") - elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/") - set(_sdk_ver "${_CURRENT_OSX_VERSION}") - else() - message(FATAL_ERROR - "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' " - "but CMAKE_OSX_SYSROOT:\n \"${_CMAKE_OSX_SYSROOT_ORIG}\"\n" - "is not set to a MacOSX SDK with a recognized version. " - "Either set CMAKE_OSX_SYSROOT to a valid SDK or set " - "CMAKE_OSX_DEPLOYMENT_TARGET to empty.") - endif() - if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER "${_sdk_ver}") - message(FATAL_ERROR - "CMAKE_OSX_DEPLOYMENT_TARGET (${CMAKE_OSX_DEPLOYMENT_TARGET}) " - "is greater than CMAKE_OSX_SYSROOT SDK:\n ${_CMAKE_OSX_SYSROOT_ORIG}\n" - "Please set CMAKE_OSX_DEPLOYMENT_TARGET to ${_sdk_ver} or lower.") - endif() -endif() - # Enable shared library versioning. set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index d242f87..2df0011 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -36,8 +36,11 @@ # # CMAKE_SWIG_FLAGS can be used to add special flags to all swig calls. # -# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify -# where to write all the swig generated module (swig -outdir option) +# CMAKE_SWIG_OUTDIR allows one to specify where to write +# the language specific files (swig -outdir option). +# +# SWIG_OUTFILE_DIR allows one to specify where to write the output file +# (swig -o option). If not specified, CMAKE_SWIG_OUTDIR is used. # # The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra # dependencies for the generated modules. @@ -142,6 +145,13 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) else() set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) endif() + + if(SWIG_OUTFILE_DIR) + set(swig_outfile_dir ${SWIG_OUTFILE_DIR}) + else() + set(swig_outfile_dir ${swig_outdir}) + endif() + if (NOT SWIG_MODULE_${name}_NOPROXY) SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} swig_extra_generated_files @@ -149,7 +159,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) "${swig_source_file_fullname}") endif() set(swig_generated_file_fullname - "${swig_outdir}/${swig_source_file_name_we}") + "${swig_outfile_dir}/${swig_source_file_name_we}") # add the language into the name of the file (i.e. TCL_wrap) # this allows for the same .i file to be wrapped into different languages string(APPEND swig_generated_file_fullname diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 69b4afd..891a011 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 7) -set(CMake_VERSION_PATCH 20161101) +set(CMake_VERSION_PATCH 20161102) #set(CMake_VERSION_RC 1) diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx index 361321e..75ac54d 100644 --- a/Source/cmRulePlaceholderExpander.cxx +++ b/Source/cmRulePlaceholderExpander.cxx @@ -212,7 +212,7 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable( std::string ret = outputConverter->ConvertToOutputForExisting( this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = - this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_ARG1"]; std::string const& compilerTarget = this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; std::string const& compilerOptionTarget = |