Commit Graph

21161 Commits

Author SHA1 Message Date
Brad King 62a79dccc5 Merge topic 'cmake-static-FindCacheFile'
cc770e76 cmake: Make FindCacheFile a static method
2016-09-15 08:46:37 -04:00
Brad King 0063b6b43c Merge topic 'fix-ccmake-sun-gcc'
d4d0c942 ccmake: Fix recent compilation regression with GCC on Solaris
2016-09-15 08:46:34 -04:00
Kitware Robot 100817dc5d CMake Nightly Date Stamp 2016-09-15 00:01:07 -04:00
Brad King 7a2e114dd8 cmTarget: Inline SetType method at only remaining call site 2016-09-14 14:50:40 -04:00
Brad King 00e78c1990 cmTarget: Construct with basic information up front
Avoid having partially constructed cmTarget instances around,
except for the special case of GLOBAL_TARGET construction.
2016-09-14 14:50:39 -04:00
Brad King 9d11bd5066 Avoid requiring default cmTarget constructor for map indexing
The `std::map<>` index operator requires a default constructor on the
value type.  Avoid requiring a default constructor on `cmTarget` just
for this purpose.
2016-09-14 14:50:39 -04:00
Brad King d97513d842 cmTarget: Add method to get a copy adapted for a directory
The "global" targets are built once for the top directory and then
copied into all directories.  Add a helper method to make the copy.
2016-09-14 14:50:39 -04:00
Brad King cc770e7670 cmake: Make FindCacheFile a static method
It does not need access to member data.
2016-09-14 11:49:24 -04:00
Brad King d4d0c94226 ccmake: Fix recent compilation regression with GCC on Solaris
The change in commit 32f756c8 (CursesDialog: include what you use,
2016-09-01) revealed that an ancient workaround for compiling with GCC
on Solaris has not had an effect in a long time and is now incorrect.
Drop it.
2016-09-14 10:51:27 -04:00
Brad King 04d94fbe92 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-09-14 (c4049689)

Issue: #16295
2016-09-14 09:49:37 -04:00
Brad King e4fc770fa3 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-09-14 (e736efa1)
2016-09-14 09:41:55 -04:00
Brad King ea69e03afa Merge topic 'minor-cleanup'
6a9ed3d4 cmGeneratorTarget: factor out a space
2016-09-14 09:02:29 -04:00
Brad King e9dbb272e0 Merge topic 'cmake-E-help-order'
e952f1bd cmcmd: Fix sort order in help output
2016-09-14 08:56:25 -04:00
Brad King 171ea5d3cf Merge topic 'file-curl-userpw'
abeb42f1 Help: Add notes for topic 'file-curl-userpw'
e5ba1041 file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption
2016-09-14 08:56:22 -04:00
Brad King b93623550d Merge topic 'add_androidmk_generator'
42ce9f1e Add support for creating prebuilt Android.mk files
d5257063 Export: Virtualize file generation step helpers
f81b9475 Export: Factor out file generation steps into helpers
2016-09-14 08:56:19 -04:00
Brad King 35e3836589 Merge topic 'ctest-subdir-spaces'
1f8613e9 Fix CTest test file generation for spaces in subdirectory names
385e6a27 cmLocalGenerator: Refactor test subdirectory generation loop
2016-09-14 08:56:16 -04:00
Brad King 321c179962 Merge topic 'cmake-gui-open-project'
1ca2d5d1 cmake-gui: Add button to open the generated project
2016-09-14 08:56:12 -04:00
Kitware Robot 989ca432e4 CMake Nightly Date Stamp 2016-09-14 00:01:04 -04:00
Nico Heßler 1ca2d5d1db cmake-gui: Add button to open the generated project
Look for VS or Xcode project files at the top of the build tree.
If present, enable an "Open Project" button to open them through
the OS desktop services.
2016-09-13 16:11:29 -04:00
Stefano Soffia 1f8613e9ba Fix CTest test file generation for spaces in subdirectory names
Encode the subdirectory names properly for CMake syntax.

