Commit Graph

9080 Commits

Author SHA1 Message Date
Brad King
c1922c9660 Merge topic 'doxygen-escaping'
e81fd5d5ba FindDoxygen: Escape backslashes in default values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Julien Schueller <schueller@phimeca.com>
Merge-request: !2867
2019-01-28 08:30:07 -05:00
Brad King
dc752c9d2d Merge topic 'implicit-incs-upd'
2e91627dea ParseImplicitIncludeInfo: add Fortran implicit include handling
568343767e ParseImplicitIncludeInfo: handle/add SunPro, XL, and -nostdinc test cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2855
2019-01-28 08:08:36 -05:00
Brad King
70fabb8f25 Merge topic 'png-optimize'
b9e6d04558 Reduce size of PNG images
880e380599 CPack: Replace corrupted background png with original

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2852
2019-01-28 08:04:51 -05:00
Brad King
6d57201868 Merge topic 'intel-compile-features'
fc40bca590 Intel: Record support for relaxed constexpr by version 18.0.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2862
2019-01-28 07:59:30 -05:00
Brad King
f411e936be Merge topic 'FindPythonInterp-version-fix'
08dee696b5 FindPythonInterp: Do not assume any version if test script fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2835
2019-01-28 07:58:45 -05:00
Craig Scott
e81fd5d5ba FindDoxygen: Escape backslashes in default values
Doxygen 1.8.15 added a new LATEX_MAKEINDEX_CMD config
item and it has a default value that contains a backslash on
some installations.

Fixes: #18738
2019-01-27 10:34:05 +11:00
Chuck Cranor
2e91627dea ParseImplicitIncludeInfo: add Fortran implicit include handling
Currently cmake is only setting CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
the first time it runs (the implicit includes parser is only run when
the cache variables are initially populated).  It is left unset
during additional runs.  This behavior is both confusing and
inconsistent.

Modify CMakeFortranCompiler.cmake.in to preserve the value of
CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES so that cmake's Fortran
behavior matches C and CXX (i.e. CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
retains its value across runs).  The implicit includes variable may
not be as useful for Fortran as it is for C and CXX, but we do want
cmake to be consistent in how it is handled.

Adjust CMakeParseImplicitIncludeInfo to parse verbose Fortran output
for Cray and XL compiler IDs (GNU and clang were already ok since
they use the same verbose output format as they do with C/CXX).

Allow Tests/RunCMake/ParseImplicitIncludeInfo/data/CMakeLists.txt
to generate test inputs for Fortran too, and add some sample Fortran
input files for the Tests/RunCMake/ParseImplicitIncludeInfo test.
2019-01-25 10:57:42 -07:00
Chuck Cranor
568343767e ParseImplicitIncludeInfo: handle/add SunPro, XL, and -nostdinc test cases
Add parser code for compiler IDs SunPro and XL.  For SunPro, /usr/include
appears to be hardwired in and it does not have a -nostdinc-type flag.

For XL, the "xlc" and "xlC" commands determine if you are C or C++
based on input filename.  So compiling x.c with "xlC" reverts to C
and compiling x.cc with "xlc" upgrades to CXX.  System include paths
are specified by:
  -qc_stdinc=[path] and -qgcc_c_stdinc=[path] (for C)
  -qcpp_stdinc=[path] and -qgcc_cpp_stdinc=[path] (for CXX)
If you specify "-qnostdinc" then the above flags are ignored.
Specifying an empty path reverts the value to the default
path (e.g. "-qgcc_c_stdinc=" reverts that to the default).

Adjust the code to handle parsing the case where the user specifies
additional compiler include flags via CMAKE_C_FLAGS/CMAKE_CXX_FLAGS.
For example: "-DCMAKE_C_FLAGS=-nostdinc" ... note that gcc and clang
output slightly differ when -nostdinc is specified (clang skips
printing 'search starts here:' with the angle brackets, gcc always
prints it).

Enable sunos-{C,CXX}-SunPro test cases and add XL test cases.
Also add a few -nostdinc style tests.
2019-01-25 07:48:00 -07:00
Lucy Phipps
b9e6d04558 Reduce size of PNG images
Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.

