Commit Graph

7992 Commits

Author SHA1 Message Date
Brad King
93cd333103 Merge topic 'mingw-clang-c-compile-features'
f86879a0 Record C compile features flags for MinGW Clang on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1435
2017-11-01 07:40:35 -04:00
Brad King
f86879a04c Record C compile features flags for MinGW Clang on Windows
This was done for C++ by commit v3.5.0-rc1~69^2 (Record compile features
for MinGW Clang on Windows, 2016-01-11).  Make the same change for C.
The `UNIX` condition on Clang C compiler features was already dropped by
refactoring in commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default
cmake_record_lang_compile_features macros, 2017-05-10).

Our documentation already claims support for this combination.  This
was simply an oversight when support was added for MinGW Clang C++.

Issue: #15897
Issue: #15943
2017-11-01 07:28:38 -04:00
Brad King
ccf1155977 Merge topic 'freetype-windows'
3d42c3ed FindFreetype: Normalize slashes when legacy FREETYPE_LIBRARY is specified

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1416
2017-10-30 08:59:00 -04:00
Domen Vrankar
5784ab8fca CPack/Deb: handle shlibs file generation when SOVERSION set to 0
Setting CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS did not
auto generate shlibs control file when .so version
of the library was set to 0.

Fixes #17318
2017-10-29 00:20:54 +02:00
Mark Salisbury
3d42c3eda2 FindFreetype: Normalize slashes when legacy FREETYPE_LIBRARY is specified
On Windows if you specify the library path using a regular Windows
path with backslashes, FindFreetype announces that it found the library,
but the value is reported with backslashes instead of forward slashes.
This breaks assumptions elsewhere in CMake.  Convert slashes explicitly
since we have no `find_library` call for `FREETYPE_LIBRARY`.
2017-10-27 10:52:14 -04:00
Brad King
dfaf84ca73 Merge topic 'findICU_update'
20696a53 FindICU: Add support for static libraries on Windows
606ece67 FindICU: Search in 'sbin' directories for icu tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1396
2017-10-27 09:44:34 -04:00
Brad King
0278ec84d8 Merge topic 'clang-cl-TP'
7077a554 Clang: Use -TP flag for C++ sources with clang-cl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1407
2017-10-26 08:56:37 -04:00
Francois Budin
20696a53e4 FindICU: Add support for static libraries on Windows
When compiling ICU statically on Windows with Visual Studio, the library
file names are prefixed with 's' [1].

[1] http://source.icu-project.org/repos/icu/trunk/icu4c/source/icudefs.mk.in
    `STATIC_PREFIX_WHEN_USED = s`
2017-10-25 16:21:48 -04:00
Francois Budin
606ece67ef FindICU: Search in 'sbin' directories for icu tools
On Ubuntu, several binaries that FindICU.cmake searches for are installed
in 'sbin' instead of 'bin' [1].

[1] https://packages.ubuntu.com/xenial/amd64/icu-devtools/filelist
2017-10-25 16:20:19 -04:00
Brad King
7470561278 Merge topic 'flang-windows'
b2c6c357 Flang: Add partial support on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1404
2017-10-25 08:15:43 -04:00
Brad King
fe4d6f1fd6 Merge topic 'omp-oacc-werror-return-type'
15da0ba3 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1406
2017-10-25 08:12:30 -04:00
Brad King
b0207cec32 Merge topic 'findmpi-core-count'
1610f757 FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1405
2017-10-25 08:12:07 -04:00
Brad King
7077a554f1 Clang: Use -TP flag for C++ sources with clang-cl
We do this for `cl`, so we should do it for `clang-cl`.

Fixes: #17394
2017-10-25 07:36:10 -04:00
Isuru Fernando
b2c6c3574e Flang: Add partial support on Windows
Add minimal changes needed to help Flang itself build on Windows using
CMake.  Additional work will be required for full support.

Issue: #17384
2017-10-24 11:27:08 -04:00
Christian Pfeiffer
15da0ba3a2 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type
Explicitly return a value from `main` in our test sources.

Fixes: #17391
2017-10-24 10:55:06 -04:00
Christian Pfeiffer
1610f757ac FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS
Since commit v3.9.0-rc1~224^2~1 (FindMPI: MPIEXEC handling improvements,
2017-04-21) the `ProcessorCount` module is being used to initialize
`MPIEXEC_MAX_NUMPROCS`.  However, this leads to the logical cores being
counted rather than the physical ones, and some MPI implementations like
OpenMPI will error if mpiexec is called with that number.  Switch it to
the number of physical cores using `cmake_host_system_information`.

