Commit Graph

16753 Commits

Author SHA1 Message Date
Brad King 78efe8d4fd Merge topic 'file-strings-encoding'
5b30ec28 file: Add ENCODING option to file(STRINGS) command (#10519)
ffa373e7 file: Refactor internal implementation of file(STRINGS)
2014-08-06 09:26:28 -04:00
Clinton Stimpson 5b30ec28f9 file: Add ENCODING option to file(STRINGS) command (#10519)
Support extraction of UTF-8 strings.
2014-08-06 09:23:47 -04:00
Clinton Stimpson ffa373e711 file: Refactor internal implementation of file(STRINGS)
Make room for encoding support.
2014-08-06 09:23:15 -04:00
Brad King c6acbc9063 Genex: Remove unnecessary check of context->Makefile
The context->Makefile is never NULL, but our checks for it convince
Clang scan-build that it might be NULL.  Then it warns about later
unchecked uses.  Drop the unnecessary checks.
2014-08-06 09:11:41 -04:00
Kitware Robot 4ec6ff8f9f CMake Nightly Date Stamp 2014-08-06 00:01:14 -04:00
Brad King 662daff0b2 Merge topic 'vs-default-ignore-libs'
c1580a92 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files
29410df2 cmIDEOptions: Add an AppendFlag method to update multi-valued options
2014-08-05 10:53:27 -04:00
Bill Hoffman 2cac483e64 Fix used value warning.
packageFileName no longer has only one value in this function.  Move the
declaration into the loop and remove its initial and unused asignment.
2014-08-05 10:22:36 -04:00
Brad King 6548e171e3 Merge topic 'fix_truncation_logic_valgrind_output'
b35a7730 Fix truncation of valgrind output logic.
2014-08-05 09:22:35 -04:00
Brad King 99f6eab851 Merge topic 'fix_value_not_used'
aea40fcb Fix scan-build warning parsed is never read after being set.
2014-08-05 09:22:33 -04:00
Brad King 8fef9dd271 Merge topic 'pass_output_by_reference'
7762fffa Change output to be a reference and not a pointer.
2014-08-05 09:22:31 -04:00
Brad King e76b72fa83 Merge topic 'update-kwsys'
60c78367 Merge branch 'upstream-kwsys' into update-kwsys
158c6d1c KWSys 2014-08-04 (e787837a)
2014-08-05 09:22:30 -04:00
Kitware Robot a6c1d58a09 CMake Nightly Date Stamp 2014-08-05 00:01:08 -04:00
Bill Hoffman aea40fcb43 Fix scan-build warning parsed is never read after being set. 2014-08-04 15:38:56 -04:00
Bill Hoffman b35a7730ce Fix truncation of valgrind output logic.
This showed up because scan-build noticed outputFull was basically
a constant. Logic should be output all valgrind output.  Then output
regular test output until output limit is reached.
2014-08-04 15:28:48 -04:00
Bill Hoffman 7762fffa23 Change output to be a reference and not a pointer.
This avoids having to check the pointer value at each use which
was not being done.
2014-08-04 15:16:40 -04:00
Brad King 60c783676c Merge branch 'upstream-kwsys' into update-kwsys 2014-08-04 10:16:34 -04:00
Brad King ba60ff99ed Merge topic 'cmGlobalGenerator-Build-output-ref'
30983ebe cmGlobalGenerator: Take Build output argument by reference
2014-08-04 10:02:28 -04:00
Brad King ba62b3495b Merge topic 'vs-internal-system-apis'
0a5fe279 VS: Add internal API to get system name and version
2014-08-04 10:02:27 -04:00
Brad King 7338d4c211 Merge topic 'vs-refactor-sln-deploy'
fe161dc3 VS: Refactor logic deciding to add "Deploy" to the .sln file
2014-08-04 10:02:25 -04:00
Brad King 4e22fcf215 Merge topic 'vs-vcxproj-missing-newline'
66edd065 VS: Add missing newline after .vcxproj user prop import line
2014-08-04 10:02:23 -04:00
Brad King 628f02ba35 Merge topic 'link-line-dedup'
ccec6df8 Help: Add notes for topic 'link-line-dedup'
9f7e27fc De-duplicate shared library targets in generated link lines
2014-08-04 10:02:16 -04:00
Kitware Robot 1238b3656a CMake Nightly Date Stamp 2014-08-04 00:01:06 -04:00
Kitware Robot 6e1c35f25c CMake Nightly Date Stamp 2014-08-03 00:01:13 -04:00
Kitware Robot ed4b52b025 CMake Nightly Date Stamp 2014-08-02 00:01:09 -04:00
Kitware Robot b0f6d3eb99 CMake Nightly Date Stamp 2014-08-01 00:01:08 -04:00
Gilles Khouzam 401a00d9f9 VS: Set WindowsPhone and WindowsStore min VS version required
Generate the MinimumVisualStudioVersion element in the .vcxproj file
based on the version of WindowsPhone or WindowsStore to be targeted.
2014-07-31 14:09:05 -04:00
Gilles Khouzam 709cebde66 VS: Generate WindowsPhone and WindowsStore application types
Generate the ApplicationType and ApplicationTypeRevision elements in
.vcxproj files.
2014-07-31 14:09:03 -04:00
Gilles Khouzam 72395ab23e VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries 2014-07-31 14:09:01 -04:00
Brad King d7938bff37 VS: Select WindowsPhone and WindowsStore default toolsets
Teach the VS >= 10 generators to recognize these system names and select
the appropriate default toolset for the system version.  Report an error
when the version is not known to be supported by VS.

Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2014-07-31 14:08:46 -04:00
Brad King 3abd150ce9 VS: Save WindowsPhone and WindowsStore system internally
Add boolean members to the VS >= 10 global generator to save
whether CMAKE_SYSTEM_NAME is WindowsPhone or WindowsStore
without having to repeat a string comparison.

Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2014-07-31 14:08:43 -04:00
Brad King c1580a9217 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files
Append %(IgnoreSpecificDefaultLibraries) to any user-specified
libraries so that the system-default list of libraries to ignore
is honored even when the user specifies more.
2014-07-31 14:08:41 -04:00
Brad King 29410df23d cmIDEOptions: Add an AppendFlag method to update multi-valued options 2014-07-31 14:08:39 -04:00
Brad King 30983ebec1 cmGlobalGenerator: Take Build output argument by reference
No call sites pass NULL to the output argument, so take it by
reference to avoid the if(output) conditions.  Propagate the
change through the TryCompile APIs that call it.
2014-07-31 12:49:51 -04:00
Brad King 0a5fe2793a VS: Add internal API to get system name and version
Add cmGlobalVisualStudio10Generator::GetSystemName and GetSystemVersion
methods to access the corresponding members publicly.
2014-07-31 10:47:22 -04:00
Gilles Khouzam fe161dc30d VS: Refactor logic deciding to add "Deploy" to the .sln file
Move the condition to a "NeedsDeploy" virtual method that can be
overridden by more recent VS generators.
2014-07-31 10:46:00 -04:00
Gilles Khouzam 66edd06587 VS: Add missing newline after .vcxproj user prop import line 2014-07-31 10:39:21 -04:00
Brad King bd642272b9 Merge topic 'fix-CMP0049-extra-error'
b2282631 cmTarget: Do not mistake a preceding error for a CMP0049 failure
2014-07-31 09:17:41 -04:00
Brad King c1560296db Merge topic 'update_jacoco_search_paths'
9fd04f87 CTEST: Update Jacoco Coverage search paths
2014-07-31 09:17:39 -04:00
Brad King 2ba18f6284 Merge topic 'cpack-ifw-generator'
e7511b7f CPackIFW: Add package configuration variables
b2340001 CPackIFW: Document cpack_ifw_configure_component DEPENDS option
2014-07-31 09:17:37 -04:00
Brad King 9f575a26fd Merge topic 'pdb-genex'
f86850ef Genex: Implement generator expressions for target PDB files.
028ad318 Genex: Simplify filesytem artifact code
2014-07-31 09:17:35 -04:00
Nils Gladitz f86850ef60 Genex: Implement generator expressions for target PDB files. 2014-07-31 09:17:53 -04:00
Kitware Robot 202b7d12eb CMake Nightly Date Stamp 2014-07-31 00:01:24 -04:00
Brad King b2282631f6 cmTarget: Do not mistake a preceding error for a CMP0049 failure
After calls to ProcessSourceItemCMP0049, check for an empty return
string to detect a failure instead of trusting GetErrorOccuredFlag.
The latter could have been left from a preceding non-fatal error.

Extend the RunCMake.Configure test to cover a case that exposed this
problem.
2014-07-30 13:48:33 -04:00
Joseph Snyder 9fd04f874c CTEST: Update Jacoco Coverage search paths
Add a new additional entry to the FilePaths array when a
"package" tag has been found. This path should consist of the package
information found appended to the projects source directory.

This change will allow code held in a /src/main/java/* directory off of the
projects source directory to be found, unlike now which assumes a subdirectory
contains the code.
2014-07-30 11:22:55 -04:00
Brad King 9f7e27fc3a De-duplicate shared library targets in generated link lines
The linker will bring in shared libraries as a whole and use them even
for symbols that are needed by entries later in the link line.
Therefore we do not need to repeat them.  De-duplicate link entries that
we know are shared libraries because we have a cmTarget associated with
them.

Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2014-07-30 11:14:17 -04:00
Brad King 128a0c36ec Merge topic 'remove-link-remnants'
250ad08a Ninja: Remove _COMPILER_LINKER_OPTION_FLAG_ remnants
2014-07-30 09:31:50 -04:00
Brad King 82a1b4fe51 Merge topic 'vs-refactor-source-tools'
0ac28adc VS: Map .jpg and .png sources to Image tool
58bb14d4 VS: Map .xml to XML tool
972cf1d7 VS: Map .appxmanifest sources to AppxManifest tool
15fb1022 VS: Refactor handling of resx headers
c2ef6d23 VS: Refactor handling of "header" sources in VS >= 10
2df38911 VS: Refactor handling of "extra" sources in VS >= 10
143b4005 VS: Convert 'WriteSource' tool argument to std::string
2014-07-30 09:31:49 -04:00
Brad King 2d4312a160 Merge topic 'cpack-add-lzma'
f931a18c CPack: add generators for .7z and .tar.xz (#13072, #14519)
2014-07-30 09:31:45 -04:00
Kitware Robot b801754d1e CMake Nightly Date Stamp 2014-07-30 00:01:08 -04:00
Konstantin Podsvirov e7511b7fbe CPackIFW: Add package configuration variables 2014-07-29 15:55:19 -04:00
Nils Gladitz 250ad08a08 Ninja: Remove _COMPILER_LINKER_OPTION_FLAG_ remnants 2014-07-29 21:33:38 +02:00
Brad King 0ac28adc01 VS: Map .jpg and .png sources to Image tool
Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2014-07-29 15:06:37 -04:00
Brad King 58bb14d4ac VS: Map .xml to XML tool
Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2014-07-29 15:06:35 -04:00
Brad King 972cf1d7af VS: Map .appxmanifest sources to AppxManifest tool
Inspired-by: Minmin Gong <minmin.gong@gmail.com>
2014-07-29 15:06:32 -04:00
Brad King 15fb102278 VS: Refactor handling of resx headers
Move generation of the ClInclude element to WriteHeaderSource.
2014-07-29 15:06:30 -04:00
Brad King c2ef6d238a VS: Refactor handling of "header" sources in VS >= 10
Create a WriteHeaderSource method to handle writing of sources
classified by cmGeneratorTarget as header files.  This will be
useful to add special VS-specific handling for some headers.
2014-07-29 15:06:28 -04:00
Brad King 2df389115e VS: Refactor handling of "extra" sources in VS >= 10
Create a WriteExtraSource method to handle writing of sources not
classified by cmGeneratorTarget for any particular purpose.  This
will be useful to add special VS-specific handling for some sources.
2014-07-29 15:06:26 -04:00
Brad King 143b40051a VS: Convert 'WriteSource' tool argument to std::string 2014-07-29 15:06:24 -04:00
Daniel Pfeifer f931a18c33 CPack: add generators for .7z and .tar.xz (#13072, #14519) 2014-07-29 09:48:41 -04:00
Nils Gladitz 028ad31878 Genex: Simplify filesytem artifact code 2014-07-29 09:21:34 -04:00
Brad King 38065563b6 Merge topic 'vs10-system-hook'
e58f9753 VS: Add a hook to adapt to SystemName and SystemVersion
d0dd28fa VS: Save system name and version in global generator members
2014-07-29 08:52:24 -04:00
Brad King 104a4cb783 Merge topic 'vs10-comment-typo'
99e14a38 cmGlobalVisualStudio10Generator: Fix typo KHLM => HKLM
2014-07-29 08:52:23 -04:00
Brad King 05d064fec3 Merge topic 'xcode-6-librarian-flags'
608cf814 Xcode: Fix static library creation for Xcode 6 (#15038)
2014-07-29 08:52:17 -04:00
Kitware Robot b6acd96f7f CMake Nightly Date Stamp 2014-07-29 00:01:12 -04:00
Brad King e58f97531a VS: Add a hook to adapt to SystemName and SystemVersion
Add a virtual cmGlobalVisualStudio10Generator::InitializeSystem method
called from SetSystemName once the SystemName and SystemVersion members
have been populated.  This will give VS version-specific generators a
chance to recognize and adapt to the target system.
2014-07-28 16:26:00 -04:00
Brad King d0dd28fa92 VS: Save system name and version in global generator members
Add to cmGlobalVisualStudio10Generator members for SystemName and
SystemVersion and populate them in SetSystemName.
2014-07-28 16:25:08 -04:00
Gilles Khouzam 99e14a3865 cmGlobalVisualStudio10Generator: Fix typo KHLM => HKLM 2014-07-28 16:23:54 -04:00
Brad King 608cf8149c Xcode: Fix static library creation for Xcode 6 (#15038)
Xcode 6 introduced an 'OTHER_LIBTOOLFLAGS' setting for the "Other
Librarian Flags" of a static library.  Now 'OTHER_LDFLAGS' are ignored.
Teach the Xcode generator to choose the correct name for the build
setting based on the type of target and the version of Xcode.

Inspired-by: Jamie Kirkpatrick <jkp@spotify.com>
2014-07-28 13:06:33 -04:00
Brad King 0f06bb52ba Merge topic 'sanitizer_handle_more_pids'
5d40d88e Handle more than one process with sanitizer errors.
2014-07-28 10:35:54 -04:00
Brad King 2699ac5ef7 Merge topic 'fix-re-cmake-with-compiler'
8981513a CMakeDetermineCompiler: Simplify CMAKE_<LANG>_COMPILER default force-cache
731427a6 cmGlobalGenerator: Do not re-add CMAKE_<LANG>_COMPILER
2014-07-28 10:35:53 -04:00
Brad King fd0229e8c5 Merge topic 'fix_qt4_automoc_leak'
0e88b1d6 Fix memory leak of local generator detected by LeakSanitizer.
2014-07-28 10:35:51 -04:00
Brad King 68f4a0ee30 Merge topic 'cpack-ifw-generator'
b9be4d21 Help: Add notes for topic 'cpack-ifw-generator'
73b336c9 CPackIFW: Replace use of strftime with cmTimestamp
44850a26 CPack: Add an "IFW" generator for Qt Framework Installer
2014-07-28 10:35:49 -04:00
Brad King 107db681e3 Merge topic 'vs-escaping'
09164c63 VS: Encode more content correctly in vcxproj files (#15031)
29a0642b VS: Encode mapped flag values in XML project files (#15031)
8fa087ab cmVisualStudioGeneratorOptions: Simplify XML escaping API
1c209ac1 cmIDEOption: Store mapped flag values as a vector<string>
91c93354 cmVisualStudio10TargetGenerator: Remove dupilcate line
2014-07-28 10:35:45 -04:00
Brad King 90f6de8a01 Merge topic 'fix_tar_leaks'
57a2df22 Fix memory leaks in extract tar.
2014-07-28 10:35:44 -04:00
Brad King 9303da53ce Merge topic 'genex-head-sensitive-conditions'
7b743a2e cmTarget: Avoid re-computing head-independent link interfaces
807e4ffe Genex: Track whether an expression depends on the 'head' target
46099b82 cmTarget: Move ComputeLinkImplementation* to internals
438d9c7c cmTarget: Re-order link interface map lookup logic
fe665fdd cmTarget: Refactor link interface map storage
9d13e167 cmTarget: Remove duplicate link interface map
2014-07-28 10:35:42 -04:00
Brad King d128c6c9b3 Merge topic 'target-drop-build-setting-cache'
133cd996 cmTarget: Drop internal cache of build properties
a4d58722 cmTarget: Drop internal cache of link interface usage requirements
2014-07-28 10:35:40 -04:00
Brad King 73b336c9f1 CPackIFW: Replace use of strftime with cmTimestamp
The latter is more portable.
2014-07-28 10:24:03 -04:00
Konstantin Podsvirov 44850a267d CPack: Add an "IFW" generator for Qt Framework Installer
Add support for packaging with the Qt Framework Installer tools:

 http://qt-project.org/doc/qtinstallerframework/index.html

Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
2014-07-28 10:24:03 -04:00
Kitware Robot a971de3adf CMake Nightly Date Stamp 2014-07-28 00:01:06 -04:00
Kitware Robot a31b42a46f CMake Nightly Date Stamp 2014-07-27 00:01:06 -04:00
Kitware Robot 06a190b10a CMake Nightly Date Stamp 2014-07-26 00:01:07 -04:00
Kitware Robot 4d7b9375b0 CMake Nightly Date Stamp 2014-07-25 00:01:07 -04:00
Brad King 731427a646 cmGlobalGenerator: Do not re-add CMAKE_<LANG>_COMPILER
The cmGlobalGenerator::ResolveLanguageCompiler method, invoked only by
Makefile generators, contains code originally added by commit v2.4.0~796
(..., add new generators for msys and mingw, 2005-12-22) to compute the
full path to the compiler and save the result back into the cache value.
Since then the CMakeDetermine*Compiler modules have learned to resolve
the full path to the compiler and save it in CMake*Compiler.cmake files
configured in the build tree.  The value of CMAKE_<LANG>_COMPILER in the
cache is now only for reference of what the user originally specified.
The full path is now available in a normal variable of the same name,
and this is used by project code and the generators.

When the user specifies -DCMAKE_<LANG>_COMPILER=name on the command-line
of an existing build tree that uses a Makefile generator, it is first
stored in the cache with an uninitialized type.  Then later when
ResolveLanguageCompiler updates the cache entry and sets the type to
FILEPATH, cmMakefile::AddCacheDefinition does CollapseFullPath on the
"name" and ends up with something like "$PWD/name" which is unlikely to
be correct.  Furthermore, cmMakefile::AddCacheDefinition proceeds to
remove the normal variable of the same name, so the value originally
saved in CMake<LANG>Compiler.cmake is ignored and the generators use the
wrong path to the compiler.

Resolve this by dropping the code from ResolveLanguageCompiler that
touches the cache value of CMAKE_<LANG>_COMPILER.  As explained above it
is no longer needed anyway.
2014-07-24 13:31:14 -04:00
Bill Hoffman 0e88b1d6d9 Fix memory leak of local generator detected by LeakSanitizer. 2014-07-24 11:33:54 -04:00
Bill Hoffman 5d40d88e00 Handle more than one process with sanitizer errors.
Since the Sanitizers write out one log file per process, a single
test might have more than one log file. This commit allows ctest
to read all of the log files found for a particual test.
2014-07-24 11:25:59 -04:00
Kitware Robot afe21fc3c4 CMake Nightly Date Stamp 2014-07-24 00:01:10 -04:00
Brad King 09164c637b VS: Encode more content correctly in vcxproj files (#15031)
In cmVisualStudio10TargetGenerator, add missing cmVS10EscapeXML
calls around paths to source and object files, custom command
dependencies and outputs, and platform name/version values.
2014-07-23 15:14:47 -04:00
Brad King 29a0642ba7 VS: Encode mapped flag values in XML project files (#15031)
Teach cmVisualStudioGeneratorOptions to encode FlagMap entries
and the FlagString value properly in vcproj/vcxproj XML files.
Update the one existing call site that pre-encoded the value
to not do so.
2014-07-23 15:01:46 -04:00
Brad King 8fa087ab38 cmVisualStudioGeneratorOptions: Simplify XML escaping API
Accept arguments as std::string to avoid c_str() calls.
2014-07-23 14:56:51 -04:00
Brad King 1c209ac165 cmIDEOption: Store mapped flag values as a vector<string>
Some FlagMap entries are ;-lists.  Store values as vector<string> so
that individual values may contain ';' characters.  Delay the
construction of the final ;-list until writing to the VS project file.
With this approach the generated file may contain ;-separated values
that contain encoded ';' characters.
2014-07-23 14:18:53 -04:00
Brad King 91c933546d cmVisualStudio10TargetGenerator: Remove dupilcate line 2014-07-23 13:23:10 -04:00
Bill Hoffman 57a2df224a Fix memory leaks in extract tar. 2014-07-23 11:13:17 -04:00
Brad King fe4e6ed991 Merge topic 'refactor-makerule-path-conversion'
848fab95 cmGlobalVisualStudio7Generator: Remove unused variable
85cea8a7 cmDepends: Refactor object file path conversion
e7ee892b cmLocalGenerator: Fix AddBuildTargetRule object file path conversion
9f92a78b cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'
2014-07-23 09:44:35 -04:00
Brad King 91d21518ae Merge topic 'refactor-generator-startup'
f5c0efdb cmGlobalGenerator: Create a non-virtual 'DoGenerate' method
2014-07-23 09:44:34 -04:00
Kitware Robot 3e3ab2adb4 CMake Nightly Date Stamp 2014-07-23 00:01:09 -04:00
Brad King 848fab9575 cmGlobalVisualStudio7Generator: Remove unused variable 2014-07-22 15:24:57 -04:00
Brad King 85cea8a7af cmDepends: Refactor object file path conversion
Delay conversion of the path to object files (on the left-hand side
of dependencies) until just before they are written.  Also do not
convert the format of paths written to the 'depend.internal' file.
This is consistent with the way the right-hand side of dependencies
are already handled.
2014-07-22 15:24:57 -04:00
Brad King f5c0efdbe4 cmGlobalGenerator: Create a non-virtual 'DoGenerate' method
Make the virtual 'Generate' method protected.  Make 'DoGenerate'
the main entry point to generation.  This gives cmGlobalGenerator
a chance to do some early operations before the individual
generator-specific implementations take over.
2014-07-22 15:05:36 -04:00
Brad King e7ee892b39 cmLocalGenerator: Fix AddBuildTargetRule object file path conversion
The object file list is constructed for a shell, not a Makefile rule.
2014-07-22 12:38:08 -04:00
Brad King 9f92a78be2 cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'
Rename the internal enumeration value for converting paths destined
for use in Makefile rule syntax.
2014-07-22 12:27:57 -04:00