Update expected file hashes in tests.
2019-01-25 09:14:51 -05:00
Lucy Phipps
880e380599 CPack: Replace corrupted background png with original
The `Modules/CPack.background.png.in` file was originally added by
commit f2c0dbd164 (ENH: More work on the packaging. Add Applicaitons,
add icons, etc, 2007-02-13, v2.6.0~2217).  Then it was removed
accidentally by commit 5308afa3f7 (ENH: remove unused file, 2009-03-03,
v2.8.0~963) and restored by commit f9dd6a38c5 (ENH: add file back bug
use cmake image, 2009-03-04, v2.8.0~958) but with corruption.

Restore the original image file and add a Git attribute to prevent
newline conversion as we do for other `.png` files.
2019-01-25 09:04:35 -05:00
Brad King
9a2bddb704 Merge topic 'FindICU-win64'
26b7a8e77e FindICU: Find 64-bit Windows builds under CMP0074 NEW behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2859
2019-01-25 08:05:06 -05:00
Brad King
fc40bca590 Intel: Record support for relaxed constexpr by version 18.0.5
Update the special case added by commit f719a13c28 (Features: Add
special case to disable relaxed constexpr for Intel 18, 2018-06-04,
v3.12.0-rc1~11^2) to record that 18.0.5 fixed the regression.
2019-01-25 07:56:37 -05:00
Marc Chevrier
0d8d7a6896 Merge topic 'FindPython-numpy'
513e77550d FindPython: Introduce NumPy component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2734
2019-01-25 04:18:11 -05:00
Johannes Reiff
26b7a8e77e FindICU: Find 64-bit Windows builds under CMP0074 NEW behavior
CMP0074 causes FindICU.cmake to always prefer the 32-bit version of ICU
programs/libraries on Windows. NO_PACKAGE_ROOT_PATH reverts this behavior.

Fixes: #18742
2019-01-24 14:55:35 -05:00
Hiroshi Miura
513e77550d FindPython: Introduce NumPy component
Fixes: #18678
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-01-25 01:26:48 +09:00
Brad King
378473f9f1 Merge topic 'fortran-docs'
3d63d3ce2f Help: Add examples to CheckFortranSource{Runs,Compiles}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2843
2019-01-24 10:36:40 -05:00
Marc Chevrier
1d02491950 Merge topic 'findgit-note'
f2d7ed1cda Help: Add note about CMAKE_ROLE to FindGit documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2847
2019-01-24 05:38:08 -05:00
Kyle Edwards
e4541b0e3d FindPython: Support script mode
Fixes: #18827
2019-01-23 13:51:09 -05:00
Kyle Edwards
f2d7ed1cda Help: Add note about CMAKE_ROLE to FindGit documentation 2019-01-23 13:45:12 -05:00
Michael Hirsch, Ph.D
3d63d3ce2f Help: Add examples to CheckFortranSource{Runs,Compiles} 2019-01-23 08:28:13 -05:00
Brad King
fa5bf870df Merge topic 'implicit-includes'
5990ecb741 Compute implicit include directories from compiler output
d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile()
c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation
8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2716
2019-01-22 11:37:49 -05:00
Marc Chevrier
08dee696b5 FindPythonInterp: Do not assume any version if test script fails
The Python version is retrieved by executing a small python script. If,
for any reason, script fails to execute, leave the `PYTHON_VERSION_*`
variables undefined instead of assuming version 1.4.

Fixes: #18799
2019-01-22 10:43:08 -05:00
Chuck Cranor
5990ecb741 Compute implicit include directories from compiler output
- CMakeParseImplicitIncludeInfo.cmake: new parser that extracts the
   compiler's include path from verbose output.  If the parser cannot
   parse the output, we fall back to the old behavior.  On osx we skip
   over framework directories (handled elsewhere).

 - CMakeDetermineCompilerABI.cmake:
     - use verbose flag in try_compile for ${src}
     - use new cmake_parse_implicit_include_info() to attempt extract
       implicit include directory path and if successful set
        CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES

 - CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve
   CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in
   the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved

 - Tests/RunCMake/ParseImplicitIncludeInfo: tests for parse
   based on the older Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in.
   The test runs a set of verbose compiler outputs collected from
   various machines through the parser and checks the results.  New
   compiler files can be added by dropping input/output files in the
   ParseImplicitIncludeInfo/data subdirectory and then adding the new set
   of files to the ${targets} list in ParseImplicitIncludeInfo.cmake.
   There is a helper CMakeLists.txt in ParseImplicitIncludeInfo/data
   that can help with the generation of test input files.
   NOTE: the standard cmake pre-commit hook rejects verbose compiler
   output with trailing spaces... you have to manually edit them out.
   This shouldn't impact the test.