This ensures that if `MPIEXEC_MAX_NUMPROCS` is being used to set up MPI
tests with CTest or similar that the tests won't spuriously fail due to
OpenMPI refusing to start the application.
2017-10-24 10:41:02 -04:00
Brad King
d93b8009f9 Merge topic 'FindCUDA-doc-format'
17ddf126 FindCUDA: Improve documentation formatting markup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1403
2017-10-24 08:48:45 -04:00
Brad King
047af6e94e Merge topic 'FindOpenCL-more-versions'
55f7930f FindOpenCL: Add detection of OpenCL 2.1 and 2.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1398
2017-10-24 08:48:28 -04:00
Brad King
07253b8919 Merge topic 'gnuid-cmp54-fix'
a8be8b1b GNUInstallDirs: Enable CMP0054

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1400
2017-10-24 08:47:27 -04:00
Brad King
11dcf81c44 Merge topic 'generator-instance'
9ffb3538 VS: Select and save a VS 2017 instance persistently
17edfa41 cmVSSetupHelper: Add option to specify an instance
a19b8113 CheckLanguage: Pass generator instance into check
6b3cd64d ExternalProject: Propagate the generator instance
314613d1 Add infrastructure for generators to select a build tool instance

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1394
2017-10-24 08:22:25 -04:00
Henry Schreiner
17ddf126f0 FindCUDA: Improve documentation formatting markup 2017-10-23 12:17:38 -04:00
Henry Schreiner
55f7930f0e FindOpenCL: Add detection of OpenCL 2.1 and 2.2 2017-10-23 11:39:53 -04:00
Christian Pfeiffer
a8be8b1b54 GNUInstallDirs: Enable CMP0054
Fixes: #17381
2017-10-23 09:02:54 -04:00
Brad King
9ded2fad79 Merge topic 'flang-remove-boundscheck'
3aeff21d Flang: Remove unsupported fbounds-check flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1393
2017-10-23 08:21:23 -04:00
Christian Pfeiffer
3aeff21df7 Flang: Remove unsupported fbounds-check flag
The Flang compiler neither supports nor documents -fbounds-check leading
to -Wunused-command-line-argument warnings with the default Debug flags.
2017-10-19 13:04:50 -04:00
Brad King
a19b811363 CheckLanguage: Pass generator instance into check
Otherwise we do not check for support for the language with the same
generator instance as the caller.
2017-10-19 10:20:11 -04:00
Brad King
6b3cd64d42 ExternalProject: Propagate the generator instance
When the `CMAKE_GENERATOR` option is given to `ExternalProject_Add`,
look also for option `CMAKE_GENERATOR_INSTANCE` to pass on to cmake as a
cache definition.  When no `CMAKE_GENERATOR` option is given explicitly
then use the current project's `CMAKE_GENERATOR_INSTANCE` (since we
already use its CMAKE_GENERATOR).
2017-10-19 10:20:11 -04:00
Brad King
358ceee5d8 Merge topic 'curl_netrc_options'
d45aa38a Add dev notes for topic 'curl_netrc_options'
60c272b6 ExternalProject: Add support for NETRC and NETRC_FILE suboption
754e39dd Add testcases for file(DOWNLOAD|UPLOAD) netrc options
5d67e902 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1376
2017-10-19 09:27:43 -04:00
Brad King
d209275330 Merge topic 'ti-compiler-depfile-support'
ad9327d9 Compiler/TI: Add support for depfile generation for Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1389
2017-10-19 09:27:09 -04:00
Shane Parris
60c272b69a ExternalProject: Add support for NETRC and NETRC_FILE suboption 2017-10-18 15:21:43 -04:00
Nico Müller
ad9327d936 Compiler/TI: Add support for depfile generation for Ninja
TI C/C++ compiler are now able to generate dependency files during
compilation.

Fixes: #17360
2017-10-18 09:43:22 -04:00
Brad King
b0b94cdec5 Merge topic 'cmake-open'
96d642c7 cmake-gui: Use cmake::Open to open generated project
5de37a4a cmake: Add --open option for IDE generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1337
2017-10-18 09:37:59 -04:00
Brad King
0dba1db9d5 Merge topic 'module-fetchcontent'
1e56634f FetchContent: Add tests
60e74d2f FetchContent: New module for populating content at configure time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1306
2017-10-18 09:37:26 -04:00
Brad King
1f436c5803 Merge topic 'findopenmp-lib-paths'
f4cc7109 FindOpenMP: Improve OMP libraries search

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1385
2017-10-18 09:35:29 -04:00
Christian Pfeiffer
f4cc71099a FindOpenMP: Improve OMP libraries search
This supports libraries given as full path and filters libraries given
in CMAKE_<LANG>_STANDARD_LIBRARIES.