Closes: #16299
2016-09-13 13:58:46 -04:00
Stefano Soffia 385e6a274d cmLocalGenerator: Refactor test subdirectory generation loop 2016-09-13 13:57:59 -04:00
Ruslan Baratov e5ba1041be file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption 2016-09-13 20:24:12 +03:00
Bill Hoffman 42ce9f1e71 Add support for creating prebuilt Android.mk files
Add options to the `install()` and `export()` commands to export the
targets we build into Android.mk files that reference them as prebuilt
libraries with associated usage requirements (compile definitions,
include directories, link libraries).  This will allow CMake-built
projects to be imported into projects using the Android NDK build
system.

Closes: #15562
2016-09-13 12:47:43 -04:00
Brad King 07f69bd5cc cmSystemTools: Add strverscmp
Add support for natural string order by comparing non-numerical
character directly and numerical number by firstly collecting contiguous
digits.  The order is defined by the `strverscmp(3)` manual [1].

[1] http://man7.org/linux/man-pages/man3/strverscmp.3.html

Inspired-by: Pierluigi Taddei <pierluigi.taddei@gmail.com>
2016-09-13 11:52:28 -04:00
Brad King 112f758223 Merge topic 'cmake-server-prepare'
3e58b9af cmake: Factor out method to find the CMakeCache.txt file
c73967cb cmake: Introduce ReportCapabilitiesJson
366e3828 Update .gitignore
2016-09-13 11:40:50 -04:00
Brad King 994e98bf41 Merge topic 'timestamp-names'
410add40 Help: Add notes for topic 'timestamp-names'
751f7b52 string(TIMESTAMP ...): add '%a' and '%b' format specifiers
2016-09-13 11:40:47 -04:00
Brad King f51f4ee9a3 Merge topic 'fix-ctest-segfault'
b35311ca CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled
2016-09-13 11:40:44 -04:00
Brad King 5b85a3e26c Merge topic 'link-generated-rpaths-first'
9370b697 Re-order link line to place RPATH entries before libraries
2016-09-13 11:40:38 -04:00
Brad King 8a56e311ec Merge topic 'file-download-unexpected-arg'
4dd997da file(DOWNLOAD|UPLOAD): Warn on unexpected arguments
2016-09-13 11:40:35 -04:00
Ben Boeckel 6a9ed3d4ae cmGeneratorTarget: factor out a space 2016-09-13 11:22:42 -04:00
Tobias Hunger e952f1bdc7 cmcmd: Fix sort order in help output
sort "sleep" before "tar", not after
2016-09-13 11:47:03 +02:00
Kitware Robot 1ba87fd174 CMake Nightly Date Stamp 2016-09-13 00:01:06 -04:00
Tobias Hunger 3e58b9af57 cmake: Factor out method to find the CMakeCache.txt file 2016-09-12 22:00:22 +02:00
Nils Gladitz b35311ca44 CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled
Before the change the list of externals was queried only
before the svn update.

With the change the list is queried both before and after.
This should also be more accurate since the list of externals might
change during the update.
2016-09-12 19:40:13 +02:00
Ruslan Baratov 751f7b5255 string(TIMESTAMP ...): add '%a' and '%b' format specifiers
%b: Abbreviated month name (e.g. Oct).
%a: Abbreviated weekday name (e.g. Fri).
2016-09-12 19:07:38 +03:00
Tobias Hunger c73967cb4a cmake: Introduce ReportCapabilitiesJson
Introduce cmake::ReportCapabilitiesJson which returns a the Json object
that is serialized in cmake::ReportCapabilities.

This allows to re-use the information in cmake-server.
2016-09-12 17:24:06 +02:00
Dan Kegel 9370b697e9 Re-order link line to place RPATH entries before libraries
Since we support adding arbitrary flags to the link line via
`target_link_libraries` the project/user may add their own RPATH flags
(typically for system library locations).  Re-order the link line to
place our generated RPATH entries before the libraries so that they also
come before flag-specified entries.  Otherwise our in-build-tree RPATH
entries may not be preferred by the dynamic loader and we could collide
with libraries in the system directories.