Note that both the parser and the test code can use CMAKE_${LANG}_COMPILER_*
variables such as ${CMAKE_CXX_COMPILER_ID} to decide how to parse
verbose compiler output.  For the test code, this requires us to
save the variables values in the test input files.

Fixes: #16291
2019-01-21 11:14:08 -05:00
Chuck Cranor
d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile()
Have CMakeDetermineCompilerABI set the locale to C before calling
try_compile().  This is for the implicit include path parser to
keep all the verbose compiler messages in English so we can parse
it.   See #18784 for discussion.
2019-01-21 11:14:08 -05:00
Brad King
c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation
Default to the same flag that is used for verbose link information, but
provide another internal platform information variable to use a
compilation-specific variant.  Populate it for CUDA where we use a
different compiler for compilation and linking and therefore need
different flags.

Co-Author: Chuck Cranor <chuck@ece.cmu.edu>
2019-01-21 11:14:08 -05:00
Brad King
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values
Add a `CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES` to contain the
hard-coded list of paths to be excluded from `-I` arguments so that the
values remain excluded even if the per-language
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variants change.

This is needed to preserve our historical exclusion of `-I/usr/include`
even when it is not a real implicit include directory.  A policy may be
needed to remove it later.
2019-01-21 11:14:07 -05:00
Kyle Edwards
97700e9f5b FindGit: Add imported target 2019-01-21 10:01:56 -05:00
Brad King
02f7e997e9 Merge topic 'ExternalProject-non-cmake-source-subdir'
c09ec79981 ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2823
2019-01-21 07:58:10 -05:00
Brad King
15fe5c4c9d Merge topic 'FindCURL-typo'
0526ae4415 FindCURL: fix component failure when no pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2826
2019-01-21 07:50:23 -05:00
Hiroshi Miura
0526ae4415 FindCURL: fix component failure when no pkg-config
find_package(CURL COMPONENTS foo) fails when there is
no pkg-config module because of variable name typo.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Fixes: #18802
2019-01-21 07:49:00 -05:00
Brad King
fefae527c8 Merge topic 'submit-url'
2915a75615 CTest: Add documentation and release notes for SubmitURL
d6475daa79 Modules/CTest: Set SubmitURL
938f06fda6 ctest_submit: Add parameter SUBMIT_URL
65e725c957 CTest: Add option SubmitURL
65f1fc9d63 CTest: Add function GetSubmitURL
2bedd5fb7c ctest_submit: Remove submit method from log output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2719
2019-01-21 07:46:20 -05:00
Ben Boeckel
c09ec79981 ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE 2019-01-17 13:40:30 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- Detect GHS compiler and version
   Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
   Detect PLATFORM_ID for Integrity and Integrity178 platforms
   Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
   Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
2019-01-16 10:42:04 -05:00
Fred Baksik
702121c5f3 GHS: Use the correct compiler flags for CMAKE_BUILD_TYPE
-- Do not use CMAKE_C_FLAGS_RELEASE flags when CMAKE_BUILD_TYPE is empty
   if CMAKE_BUILD_TYPE was not set the generator would use Release settings
   this does not match the documented behavior of CMAKE_BUILD_TYPE

-- CMAKE_C_FLAGS_<CONFIG> not used when -kernel is present
   Fixes issue where CMAKE_C_FLAGS_<CONFIG> is ignored when -kernel option is present as a compiler option
   When the -kernel option is added to an executable it uses a different set of language flags
   This does not occur -kernel=<type> is used or if it is added as part of a link flag
   The variables CMAKE_<LANG>_GHS_KERNEL_FLAGS_<CONFIG> are removed
   NOTE: By default this only added the flag -ldebug which links in the debugger library.

-- Separate compiler options by newlines
2019-01-16 10:41:35 -05:00
Fred Baksik
595932c4f0 GHS: Update the link line processing
-- add missing executable linker libs from:
   CMAKE_C_STANDARD_LIBRARIES