Fixes: #17351
2017-10-17 09:53:57 -04:00
Brad King
b361990007 Merge topic 'Linux-CUDA-OpenCL'
060fd233 FindOpenCL: Add support for CUDA OpenCL on Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1387
2017-10-17 08:32:53 -04:00
Craig Scott
60e74d2f19 FetchContent: New module for populating content at configure time 2017-10-17 08:07:09 +11:00
Brad King
800c0e8105 Merge topic 'UseJava-add_jar-split-build-and-output-dirs'
48dcb2f0 UseJava: add_jar OUTPUT_DIR option used only for jar generation.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1380
2017-10-16 09:48:53 -04:00
Brad King
9de7ae6e5e Merge topic 'cpack-wix-cygwin'
e1409101 cpack wix: support WiX generator on Cygwin
e258fe03 cpack wix: fix path error on cygwin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1367
2017-10-16 09:48:02 -04:00
Takenori Yamamoto
060fd23313 FindOpenCL: Add support for CUDA OpenCL on Linux
When setting CUDA_PATH, the include directory ($CUDA_PATH/include) was found, but libOpenCL.so was not found. This patch resloved the issue.
2017-10-15 15:18:17 +09:00
Gregor Jasny
5de37a4a64 cmake: Add --open option for IDE generators 2017-10-13 21:28:34 +02:00
Stephen Sorley
e258fe0396 cpack wix: fix path error on cygwin
Under Cygwin, file(TO_CMAKE_PATH...) outputs invalid paths when given
a Windows path as input (the colon after the drive letter gets replaced
by a semicolon).

As a workaround, just use a string replace to change the slashes instead.
2017-10-13 11:48:36 -04:00
Brad King
8df52df84d Merge topic 'FindPythonLibs-names-per-dir'
192ab741 FindPythonLibs: Allow find_library to search paths from system environment
3976a106 FindPythonLibs: Prefer libs early in search path regardless of name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1378
2017-10-12 09:20:09 -04:00
Brad King
0d508b1ee1 Merge topic 'FindXMLRPC-no-includes'
e7720a0f FindXMLRPC: Tolerate no include directories
b1aa8a47 FindXMLRPC: Drop unnecessary exec_program code paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1377
2017-10-12 09:19:53 -04:00
Brad King
016daf0391 Merge topic 'clang-msvc-help'
b6d3a1c0 Clang: Diagnose unsupported GNU-like clang targeting MSVC ABI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1373
2017-10-12 09:15:57 -04:00
Marc Chevrier
48dcb2f055 UseJava: add_jar OUTPUT_DIR option used only for jar generation.
Build artifacts go to CMAKE_CURRENT_BINARY_DIR subdirectory in all cases.

Fixes: #17341
2017-10-12 13:05:17 +02:00
Brad King
e7720a0f3f FindXMLRPC: Tolerate no include directories
`xmlrpc-c-config $modules --cflags` may report no `-I` flags if the
headers are in a standard location like `/usr/include`.  In this case
it is okay for `XMLRPC_INCLUDE_DIRS` to be empty.

Ideally the `--cflags` output should be used as hints for a `find_path`
call to really find the headers as we do for other find modules, but
simply assuming no explicit include directories are needed is good
enough for now.

Fixes: #17347
2017-10-11 11:19:03 -04:00
Brad King
192ab741ec FindPythonLibs: Allow find_library to search paths from system environment
Drop the `NO_SYSTEM_ENVIRONMENT_PATH` option from our `find_library`
calls.  No other find modules do this.  Also, since commit
v3.3.0-rc1~430^2 (Teach find_(library|file|path) to get prefixes from
PATH, 2015-02-18) we always search the `lib` directory of each prefix
before the `bin` directory and so should prefer the non-`.dll` name.

Issue: #17336
2017-10-11 11:07:58 -04:00
Brad King
3976a1066a FindPythonLibs: Prefer libs early in search path regardless of name
Add `NAMES_PER_DIR` to all `find_library` invocations so that we
consider all possible names in each search directory before moving on to
the next directory.  This helps find the package that appears earliest
in the search path regardless of how it names its libraries.

Fixes: #17336
2017-10-11 10:58:22 -04:00
Brad King
b1aa8a4773 FindXMLRPC: Drop unnecessary exec_program code paths
We always have `execute_process` now, so drop our ancient `exec_program`
code paths that are never used anymore.
2017-10-11 10:31:32 -04:00