diff options
47 files changed, 296 insertions, 219 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake index a4a4a78..7e9fb16 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -65,6 +65,16 @@ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX" AND CMAKE_CXX_COMPILER_ID MATCHES "HP") endif() endif() +# Workaround for short jump tables on PA-RISC +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc") + if(CMAKE_COMPILER_IS_GNUC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-calls") + endif() + if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-calls") + endif() +endif() + # use the ansi CXX compile flag for building cmake if (CMAKE_ANSI_CXXFLAGS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") @@ -74,10 +84,4 @@ if (CMAKE_ANSI_CFLAGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") endif () -# avoid binutils problem with large binaries, e.g. when building CMake in debug mode -# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230 -if (CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL parisc) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--unique=.text._*") -endif () - include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake) diff --git a/Help/command/add_compile_options.rst b/Help/command/add_compile_options.rst index 214f4be..3fe2a33 100644 --- a/Help/command/add_compile_options.rst +++ b/Help/command/add_compile_options.rst @@ -7,15 +7,16 @@ Adds options to the compilation of source files. add_compile_options(<option> ...) -Adds options to the compiler command line for sources in the current -directory and below. This command can be used to add any options, but -alternative commands exist to add preprocessor definitions -(:command:`target_compile_definitions` and :command:`add_definitions`) or -include directories (:command:`target_include_directories` and -:command:`include_directories`). See documentation of the -:prop_tgt:`directory <COMPILE_OPTIONS>` and +Adds options to the compiler command line for targets in the current +directory and below that are added after this command is invoked. +See documentation of the :prop_dir:`directory <COMPILE_OPTIONS>` and :prop_tgt:`target <COMPILE_OPTIONS>` ``COMPILE_OPTIONS`` properties. +This command can be used to add any options, but alternative commands +exist to add preprocessor definitions (:command:`target_compile_definitions` +and :command:`add_definitions`) or include directories +(:command:`target_include_directories` and :command:`include_directories`). + Arguments to ``add_compile_options`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. See the :manual:`cmake-buildsystem(7)` diff --git a/Help/command/add_definitions.rst b/Help/command/add_definitions.rst index 2965c37..a04faf5 100644 --- a/Help/command/add_definitions.rst +++ b/Help/command/add_definitions.rst @@ -7,10 +7,12 @@ Adds -D define flags to the compilation of source files. add_definitions(-DFOO -DBAR ...) -Adds definitions to the compiler command line for sources in the current -directory and below. This command can be used to add any flags, but -it is intended to add preprocessor definitions. Flags -beginning in -D or /D that look like preprocessor definitions are +Adds definitions to the compiler command line for targets in the current +directory and below (whether added before or after this command is invoked). +This command can be used to add any flags, but it is intended to add +preprocessor definitions (see the :command:`add_compile_options` command +to add other flags). +Flags beginning in -D or /D that look like preprocessor definitions are automatically added to the :prop_dir:`COMPILE_DEFINITIONS` directory property for the current directory. Definitions with non-trivial values may be left in the set of flags instead of being converted for reasons of diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index f86f3c5..7c06203 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -35,7 +35,7 @@ variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and property is set to ``ON`` automatically. By default the library file will be created in the build tree directory -corresponding to the source tree directory in which thecommand was +corresponding to the source tree directory in which the command was invoked. See documentation of the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target properties to change this @@ -133,14 +133,17 @@ Creates an :ref:`Interface Library <Interface Libraries>`. An ``INTERFACE`` library target does not directly create build output, though it may have properties set on it and it may be installed, exported and imported. Typically the ``INTERFACE_*`` properties are populated on -the interface target using the :command:`set_property`, -:command:`target_link_libraries(INTERFACE)`, -:command:`target_include_directories(INTERFACE)`, -:command:`target_compile_options(INTERFACE)`, -:command:`target_compile_definitions(INTERFACE)`, -and :command:`target_sources(INTERFACE)` commands, and then it -is used as an argument to :command:`target_link_libraries` like any other -target. +the interface target using the commands: + +* :command:`set_property`, +* :command:`target_link_libraries(INTERFACE)`, +* :command:`target_include_directories(INTERFACE)`, +* :command:`target_compile_options(INTERFACE)`, +* :command:`target_compile_definitions(INTERFACE)`, and +* :command:`target_sources(INTERFACE)`, + +and then it is used as an argument to :command:`target_link_libraries` +like any other target. An ``INTERFACE`` :ref:`Imported Target <Imported Targets>` may also be created with this signature. An ``IMPORTED`` library target references a diff --git a/Help/command/target_compile_options.rst b/Help/command/target_compile_options.rst index 0fdeba6..3362c5d 100644 --- a/Help/command/target_compile_options.rst +++ b/Help/command/target_compile_options.rst @@ -12,8 +12,8 @@ Add compile options to a target. Specify compile options to use when compiling a given target. The named ``<target>`` must have been created by a command such as :command:`add_executable` or :command:`add_library` and must not be an -:prop_tgt:`IMPORTED Target`. If ``BEFORE`` is specified, the content will -be prepended to the property instead of being appended. +:ref:`IMPORTED Target <Imported Targets>`. If ``BEFORE`` is specified, +the content will be prepended to the property instead of being appended. This command can be used to add any options, but alternative commands exist to add preprocessor definitions diff --git a/Help/command/target_sources.rst b/Help/command/target_sources.rst index ff756b4..d6f148d 100644 --- a/Help/command/target_sources.rst +++ b/Help/command/target_sources.rst @@ -12,7 +12,7 @@ Add sources to a target. Specify sources to use when compiling a given target. The named ``<target>`` must have been created by a command such as :command:`add_executable` or :command:`add_library` and must not be an -:prop_tgt:`IMPORTED Target`. +:ref:`IMPORTED Target <Imported Targets>`. The ``INTERFACE``, ``PUBLIC`` and ``PRIVATE`` keywords are required to specify the scope of the following arguments. ``PRIVATE`` and ``PUBLIC`` diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index 1ce9a7e..43f0e97 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -3,7 +3,7 @@ cmake-buildsystem(7) ******************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst index 8ff73a4..9c1d3b9 100644 --- a/Help/manual/cmake-commands.7.rst +++ b/Help/manual/cmake-commands.7.rst @@ -3,7 +3,7 @@ cmake-commands(7) ***************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 8e3dbb8..4259224 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -3,7 +3,7 @@ cmake-compile-features(7) ************************* -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index eea5fc3..0884a59 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -3,7 +3,7 @@ cmake-developer(7) ****************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 981bd84..c47a7c4 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -3,7 +3,7 @@ cmake-generator-expressions(7) ****************************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst index 7f5093f..4bc8c5f 100644 --- a/Help/manual/cmake-generators.7.rst +++ b/Help/manual/cmake-generators.7.rst @@ -3,7 +3,7 @@ cmake-generators(7) ******************* -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst index b83dcad..9c511ca 100644 --- a/Help/manual/cmake-language.7.rst +++ b/Help/manual/cmake-language.7.rst @@ -3,7 +3,7 @@ cmake-language(7) ***************** -.. only:: html or latex +.. only:: html .. contents:: @@ -79,6 +79,10 @@ A CMake Language source file consists of zero or more `Command Invocations`_ separated by newlines and optionally spaces and `Comments`_: +.. raw:: latex + + \begin{small} + .. productionlist:: file: `file_element`* file_element: `command_invocation` `line_ending` | @@ -87,6 +91,10 @@ spaces and `Comments`_: space: <match '[ \t]+'> newline: <match '\n'> +.. raw:: latex + + \end{small} + Note that any source file line not inside `Command Arguments`_ or a `Bracket Comment`_ can end in a `Line Comment`_. @@ -98,6 +106,10 @@ Command Invocations A *command invocation* is a name followed by paren-enclosed arguments separated by whitespace: +.. raw:: latex + + \begin{small} + .. productionlist:: command_invocation: `space`* `identifier` `space`* '(' `arguments` ')' identifier: <match '[A-Za-z_][A-Za-z0-9_]*'> @@ -106,6 +118,10 @@ separated by whitespace: : `separation`* '(' `arguments` ')' separation: `space` | `line_ending` +.. raw:: latex + + \end{small} + For example: .. code-block:: cmake @@ -137,9 +153,17 @@ Command Arguments There are three types of arguments within `Command Invocations`_: +.. raw:: latex + + \begin{small} + .. productionlist:: argument: `bracket_argument` | `quoted_argument` | `unquoted_argument` +.. raw:: latex + + \end{small} + .. _`Bracket Argument`: Bracket Argument @@ -149,6 +173,10 @@ A *bracket argument*, inspired by `Lua`_ long bracket syntax, encloses content between opening and closing "brackets" of the same length: +.. raw:: latex + + \begin{small} + .. productionlist:: bracket_argument: `bracket_open` `bracket_content` `bracket_close` bracket_open: '[' '='{len} '[' @@ -156,6 +184,10 @@ same length: : of the same {len} as the `bracket_open`> bracket_close: ']' '='{len} ']' +.. raw:: latex + + \end{small} + An opening bracket of length *len >= 0* is written ``[`` followed by *len* ``=`` followed by ``[`` and the corresponding closing bracket is written ``]`` followed by *len* ``=`` followed by ``]``. @@ -197,6 +229,10 @@ Quoted Argument A *quoted argument* encloses content between opening and closing double-quote characters: +.. raw:: latex + + \begin{small} + .. productionlist:: quoted_argument: '"' `quoted_element`* '"' quoted_element: <any character except '\' or '"'> | @@ -204,6 +240,10 @@ double-quote characters: : `quoted_continuation` quoted_continuation: '\' `newline` +.. raw:: latex + + \end{small} + Quoted argument content consists of all text between opening and closing quotes. Both `Escape Sequences`_ and `Variable References`_ are evaluated. A quoted argument is always given to the command @@ -246,12 +286,20 @@ An *unquoted argument* is not enclosed by any quoting syntax. It may not contain any whitespace, ``(``, ``)``, ``#``, ``"``, or ``\`` except when escaped by a backslash: +.. raw:: latex + + \begin{small} + .. productionlist:: unquoted_argument: `unquoted_element`+ | `unquoted_legacy` unquoted_element: <any character except whitespace or one of '()#"\'> | : `escape_sequence` unquoted_legacy: <see note in text> +.. raw:: latex + + \end{small} + Unquoted argument content consists of all text in a contiguous block of allowed or escaped characters. Both `Escape Sequences`_ and `Variable References`_ are evaluated. The resulting value is divided @@ -294,12 +342,20 @@ Escape Sequences An *escape sequence* is a ``\`` followed by one character: +.. raw:: latex + + \begin{small} + .. productionlist:: escape_sequence: `escape_identity` | `escape_encoded` | `escape_semicolon` escape_identity: '\' <match '[^A-Za-z0-9;]'> escape_encoded: '\t' | '\r' | '\n' escape_semicolon: '\;' +.. raw:: latex + + \end{small} + A ``\`` followed by a non-alphanumeric character simply encodes the literal character without interpreting it as syntax. A ``\t``, ``\r``, or ``\n`` encodes a tab, carriage return, or newline character, respectively. A ``\;`` @@ -348,9 +404,17 @@ Bracket Comment A ``#`` immediately followed by a `Bracket Argument`_ forms a *bracket comment* consisting of the entire bracket enclosure: +.. raw:: latex + + \begin{small} + .. productionlist:: bracket_comment: '#' `bracket_argument` +.. raw:: latex + + \end{small} + For example: .. code-block:: cmake @@ -371,10 +435,18 @@ Line Comment A ``#`` not immediately followed by a `Bracket Argument`_ forms a *line comment* that runs until the end of the line: +.. raw:: latex + + \begin{small} + .. productionlist:: line_comment: '#' <any text not starting in a `bracket_argument` : and not containing a `newline`> +.. raw:: latex + + \end{small} + For example: .. code-block:: cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 61e4bb4..f5a35b3 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -3,7 +3,7 @@ cmake-modules(7) **************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst index c4cca6d..13e2ba0 100644 --- a/Help/manual/cmake-packages.7.rst +++ b/Help/manual/cmake-packages.7.rst @@ -3,7 +3,7 @@ cmake-packages(7) ***************** -.. only:: html or latex +.. only:: html .. contents:: @@ -282,7 +282,8 @@ shared library: generate_export_header(ClimbingStats) set_property(TARGET ClimbingStats PROPERTY VERSION ${Upstream_VERSION}) set_property(TARGET ClimbingStats PROPERTY SOVERSION 3) - set_property(TARGET ClimbingStats PROPERTY INTERFACE_ClimbingStats_MAJOR_VERSION 3) + set_property(TARGET ClimbingStats PROPERTY + INTERFACE_ClimbingStats_MAJOR_VERSION 3) set_property(TARGET ClimbingStats APPEND PROPERTY COMPATIBLE_INTERFACE_STRING ClimbingStats_MAJOR_VERSION ) @@ -316,7 +317,7 @@ shared library: ) configure_file(cmake/ClimbingStatsConfig.cmake "${CMAKE_CURRENT_BINARY_DIR}/ClimbingStats/ClimbingStatsConfig.cmake" - COPY_ONLY + COPYONLY ) set(ConfigPackageLocation lib/cmake/ClimbingStats) @@ -479,7 +480,7 @@ be true. This can be tested with logic in the package configuration file: foreach(_comp ${ClimbingStats_FIND_COMPONENTS}) if (NOT ";${_supported_components};" MATCHES _comp) set(ClimbingStats_FOUND False) - set(ClimbingStats_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}") + set(ClimbingStats_NOTFOUND_MESSAGE "Unsupported component: ${_comp}") endif() include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStats${_comp}Targets.cmake") endforeach() diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index f1717a0..dfa423e 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -3,7 +3,7 @@ cmake-policies(7) ***************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 38bcd04..bf456f5 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -3,7 +3,7 @@ cmake-properties(7) ******************* -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index fe8d62d..e8a2c1e 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -3,7 +3,7 @@ cmake-qt(7) *********** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index fad5481..afc8ba2 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -3,7 +3,7 @@ cmake-toolchains(7) ******************* -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1deb8bb..99088e0 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -3,7 +3,7 @@ cmake-variables(7) ****************** -.. only:: html or latex +.. only:: html .. contents:: diff --git a/Help/prop_dir/COMPILE_OPTIONS.rst b/Help/prop_dir/COMPILE_OPTIONS.rst index 5953059..5530860 100644 --- a/Help/prop_dir/COMPILE_OPTIONS.rst +++ b/Help/prop_dir/COMPILE_OPTIONS.rst @@ -6,9 +6,9 @@ List of options to pass to the compiler. This property specifies the list of options given so far to the :command:`add_compile_options` command. -This property is used to populate the :prop_tgt:`COMPILE_OPTIONS` target -property, which is used by the generators to set the options for the -compiler. +This property is used to initialize the :prop_tgt:`COMPILE_OPTIONS` target +property when a target is created, which is used by the generators to set +the options for the compiler. Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual diff --git a/Help/prop_sf/AUTOUIC_OPTIONS.rst b/Help/prop_sf/AUTOUIC_OPTIONS.rst index 6dfabb0..bb48da9 100644 --- a/Help/prop_sf/AUTOUIC_OPTIONS.rst +++ b/Help/prop_sf/AUTOUIC_OPTIONS.rst @@ -6,7 +6,7 @@ Additional options for ``uic`` when using :prop_tgt:`AUTOUIC` This property holds additional command line options which will be used when ``uic`` is executed during the build via :prop_tgt:`AUTOUIC`, i.e. it is equivalent to the optional ``OPTIONS`` argument of the -:module:`qt4_wrap_ui()<FindQt4>` macro. +:module:`qt4_wrap_ui() <FindQt4>` macro. By default it is empty. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 652bcd3..e7a695d 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -238,10 +238,6 @@ Modules * The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG`` environment variable value as the ``pkg-config`` executable, if set. -* The :module:`FindVTK` module dropped support for finding VTK 4.0. - It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``. - This produces much clearer error messages when VTK is not found. - * The :module:`FindZLIB` module now provides imported targets. * The :module:`GenerateExportHeader` module ``generate_export_header`` @@ -356,6 +352,17 @@ Deprecated and Removed Features it is deprecated and should not longer be used. Use the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead. +* The :module:`FindITK` module has been removed altogether. + It was a thin-wrapper around ``find_package(ITK ... NO_MODULE)``. + This produces much clearer error messages when ITK is not found. + +* The :module:`FindVTK` module has been removed altogether. + It was a thin-wrapper around ``find_package(VTK ... NO_MODULE)``. + This produces much clearer error messages when VTK is not found. + + The module also provided compatibility support for finding VTK 4.0. + This capability has been dropped. + Other Changes ============= diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 613f4b3..6c6a914 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -307,7 +307,7 @@ Id flags: ${testflags} # ... # /path/to/cc ...CompilerId${lang}/... # to extract the compiler front-end for the language. - if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}(/CompilerId${lang}.xctest)?/(\\./)?CompilerId${lang}[ \t\n\\\"]") + if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?(CompilerId${lang}.xctest/)?CompilerId${lang}[ \t\n\\\"]") set(_comp "${CMAKE_MATCH_2}") if(EXISTS "${_comp}") set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 4b8dc1e..6f2eeb3 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -96,7 +96,7 @@ # # If this is ``ON`` all components will be downloaded. # By default is ``OFF`` or used value -# from :variable:`CPACK_DOWNLOAD_ALL` if set +# from ``CPACK_DOWNLOAD_ALL`` if set # # Components # """""""""" diff --git a/Modules/CPackNSIS.cmake b/Modules/CPackNSIS.cmake index 9d23ec0..4b2e0eb 100644 --- a/Modules/CPackNSIS.cmake +++ b/Modules/CPackNSIS.cmake @@ -114,8 +114,8 @@ # installation prefix. Like:: # # set(CPACK_NSIS_MENU_LINKS -# "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help" -# "http://www.cmake.org" "CMake Web Site") +# "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" +# "CMake Help" "http://www.cmake.org" "CMake Web Site") # #============================================================================= diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index cdd3039..8832950 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -52,7 +52,7 @@ # [CMAKE_GENERATOR_PLATFORM p] # Generator-specific platform name # [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name # [CMAKE_ARGS args...] # Arguments to CMake command line -# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on +# [CMAKE_CACHE_ARGS args...] # Initial cache args with form -Dvar:string=on # #--Build step----------------- # [BINARY_DIR dir] # Specify build dir location # [BUILD_COMMAND cmd...] # Command to drive the native build diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 37bc6b5..9016db8 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -17,7 +17,7 @@ # :: # # -- The following OPTIONAL packages have been found: -# LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org> +# LibXml2 (required version >= 2.4), XML processing lib, <http://xmlsoft.org> # * Enables HTML-import in MyWordProcessor # * Enables odt-export in MyWordProcessor # PNG , A PNG image library. , <http://www.libpng.org/pub/png/> diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 3dd975c..29bb875 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -278,13 +278,13 @@ # Only available for CUDA version 3.2+. # CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library. # Only available for CUDA version 3.2+. -# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives library. +# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib. # Only available for CUDA version 4.0+. -# CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives library (core). +# CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). # Only available for CUDA version 5.5+. -# CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives library (image processing). +# CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). # Only available for CUDA version 5.5+. -# CUDA_npps_LIBRARY -- NVIDIA Performance Primitives library (signal processing). +# CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). # Only available for CUDA version 5.5+. # CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. # Only available for CUDA version 3.2+. diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index 0184c39..a21ca89 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -50,6 +50,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) + find_library(CURSES_CURSES_LIBRARY NAMES curses ) find_library(CURSES_NCURSES_LIBRARY NAMES ncurses ) @@ -81,7 +83,6 @@ endif() # prefix as the library was found, if still not found, try curses.h with the # default search paths. if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES) - include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) cmake_push_check_state() set(CMAKE_REQUIRED_QUIET ${Curses_FIND_QUIETLY}) diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake index 16478cb..f972ad0 100644 --- a/Modules/FindGettext.cmake +++ b/Modules/FindGettext.cmake @@ -17,6 +17,7 @@ # # # Additionally it provides the following macros: +# # GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN ) # # :: @@ -32,8 +33,9 @@ # :: # # Process the given pot file to mo files. -# If INSTALL_DESTINATION is given then automatically install rules will be created, -# the language subdirectory will be taken into account (by default use share/locale/). +# If INSTALL_DESTINATION is given then automatically install rules will +# be created, the language subdirectory will be taken into account +# (by default use share/locale/). # If ALL is specified, the pot file is processed when building the all traget. # It creates a custom target "potfile". # @@ -43,8 +45,9 @@ # :: # # Process the given po files to mo files for the given language. -# If INSTALL_DESTINATION is given then automatically install rules will be created, -# the language subdirectory will be taken into account (by default use share/locale/). +# If INSTALL_DESTINATION is given then automatically install rules will +# be created, the language subdirectory will be taken into account +# (by default use share/locale/). # If ALL is specified, the po files are processed when building the all traget. # It creates a custom target "pofiles". diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 55528b8..76cecc1 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -43,7 +43,7 @@ # # Ice_HOME - the root of the Ice installation # -# The environment variable :envvar:`ICE_HOME` may also be used; the +# The environment variable ``ICE_HOME`` may also be used; the # Ice_HOME variable takes precedence. # # The following cache variables may also be set:: diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 0bd7eb0..79be34e 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -17,7 +17,7 @@ # Java_JAVAH_EXECUTABLE = the full path to the Java header generator # Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator # Java_JAR_EXECUTABLE = the full path to the Java archiver -# Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12 +# Java_VERSION_STRING = Version of java found, eg. 1.6.0_12 # Java_VERSION_MAJOR = The major version of the package found. # Java_VERSION_MINOR = The minor version of the package found. # Java_VERSION_PATCH = The patch version of the package found. diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake index bf2f821..2416341 100644 --- a/Modules/FindLibXslt.cmake +++ b/Modules/FindLibXslt.cmake @@ -17,10 +17,10 @@ # Additionally, the following two variables are set (but not required # for using xslt): # -# :: -# -# LIBXSLT_EXSLT_LIBRARIES - Link to these if you need to link against the exslt library -# LIBXSLT_XSLTPROC_EXECUTABLE - Contains the full path to the xsltproc executable if found +# ``LIBXSLT_EXSLT_LIBRARIES`` +# Link to these if you need to link against the exslt library. +# ``LIBXSLT_XSLTPROC_EXECUTABLE`` +# Contains the full path to the xsltproc executable if found. #============================================================================= # Copyright 2006-2009 Kitware, Inc. diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index d728324..bf58ede 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -490,9 +490,10 @@ endmacro() pkg_check_modules (XRENDER REQUIRED xrender) - Defines e.g.: - ``XRENDER_LIBRARIES=Xrender;X11`` and - ``XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp`` + Defines for example:: + + XRENDER_LIBRARIES=Xrender;X11`` + XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp #]========================================] macro(pkg_check_modules _prefix _module0) # check cached value diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 72ca6ed..f01bd41 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -2,127 +2,80 @@ # FindProtobuf # ------------ # -# -# # Locate and configure the Google Protocol Buffers library. # # The following variables can be set and are optional: # -# :: -# -# PROTOBUF_SRC_ROOT_FOLDER - When compiling with MSVC, if this cache variable is set -# the protobuf-default VS project build locations -# (vsprojects/Debug & vsprojects/Release) will be searched -# for libraries and binaries. -# -# -# -# :: -# -# PROTOBUF_IMPORT_DIRS - List of additional directories to be searched for -# imported .proto files. (New in CMake 2.8.8) -# -# +# ``PROTOBUF_SRC_ROOT_FOLDER`` +# When compiling with MSVC, if this cache variable is set +# the protobuf-default VS project build locations +# (vsprojects/Debug & vsprojects/Release) will be searched +# for libraries and binaries. +# ``PROTOBUF_IMPORT_DIRS`` +# List of additional directories to be searched for +# imported .proto files. # # Defines the following variables: # -# :: -# -# PROTOBUF_FOUND - Found the Google Protocol Buffers library (libprotobuf & header files) -# PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers -# PROTOBUF_LIBRARIES - The protobuf libraries -# -# [New in CMake 2.8.5] -# -# :: -# -# PROTOBUF_PROTOC_LIBRARIES - The protoc libraries -# PROTOBUF_LITE_LIBRARIES - The protobuf-lite libraries -# -# +# ``PROTOBUF_FOUND`` +# Found the Google Protocol Buffers library +# (libprotobuf & header files) +# ``PROTOBUF_INCLUDE_DIRS`` +# Include directories for Google Protocol Buffers +# ``PROTOBUF_LIBRARIES`` +# The protobuf libraries +# ``PROTOBUF_PROTOC_LIBRARIES`` +# The protoc libraries +# ``PROTOBUF_LITE_LIBRARIES`` +# The protobuf-lite libraries # # The following cache variables are also available to set or use: # -# :: -# -# PROTOBUF_LIBRARY - The protobuf library -# PROTOBUF_PROTOC_LIBRARY - The protoc library -# PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers -# PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler -# -# [New in CMake 2.8.5] -# -# :: -# -# PROTOBUF_LIBRARY_DEBUG - The protobuf library (debug) -# PROTOBUF_PROTOC_LIBRARY_DEBUG - The protoc library (debug) -# PROTOBUF_LITE_LIBRARY - The protobuf lite library -# PROTOBUF_LITE_LIBRARY_DEBUG - The protobuf lite library (debug) -# -# -# -# :: -# -# ==================================================================== -# Example: -# -# -# -# :: -# -# find_package(Protobuf REQUIRED) -# include_directories(${PROTOBUF_INCLUDE_DIRS}) -# -# -# -# :: -# -# include_directories(${CMAKE_CURRENT_BINARY_DIR}) -# PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto) -# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS}) -# target_link_libraries(bar ${PROTOBUF_LIBRARIES}) -# -# -# -# NOTE: You may need to link against pthreads, depending -# -# :: -# -# on the platform. -# -# -# -# NOTE: The PROTOBUF_GENERATE_CPP macro & add_executable() or -# add_library() -# -# :: -# -# calls only work properly within the same directory. -# -# -# -# :: -# -# ==================================================================== -# -# -# -# PROTOBUF_GENERATE_CPP (public function) -# -# :: -# -# SRCS = Variable to define with autogenerated -# source files -# HDRS = Variable to define with autogenerated -# header files -# ARGN = proto files -# -# -# -# :: -# -# ==================================================================== - +# ``PROTOBUF_LIBRARY`` +# The protobuf library +# ``PROTOBUF_PROTOC_LIBRARY`` +# The protoc library +# ``PROTOBUF_INCLUDE_DIR`` +# The include directory for protocol buffers +# ``PROTOBUF_PROTOC_EXECUTABLE`` +# The protoc compiler +# ``PROTOBUF_LIBRARY_DEBUG`` +# The protobuf library (debug) +# ``PROTOBUF_PROTOC_LIBRARY_DEBUG`` +# The protoc library (debug) +# ``PROTOBUF_LITE_LIBRARY`` +# The protobuf lite library +# ``PROTOBUF_LITE_LIBRARY_DEBUG`` +# The protobuf lite library (debug) +# +# Example: +# +# .. code-block:: cmake +# +# find_package(Protobuf REQUIRED) +# include_directories(${PROTOBUF_INCLUDE_DIRS}) +# include_directories(${CMAKE_CURRENT_BINARY_DIR}) +# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS foo.proto) +# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS}) +# target_link_libraries(bar ${PROTOBUF_LIBRARIES}) +# +# .. note:: +# The PROTOBUF_GENERATE_CPP macro and add_executable() or +# add_library() calls only work properly within the same +# directory. +# +# .. command:: protobuf_generate_cpp +# +# Add custom commands to process ``.proto`` files:: +# +# protobuf_generate_cpp (<SRCS> <HDRS> [<ARGN>...]) +# +# ``SRCS`` +# Variable to define with autogenerated source files +# ``HDRS`` +# Variable to define with autogenerated header files +# ``ARGN`` +# ``.proto`` files #============================================================================= # Copyright 2009 Kitware, Inc. diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 2c39de5..a79246a 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -23,7 +23,7 @@ # .. note:: # # When using :prop_tgt:`IMPORTED` targets, the qtmain.lib static library is -# automatically linked on Windows for :variable:`WIN32 <WIN32_EXECUTABLE>` +# automatically linked on Windows for :prop_tgt:`WIN32 <WIN32_EXECUTABLE>` # executables. To disable that globally, set the # ``QT4_NO_LINK_QTMAIN`` variable before finding Qt4. To disable that # for a particular executable, set the ``QT4_NO_LINK_QTMAIN`` target @@ -104,9 +104,11 @@ # macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) # Create the interface header and implementation files # for all listed interface xml files. -# The basename will be automatically determined from the name of the xml file. +# The basename will be automatically determined from the name +# of the xml file. # -# The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here. +# The source file properties described for +# QT4_ADD_DBUS_INTERFACE also apply here. # # # :: @@ -172,7 +174,7 @@ # a class uses the Q_OBJECT macro, moc has to run on it. If you don't # want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert # #include "foo.moc" -# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the +# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will # scan all listed files at cmake-time for such included moc files and if it # finds them cause a rule to be generated to run moc at build time on the # accompanying header file foo.h. @@ -188,8 +190,8 @@ # This function is obsolete. Use target_link_libraries with IMPORTED targets # instead. # Make <target> use the <modules> from Qt. Using a Qt module means -# to link to the library, add the relevant include directories for the module, -# and add the relevant compiler defines for using the module. +# to link to the library, add the relevant include directories for the +# module, and add the relevant compiler defines for using the module. # Modules are roughly equivalent to components of Qt4, so usage would be # something like: # qt4_use_modules(myexe Core Gui Declarative) diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index fc2c043..49b5e40 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -11,7 +11,8 @@ # SDL_IMAGE_LIBRARIES, the name of the library to link against # SDL_IMAGE_INCLUDE_DIRS, where to find the headers # SDL_IMAGE_FOUND, if false, do not try to link against -# SDL_IMAGE_VERSION_STRING - human-readable string containing the version of SDL_image +# SDL_IMAGE_VERSION_STRING - human-readable string containing the +# version of SDL_image # # # diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index 176fee6..9e11796 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -11,7 +11,8 @@ # SDL_MIXER_LIBRARIES, the name of the library to link against # SDL_MIXER_INCLUDE_DIRS, where to find the headers # SDL_MIXER_FOUND, if false, do not try to link against -# SDL_MIXER_VERSION_STRING - human-readable string containing the version of SDL_mixer +# SDL_MIXER_VERSION_STRING - human-readable string containing the +# version of SDL_mixer # # # diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 5fa40a5..494d358 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -21,7 +21,8 @@ # flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES. # This is available mostly for cases this module failed to anticipate for # and you must add additional flags. This is marked as ADVANCED. -# SDL_SOUND_VERSION_STRING, human-readable string containing the version of SDL_sound +# SDL_SOUND_VERSION_STRING, human-readable string containing the +# version of SDL_sound # # # diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index 4fdecb4..51e279d 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -41,8 +41,9 @@ # # :: # -# squish_v4_add_test(cmakeTestName AUT targetName SUITE suiteName TEST squishTestName -# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] ) +# squish_v4_add_test(cmakeTestName +# AUT targetName SUITE suiteName TEST squishTestName +# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] ) # # # diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake index ac410de..88f9bf7 100644 --- a/Modules/Platform/Windows-wcl386.cmake +++ b/Modules/Platform/Windows-wcl386.cmake @@ -18,8 +18,8 @@ set(CMAKE_CREATE_CONSOLE_EXE "system nt" ) set(CMAKE_SHARED_LINKER_FLAGS_INIT "system nt_dll") set(CMAKE_MODULE_LINKER_FLAGS_INIT "system nt_dll") foreach(type SHARED MODULE EXE) - set(CMAKE_${type}_LINKER_FLAGS_DEBUG_INIT "debug all opt map, symfile") - set(CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all opt map, symfile") + set(CMAKE_${type}_LINKER_FLAGS_DEBUG_INIT "debug all opt map") + set(CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all opt map") endforeach() set(CMAKE_C_COMPILE_OPTIONS_DLL "-bd") # Note: This variable is a ';' separated list diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 8c4daac..6516b0a 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -232,7 +232,7 @@ macro (QT4_ADD_RESOURCES outfiles ) # let's make a configured file and add it as a dependency so cmake is run # again when dependencies need to be recomputed. QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends) - configure_file("${infile}" "${out_depends}" COPY_ONLY) + configure_file("${infile}" "${out_depends}" COPYONLY) else() # The .qrc file does not exist (yet). Let's add a dependency and hope # that it will be generated later diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index c1478df..67a1a6d 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1286,12 +1286,16 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode std::string obj_dir = gt->ObjectDirectory; std::string result; const char* sep = ""; - for(std::map<cmSourceFile const*, std::string>::const_iterator it - = mapping.begin(); it != mapping.end(); ++it) + for(std::vector<cmSourceFile const*>::const_iterator it + = objectSources.begin(); it != objectSources.end(); ++it) { - assert(!it->second.empty()); + // Find the object file name corresponding to this source file. + std::map<cmSourceFile const*, std::string>::const_iterator + map_it = mapping.find(*it); + // It must exist because we populated the mapping just above. + assert(!map_it->second.empty()); result += sep; - std::string objFile = obj_dir + it->second; + std::string objFile = obj_dir + map_it->second; cmSourceFile* sf = context->Makefile->GetOrCreateSource(objFile, true); sf->SetObjectLibrary(tgtName); sf->SetProperty("EXTERNAL_OBJECT", "1"); diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 8ca4360..2067690 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -265,7 +265,7 @@ STRING(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" KWSYS_IN_SOURCE_BUILD) IF(NOT KWSYS_IN_SOURCE_BUILD) CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsysPrivate.h - ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPY_ONLY IMMEDIATE) + ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPYONLY IMMEDIATE) ENDIF(NOT KWSYS_IN_SOURCE_BUILD) # Select plugin module file name convention. diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index d81bbcf..eb24a6e 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -31,6 +31,8 @@ exclude_patterns = [] extensions = ['cmake'] templates_path = ['@conf_path@/templates'] +nitpicky = True + cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst')) cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$') man_pages = [] @@ -60,7 +62,7 @@ html_style = 'cmake.css' html_theme = 'default' html_title = 'CMake %s Documentation' % release html_short_title = '%s Documentation' % release -html_favicon = 'cmake-favicon.ico' +html_favicon = '@conf_path@/static/cmake-favicon.ico' # Not supported yet by sphinx: # https://bitbucket.org/birkenfeld/sphinx/issue/1448/make-qthelp-more-configurable # qthelp_namespace = "org.cmake" @@ -122,17 +122,32 @@ else cmake_system_openvms=false fi +# Determine whether this is HP-UX +if echo "${cmake_system}" | grep HP-UX >/dev/null 2>&1; then + cmake_system_hpux=true +else + cmake_system_hpux=false +fi + # Determine whether this is Linux if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then cmake_system_linux=true - # find out if it is a HP PA-RISC machine +else + cmake_system_linux=false + fi + +# Determine whether this is a PA-RISC machine +# This only works for Linux or HP-UX, not other PA-RISC OSs (BSD maybe?). Also +# may falsely detect parisc on HP-UX m68k +cmake_machine_parisc=false +if ${cmake_system_linux}; then if uname -m | grep parisc >/dev/null 2>&1; then cmake_machine_parisc=true - else - cmake_machine_parisc=false fi -else - cmake_system_linux=false +elif ${cmake_system_hpux}; then + if !(uname -m | grep ia64 >/dev/null 2>&1); then + cmake_machine_parisc=true + fi fi # Choose the generator to use for bootstrapping. @@ -744,11 +759,13 @@ if ${cmake_system_haiku}; then cmake_ld_flags="${LDFLAGS} -lroot -lbe" fi -if ${cmake_system_linux}; then - # avoid binutils problem with large binaries, e.g. when building CMake in debug mode - # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230 - if ${cmake_machine_parisc}; then - cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text._*" +# Workaround for short jump tables on PA-RISC +if ${cmake_machine_parisc}; then + if ${cmake_c_compiler_is_gnu}; then + cmake_c_flags="${CFLAGS} -mlong-calls" + fi + if ${cmake_cxx_compiler_is_gnu}; then + cmake_cxx_flags="${CXXFLAGS} -mlong-calls" fi fi |