-- add missed transitive link libraries
-- add skipped library linker options
-- The linker expects -l../relative/path/to/lib.a to be relative to the top-level project
   Because there can be multiple top-level projects convert the path to an absolute path to target
2019-01-16 10:41:27 -05:00
Fred Baksik
2ed2d6b46f GHS: Place build system outputs per target output directives
-- Set output and object file locations
-- Suffixes are no longer being forced but will now follow the target properties
   By default GHS tools have no suffix for executable files so
   CMAKE_EXECUTABLE_SUFFIX was changed to meet this behavior
-- Remove #if 0 blocked out code; it has been replaced.
   Forcing the -relprog option has been removed from non-kernel executable targets.
   The default value of this option (if it is even available) is determined by the
   tool-chain for the specified target and platform (Some tool-chains default to
   -locatedprogram).  The use of -relprog can have unexpected results as it cannot
   always produce a fully relocated executable.
-- Clarify use of CMAKE_BUILD_TYPE to control build configuration
2019-01-16 10:41:24 -05:00
Fred Baksik
a42e40e78d GHS: Only print bsp and os directives if specified by user
-- standalone platforms will not build if bsp/os is specified in project file
-- integrity platforms will always print these directives because they are required
-- cleanup -os_dir setting
   allow customization of the actual setting because it is determined by tool-set customization files
   remove variable that was set but never used
-- add message when using default values
2019-01-16 10:40:59 -05:00
Regina Pfeifer
2915a75615 CTest: Add documentation and release notes for SubmitURL 2019-01-16 10:34:08 -05:00
Regina Pfeifer
d6475daa79 Modules/CTest: Set SubmitURL 2019-01-16 10:34:08 -05:00
Ethan Slattery
270965e0c7 IAR: Update compiler modules to support AVR systems
Fixes: #18557
2019-01-15 13:59:01 -05:00
Ethan Slattery
7414d422b2 IAR: Parse INFO strings from the binary format of AVR systems
Teach `CMakeDetermineCompilerId` to recognize and parse the IAR-AVR
binary format so we can recognize this compiler id.

Issue: #18557
2019-01-15 13:58:53 -05:00
Brad King
da566d4de8 Merge topic 'fetchcontent-uses-terminal'
2119c33b7e FetchContent: Give access to the terminal for download and update

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co>
Merge-request: !2800
2019-01-15 13:26:02 -05:00
Brad King
bf1a1caefe Merge topic 'check-fortran-run'
10a1477b63 CheckFortranSourceRuns: Add module to check if Fortran code runs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2714
2019-01-15 13:15:44 -05:00
Craig Scott
2119c33b7e FetchContent: Give access to the terminal for download and update
A main scenario where this is needed is when a git operation
needs the password to a private key and asks for it on the
console. Without this change, such operations can appear to
hang indefinitely with no prompt if QUIET is in effect (which it
is by default).

Another scenario this addresses is when progress of a
download or update should be shown. Without this change,
all such progress is buffered with some generators and will
only be shown at the end, which defeats the purpose of logging
any progress to begin with.

Relates: #18238
2019-01-14 23:32:18 +11:00
Brad King
beb991110d Remove now-unused code once used on IRIX
We dropped support for IRIX as a host platform long ago.
Remove some leftover code.
2019-01-11 13:50:46 -05:00
Brad King
696c6afcaf Merge topic 'FindBoost-1.70'
266808c413 FindBoost: Add support for Boost 1.70

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2747
2019-01-11 08:00:45 -05:00
Brad King
f15345be41 Merge topic 'FindICE-more-exe'
fbb115d198 FindIce: Find slice2confluence and slice2matlab executables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2773
2019-01-11 07:56:11 -05:00
Brad King
283c93fe9a Merge topic 'xl-early-bE'
74720a298c XL: Move '-bE' flag earlier so it can be overridden

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2771
2019-01-11 07:52:53 -05:00
Brad King
9e8f2e509f Merge topic 'bison_target_policy'
5000fed5af FindBISON: Add policy CMP0088 to run bison in build tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2774
2019-01-11 07:52:05 -05:00
Brad King
003759ba0d Merge topic 'threads'
5a5a1d90f0 Help: FindThreads not needed with modern C++.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2776
2019-01-11 07:42:54 -05:00