Commit Graph

5642 Commits

Author SHA1 Message Date
Rishi Theivendran
0c2fb4c896 UseSWIG: Add CSHARP variant for wrapper files
Issue: #18065
Fixes: #18066
2018-06-12 11:34:58 -04:00
Brad King
8dbccd050c Merge topic 'more-misc-typos'
be28106880 Fix misc. typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !2130
2018-06-05 11:26:12 -04:00
Brad King
21b7e14800 Merge topic 'ep-support-passing-var-ending-with-notfound'
7ad5165c67 ExternalProject: Fix cache generation when args end with "-NOTFOUND"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2127
2018-06-05 11:23:49 -04:00
Jean-Christophe Fillion-Robin
7ad5165c67 ExternalProject: Fix cache generation when args end with "-NOTFOUND"
Generalize the fix in commit v3.11.0-rc4~8^2 (ExternalProject: Fix cache
generation when last args ends with "-NOTFOUND", 2018-03-10) to work for
any argument rather than just the last one.

ExternalProject can now successfully generate the cache file when any
(not only the last one) cache variable associated with either
`CMAKE_CACHE_ARGS` or `CMAKE_DEFAULT_CACHE_ARGS` configure step option
is set to a `<value>` ending with `-NOTFOUND`.
2018-06-04 11:37:52 -04:00
luz.paz
be28106880 Fix misc. typos
Found via `codespell` and `grep`
2018-06-04 10:32:49 -04:00
Brad King
1bbee86bf2 Merge topic 'WriteBasicConfigFile_tests'
56f45bb79d Refactor write_basic_package_version_file tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2122
2018-06-04 09:52:00 -04:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00
Brad King
523c443d13 clang-format.bash: update to clang-format-6.0
Update `.clang-format` with configuration to make the 6.0 format as
close as possible to what 3.8 produced before.  Then revise the style:

* Indent preprocessor directives (a feature new since 3.8)
* Add a newline and indentation before inheritance `:` and `,`

Rename the Git attribute identifying the format to include the
clang-format version number: `format.clang-format-6.0`.  This will aid
external infrastructure in knowing what version of the tool to run.
2018-06-01 09:52:02 -04:00
Brad King
b67a5bf175 Tests/VSWinStorePhone: Do not format managed source 2018-06-01 09:52:02 -04:00
Brad King
4144b78013 Merge topic 'autogen_autorcc_multi_config'
5852acffa4 Autogen: Add AUTORCC configuration change test
41685c8ba0 Autogen: Let AUTORCC generate output for all configurations
2930a198f6 Autogen: Add lock file to AUTORCC commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2117
2018-06-01 09:49:37 -04:00
Daniele E. Domenichelli
56f45bb79d Refactor write_basic_package_version_file tests 2018-06-01 14:24:50 +02:00
Rolf Eike Beer
1c5b1ad408 FindALSA: add testcase 2018-05-31 09:35:53 +02:00
Sebastian Holtermann
5852acffa4 Autogen: Add AUTORCC configuration change test 2018-05-30 17:45:01 +02:00
Brad King
958191a95c Merge topic 'vs-toolset-version'
5f13168419 VS: Add option to select the version of the toolset used by VS 2017

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francisco Facioni <fran6co@gmail.com>
Merge-request: !2093
2018-05-30 10:19:21 -04:00
Basil Fierz
5f13168419 VS: Add option to select the version of the toolset used by VS 2017
Add new `version=` parameter in the toolset setting to select the
version.  Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the
version, if one is set (blank indicates default).