Closes: #16293
2016-09-12 10:51:18 -04:00
Brad King 03bae46865 Merge topic 'clang-tidy'
73128b82 cmDependsFortran: simplify boolean expression
8f324c7c cmSystemTools: simplify boolean expressions
5d3b5bef QCMakeCacheView: simplify boolean expression
ad42eb33 QCMakeCacheView: no else after return
2016-09-12 09:31:45 -04:00
Brad King a3aaf0a181 Merge topic 'drop-cygwin-binary'
db915a37 Utilities/Release: Drop Cygwin binary
2016-09-12 09:31:39 -04:00
Brad King f27f6f8f3f Merge topic 'wix-feature-patch'
c0bccc51 CPackWIX: Enabled patching of WIX <Feature> tags
2016-09-12 09:31:35 -04:00
Brad King 58e56607c1 Merge topic 'vs-default-v100'
861f1b3d VS: Do not default to missing v100 64-bit toolset on VS 2010 Express
2016-09-12 09:31:32 -04:00
Daniel Pfeifer 73128b823c cmDependsFortran: simplify boolean expression 2016-09-12 09:28:21 -04:00
Daniel Pfeifer 8f324c7cef cmSystemTools: simplify boolean expressions 2016-09-12 09:28:21 -04:00
Brad King db915a3785 Utilities/Release: Drop Cygwin binary
Cygwin has packaged CMake independently of upstream for a long time.
See its [cygport](https://github.com/cygwinports/cmake).
2016-09-12 09:22:50 -04:00
Kitware Robot 5088765a2c CMake Nightly Date Stamp 2016-09-12 00:01:04 -04:00
Kitware Robot 4e3166ae1a CMake Nightly Date Stamp 2016-09-11 00:01:06 -04:00
Kitware Robot d90432c335 CMake Nightly Date Stamp 2016-09-10 00:01:08 -04:00
Ruslan Baratov 4dd997da54 file(DOWNLOAD|UPLOAD): Warn on unexpected arguments
Emit warning message on unparsed argument instead of silently ignoring it.
Can't stop with the error message because it may break old code.
2016-09-09 23:19:39 +03:00
Brad King 2572b824d4 Merge topic 'cmGeneratorTarget-cleanup'
cc6b948e cmGeneratorTarget: factor out common part of AddSources commands
52052ef8 cmGeneratorTarget: use erase-unique instead of reinitialization
3b362230 cmGeneratorTarget: don't clear container in destructor
2016-09-09 11:18:10 -04:00
Brad King c40cbccf7d Merge topic 'parse_arguments_argv_n'
cb299acc cmake_parse_arguments: Add option to read arguments from ARGC/ARGV#
2016-09-09 11:18:07 -04:00
Brad King c580227173 Merge topic 'fortran-parser-keywords'
695f0d0d cmFortranParser: Parse keywords as lexical tokens
1619fb46 cmFortranParser: Simplify grammar by skipping unknown statements
2016-09-09 11:18:04 -04:00
Brad King 861f1b3da6 VS: Do not default to missing v100 64-bit toolset on VS 2010 Express
Since commit 059c230d (VS: Explicitly default to v100 toolset in Visual
Studio 2010, 2016-07-21) the VS 2010 generator now correctly defaults to
the v100 toolset instead of no toolset.  However, this broke our logic
for defaulting to the `Windows7.1SDK` toolset for 64-bit builds on VS
2010 Express.  Fix the logic by ignoring the `v100` default in the case.
2016-09-09 10:17:23 -04:00
Michael Stürmer c0bccc51df CPackWIX: Enabled patching of WIX <Feature> tags 2016-09-09 13:03:57 +02:00
Kitware Robot d62a5dfc86 CMake Nightly Date Stamp 2016-09-09 00:01:05 -04:00
Daniel Pfeifer cc6b948e5e cmGeneratorTarget: factor out common part of AddSources commands 2016-09-08 23:47:16 +02:00
Daniel Pfeifer 52052ef88b cmGeneratorTarget: use erase-unique instead of reinitialization
Just to make it easier to find places where containers are cleared in
order to be recomputed.
2016-09-08 23:46:45 +02:00
Daniel Pfeifer 3b3622305b cmGeneratorTarget: don't clear container in destructor
It will be destroyed anyway.  This also makes it easier to search for
places where containers are atually cleared in order to be recomputed.
2016-09-08 23:46:18 +02:00
Daniel Pfeifer 5d3b5bef11 QCMakeCacheView: simplify boolean expression 2016-09-08 23:35:59 +02:00
Daniel Pfeifer ad42eb33b6 QCMakeCacheView: no else after return 2016-09-08 23:33:08 +02:00
Bill Hoffman cb299acc27 cmake_parse_arguments: Add option to read arguments from ARGC/ARGV#
The `ARGC`/`ARGV#` variables in function scope hold the original
arguments with no ;-list flattening.  Add a way for functions to
cleanly parse arguments that may contain `;`.  This also avoids
extra copying of the arguments.

Co-Author: Brad King <brad.king@kitware.com>
2016-09-08 11:33:46 -04:00
Bill Hoffman d5257063b0 Export: Virtualize file generation step helpers
Allow subclasses to override the actual content generation.
2016-09-08 10:37:33 -04:00
Bill Hoffman f81b9475f3 Export: Factor out file generation steps into helpers
Do not actually generate any content in the driving code paths.
Use helpers for that.
2016-09-08 10:37:31 -04:00
Brad King 695f0d0d3a cmFortranParser: Parse keywords as lexical tokens
Teach the lexer to match and return specific Fortran keywords as tokens.
Update the parser to use these instead of always using a WORD token and
then checking the text.  This avoids extra string comparisons and will
allow more grammar productions to be unambiguously added later for
additional Fortran statements.
2016-09-08 09:40:02 -04:00
Brad King 1619fb46a8 cmFortranParser: Simplify grammar by skipping unknown statements
Our Fortran grammar is a bare minimum to extract dependencies.
Other statement syntax can be ignored, so simply skip to the
end of unrecognized statements.  This allows some of our existing
productions to be dropped.
2016-09-08 09:40:02 -04:00
Brad King f506489d1e Merge topic 'fortran-depend-cleanup'
d28da906 cmFortranParser: Inject a newline at end-of-file when missing
8c65a501 cmFortranParser: Revise indentation style to match rest of CMake
f70c71c5 cmFortranLexer: Update to flex 2.6
e11cd31f Fortran: Warn when dependency scanning fails to parse a source file
2016-09-08 09:36:57 -04:00
Brad King 988b3806b6 Merge topic 'vs-15-generator'
bdc679a8 VS15: Add Visual Studio 15 generator
a8936656 VS: Update v140 flag tables from VS 15 MSBuild files
21346d3f Features: Record features for VS 15 Preview 4
2016-09-08 09:36:54 -04:00
Brad King 04657ee2f8 Merge topic 'install-export-root-prefix'
290e4ce8 install: Fix computed import prefix in export files when it is "/"
2016-09-08 09:36:51 -04:00
Kitware Robot 5d0d9b36f2 CMake Nightly Date Stamp 2016-09-08 00:01:05 -04:00
Brad King bdc679a8ae VS15: Add Visual Studio 15 generator
Call the generator "Visual Studio 15" without any year because the
preview version of VS 15 does not provide a year in the product name.

Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator
and update version numbers accordingly.  Add the VS15 enumeration value.
Note that we do not need to add a MSVC15 variable or v150 toolset
because Visual Studio 15 comes with an updated version of the v140
toolset and remains ABI-compatible.

Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and
RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14.

Closes: #16143
2016-09-07 15:49:08 -04:00
Brad King 85bfec7572 Merge topic 'fix-continue-after-error'
f1ad71d7 cmMakefile: Restore nested error logic use of cmExecutionStatus
2016-09-07 09:48:32 -04:00
Brad King 4469e986ee Merge topic 'include-what-you-use'
d47c7bf6 CPack: include what you use
2016-09-07 09:48:29 -04:00
Brad King bb000ba4fa Merge topic 'wix-fix-static-prefix'
1bc33257 CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation
2016-09-07 09:48:26 -04:00
Brad King 6137054744 Merge topic 'vs-minor-cleanups'
042aca55 VS: Verify that MSBuild.exe and devenv.com exist before using them
a756c74d Help: Clarify meaning of MSVC<NN> variables
2016-09-07 09:48:21 -04:00
Kitware Robot 21ace9d9c4 CMake Nightly Date Stamp 2016-09-07 00:01:04 -04:00
Daniel Pfeifer d47c7bf608 CPack: include what you use 2016-09-07 00:21:35 +02:00
Ben Keller 290e4ce8a8 install: Fix computed import prefix in export files when it is "/"
When exporting from a project (with install(EXPORT ...)), the
`<PROJECT>Targets.cmake` file contains logic for computing the
`_IMPORT_PREFIX` from its own location.  This `_IMPORT_PREFIX` is then
used in the `<PROJECT>Targets-<config>.cmake` file to generate the
`IMPORTED_LOCATION_<CONFIG>`.  The generation unconditionally appends a
"/" to `_IMPORT_PREFIX` before appending the rest of the path.  If
`_IMPORT_PREFIX` is "/", then the `IMPORTED_LOCATION_<CONFIG>`
properties all start with exactly two leading slashes ("//").

Exactly two leading slashes is a special case in POSIX file paths, such
that its interpretation is left up to the implementation.  This means
that changing the path prefix from "/" to "//" should not be allowed.

Since references to `_IMPORT_PREFIX` are always followed by a "/",
simply check the value to replace "/" with "".
2016-09-06 16:47:02 -04:00
Brad King f1ad71d7f8 cmMakefile: Restore nested error logic use of cmExecutionStatus
Since commit 14a8d61f (cmMakefile: Port nested error logic away from
cmExecutionStatus) we fail to continue processing function and macro
bodies after non-fatal errors.  A non-fatal error should not stop
foreach loops, macro bodies, nested bodies, or the outer script.
Add a test covering these cases, and revert the change to fix them.

Also revert commit 2af853de (cmMakefile: Simplify IssueMessage
implementation) because the assertion it added (which was removed by the
above commit and is restored by reverting it) is incorrect.  We do have
code paths that call cmMakefile::IssueMessage with an empty execution
stack, such as in CheckForUnusedVariables's LogUnused call.
2016-09-06 16:20:39 -04:00
Brad King d28da906fe cmFortranParser: Inject a newline at end-of-file when missing
Our parser grammar expects all statements to end in an `EOSTMT` token
such as a newline.  Ensure that the last statement in a file can be
parsed even if it is missing a newline.
2016-09-06 15:52:40 -04:00
Brad King 8c65a5017f cmFortranParser: Revise indentation style to match rest of CMake
While at it, remove unused token CPP_TOENDL.
2016-09-06 15:52:40 -04:00
Brad King f70c71c5a9 cmFortranLexer: Update to flex 2.6
Revise the documented modifications we need to make to the
flex-generated source file according to the needs of the new version.
Also drop the duplicate copyright notice block from the generated file.
2016-09-06 15:52:40 -04:00
Brad King e11cd31fa0 Fortran: Warn when dependency scanning fails to parse a source file
We expect to handle all relevant statements and ignore those that we do
not understand.  Warn if this process ever fails.  Otherwise dependency
information may be silently left out.
2016-09-06 15:40:04 -04:00
Michael Stürmer 1bc33257d4 CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation
Commit 17bbf6af (CPackWIX: Implement new CPACK_WIX_SKIP_PROGRAM_FOLDER
feature) generates GUIDs for most but not all components
when the feature is active.

Generate the remaining GUIDs as well.

Co-Author: Nils Gladitz <nilsgladitz@gmail.com>
2016-09-06 17:44:48 +02:00
Brad King a8936656fa VS: Update v140 flag tables from VS 15 MSBuild files
Run cmparseMSBuildXML.py on cl.xml, lib.xml, link.xml, and masm.xml to
generate our flag tables:

 python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/cl.xml" > cmVS14CLFlagTable.h
 python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/lib.xml" > cmVS14LibFlagTable.h
 python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/link.xml" > cmVS14LinkFlagTable.h
 python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/BuildCustomizations/masm.xml" > cmVS14MASMFlagTable.h

Manually integrate the changes with those we've made since earlier
import to add the new flag mappings.
2016-09-06 10:22:39 -04:00
Brad King 042aca557d VS: Verify that MSBuild.exe and devenv.com exist before using them 2016-09-06 10:22:39 -04:00
Brad King 8317ea01aa Merge topic 'genex-LINK_ONLY-not-linking'
f6fd0abc Genex: Diagnose invalid LINK_ONLY usage instead of crashing
2016-09-06 08:51:05 -04:00
Brad King cdc911dc53 Merge topic 'cpack-deb-long-filenames'
4ffdd564 CPack/DEB: Add option to select archive type
2016-09-06 08:50:58 -04:00
Brad King 19255a3516 Merge topic 'macro-parenthesis'
1a9de803 surround macro arguments with parentheses
2016-09-06 08:50:55 -04:00
Brad King eb226b366f Merge topic 'cm_nullptr'
0039ffa2 use CM_NULLPTR
2016-09-06 08:50:53 -04:00
Brad King 933fc4ac47 Merge topic 'qtdialog-tidy'
62c5f9af QtDialog: fix clang-tidy warnings
2016-09-06 08:50:50 -04:00
Daniel Pfeifer 62c5f9afc3 QtDialog: fix clang-tidy warnings 2016-09-06 08:42:54 -04:00
Kitware Robot 7727915395 CMake Nightly Date Stamp 2016-09-06 00:01:05 -04:00
Daniel Pfeifer 0039ffa216 use CM_NULLPTR 2016-09-05 23:18:05 +02:00
Daniel Pfeifer 1a9de8035c surround macro arguments with parentheses 2016-09-05 22:09:49 +02:00
Brad King 4f83077e2d Merge topic 'include-what-you-use'
32f756c8 CursesDialog: include what you use
2016-09-05 09:29:33 -04:00
Brad King 750789af42 Merge topic 'tidy-readability-redundant-string-cstr'
60dcaaea tidy: Fix readability-redundant-string-cstr issues
2016-09-05 09:29:30 -04:00
Domen Vrankar 4ffdd564eb CPack/DEB: Add option to select archive type
Add a `CPACK_DEBIAN_ARCHIVE_TYPE` option that can be used to select an
archive type that supports long file names.

Closes: #14332
2016-09-05 09:24:45 -04:00
Brad King f6fd0abc5b Genex: Diagnose invalid LINK_ONLY usage instead of crashing
When `$<LINK_ONLY:...>` is used outside of linking we may evaluate it
without a `dagChecker`.  Do not dereference the NULL pointer and issue a
diagnostic instead.

Closes: #16287
2016-09-05 09:06:00 -04:00
Kitware Robot f6428725bb CMake Nightly Date Stamp 2016-09-05 00:01:06 -04:00
Gregor Jasny 60dcaaea13 tidy: Fix readability-redundant-string-cstr issues 2016-09-04 16:55:05 +02:00
Kitware Robot fb357e5fef CMake Nightly Date Stamp 2016-09-04 00:01:05 -04:00