Fixes: #17549
2018-05-29 10:12:59 -04:00
Brad King
f248f8ad78 Merge topic 'parallel_build_option'
1ab3881ec9 cmake: Add options for parallel builds to --build mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !1962
2018-05-29 10:05:09 -04:00
Craig Scott
4e890800eb Merge topic 'doxygen-all'
7b2f440e2b FindDoxygen: Add tests for ALL option
79b29b732c FindDoxygen: add optional ALL argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2099
2018-05-29 05:25:04 -04:00
Craig Scott
7b2f440e2b FindDoxygen: Add tests for ALL option 2018-05-27 18:18:40 +10:00
Florian Maushart
1ab3881ec9 cmake: Add options for parallel builds to --build mode
While we already support `cmake --build . -- -j`, the options after `--`
are specific to the native build tool.  Add new options `--parallel
[<N>]` and `-j [<N>]` to abstract this and map to the proper option
for the native build tool.
2018-05-25 09:42:20 -04:00
Brad King
266fd71654 Merge topic 'FindLua-conventional-paths'
f5d19260f9 FindLua: Search for lua.h using more conventional paths
9455512d22 FindLua: Add tests for this module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2095
2018-05-25 09:26:21 -04:00
Alexander Grund
9455512d22 FindLua: Add tests for this module 2018-05-24 11:19:40 -04:00
Mateusz Loskot
357db10bd1 FindODBC: Add module to search for ODBC library
Add tests for FindODBC module.
2018-05-22 21:29:22 +02:00
Brad King
7b42ffce09 Merge topic 'PDBDirectoryGenExpression'
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2083
2018-05-21 11:02:42 -04:00
Marian Klymov
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Fixes: #16365
2018-05-21 11:00:12 -04:00
Brad King
6411180969 Merge topic 'autogen_register_info_files'
3715d0fbcf Tests: Add QtAutogen test for a low cmake_minimum_required version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2077
2018-05-17 09:05:48 -04:00
Sebastian Holtermann
3715d0fbcf Tests: Add QtAutogen test for a low cmake_minimum_required version 2018-05-16 09:11:45 +02:00
Patrick Stotko
c9349cc1b9 target_link_libraries: Allow use with targets in other directories
Previously the command did not allow naming targets on the LHS that
were not created in the calling directory.  Lift this restriction to
enable more flexible use by projects.

Fixes: #17943
2018-05-15 10:22:35 -04:00
Brad King
c29992078f Merge topic 'custom-command-expand-empty'
6e59491659 add_custom_{command,target}: Fix crash on empty expanded command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2074
2018-05-15 09:54:08 -04:00
Brad King
813bcc2997 Merge branch 'custom-command-expand-empty' into release-3.11
Merge-request: !2074
2018-05-14 11:59:51 -04:00
Brad King
6e59491659 add_custom_{command,target}: Fix crash on empty expanded command
Our custom command generation logic assumes that all command lines have
at least `argv0`.  In `add_custom_{command,target}` we already check
that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in
combination with a generator expression that expands to an empty string
may produce an empty command line.  In this case simply add an empty
string as a command to maintain our internal invariant.

Fixes: #17993
2018-05-14 11:54:27 -04:00
Brad King
99e658258e Merge topic 'FindPkgConfig-LINK_LIBRARIES'
92ac721a44 FindPkgConfig: export the list of found libraries also as variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2068
2018-05-14 09:46:31 -04:00
Brad King
a04ca510c1 Merge topic 'cpack-nuget'
f739752ad6 CPack: Add NuGet support
dd43e6fe89 Tests: Format `RunCPackVerifyResult.cmake` more consistently
43582cda57 Tests: Fix comment for finding dpkg tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1972
2018-05-14 09:32:04 -04:00
Rolf Eike Beer
92ac721a44 FindPkgConfig: export the list of found libraries also as variable 2018-05-11 19:35:53 +02:00
Alex Turbov
f739752ad6 CPack: Add NuGet support
Create a CPack generator that uses `nuget.exe` to create packages:

    https://docs.microsoft.com/en-us/nuget/what-is-nuget

NuGet packages could be easily produced from a `*.nuspec` file (running
`nuget pack` in the directory w/ the spec file).  The spec filename does
not affect the result `*.nupkg` name -- only `id` and `version` elements
of the spec are used (by NuGet).

Some implementation details:

* Minimize C++ code -- use CMake script do to the job. It just let the
  base class (`cmCPackGenerator`) to preinstall everything to a temp
  directory, render the spec file and run `nuget pack` in it, harvesting
  `*.nupkg` files...;

* Ignore package name (and use default paths) prepared by the base class
  (only `CPACK_TEMPORARY_DIRECTORY` is important) -- final package
  filename is a responsibility of NuGet, so after generation just scan the
  temp directory for the result `*.nupkg` file(s) and update
  `packageFileNames` data-member of the generator;

* The generator supports _all-in-one_ (default), _one-group-per-package_
  and _one-component-per-package_ modes.
2018-05-11 09:28:44 -04:00
Brad King
1e521a1a91 Merge topic 'restore-imported-lib-alias-diagnostic'
e567d7eb63 add_library: Restore error on alias of non-global imported target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2058
2018-05-11 09:18:08 -04:00
Brad King
e567d7eb63 add_library: Restore error on alias of non-global imported target
In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets
to be aliased, 2017-09-14) we accidentally dropped the error on calling
`add_library` to alias an imported target that is not globally visible.
The `add_executable` command's equivalent check was properly updated.
Restore the check in `add_library` with the same update.  Also fix the
test case accordingly.

Fixes: #17982
2018-05-10 09:57:31 -04:00
Alex Turbov
dd43e6fe89 Tests: Format RunCPackVerifyResult.cmake more consistently 2018-05-09 08:41:58 -04:00
Alex Turbov
43582cda57 Tests: Fix comment for finding dpkg tool 2018-05-09 08:41:58 -04:00
Kyle Edwards
563781099f ctest_start: read model from TAG file
This change reworks ctest_start() so that simply calling
ctest_start(APPEND) will read all the information from the TAG file.
On top of that, it relaxes the argument parsing for ctest_start() to
allow greater flexibility in the argument ordering, and the documentation
for ctest_start() has been cleaned up.
2018-05-09 08:22:55 -04:00
Brad King
42d198744b Merge topic 'deprecate_static_managed_targets'
b7c2b2cd78 cmVisualStudio10TargetGenerator: add handling of static C# targets
d244f2cad3 cmVisualStudio10TargetGenerator: add handling of manual /clr setting
1e5a8f882f cmVisualStudio10TargetGenerator: fix checking for managed target
8d7ffed048 cmVisualStudio10TargetGenerator: issue warning when adding static C# lib
73ee599a82 cmGeneratorTarget: make GetManagedType() return 'Native' for static targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2014
2018-05-08 08:36:20 -04:00
Brad King
7d918b3cee cmRST: Parse inline links and inline literals
Render links as the link text only.  Render literals as themselves.
This is closer to what the Sphinx text generator does.
2018-05-07 10:10:37 -04:00
Michael Stürmer
8d7ffed048 cmVisualStudio10TargetGenerator: issue warning when adding static C# lib 2018-05-07 07:20:46 +02:00
Brad King
5e5ef61ed3 Merge topic 'doc-xref-envvar'
828e18bb3e cmRST: Add support for 'envvar' cmake domain role

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2038
2018-05-04 11:04:53 -04:00
Brad King
fc35e817ee Merge topic 'test-CheckSourceTree-in-source'
46fa1af514 Tests: Fix CheckSourceTree for in-source non-dashboard builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2025
2018-05-04 09:37:14 -04:00
Brad King
efaaa729aa Merge topic 'genex-complang-not-loaded'
4f82199bef Genex: Allow COMPILE_LANGUAGE to name a language that is not loaded

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2031
2018-05-04 09:36:08 -04:00
Brad King
828e18bb3e cmRST: Add support for 'envvar' cmake domain role
This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19).
2018-05-04 07:52:14 -04:00
Craig Scott
7de29da7c4 Merge topic 'feature/cpack-default-package-version'
af1c48871c CPack: Use project version as default for `CPACK_PACKAGE_VERSION`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Harry Mallon <hjmallon@gmail.com>
Merge-request: !2020
2018-05-03 17:18:38 -04:00
Israel Blancas
46fa1af514 Tests: Fix CheckSourceTree for in-source non-dashboard builds
For in-source builds we must tolerate non-tracked files in the
source tree.  Previously we only tolerated them for dashboard
builds during automated testing, but we should tolerate them for
local user builds too.

Fixes: #17868
2018-05-03 09:35:45 -04:00
Henry Schreiner
4f82199bef Genex: Allow COMPILE_LANGUAGE to name a language that is not loaded
Evaluate to false on `$<COMPILE_LANGUAGE:Lang>` if language `Lang`
is not loaded.  This is helpful in exported targets consumed in other
projects that may not enable all the same languages.

Fixes: #17952
2018-05-03 08:34:39 -04:00
Kyle Edwards
edcb545a24 install: add test for new NAMELINK_COMPONENT parameter 2018-05-03 08:08:42 -04:00