Commit Graph

21420 Commits

Author SHA1 Message Date
Brad King
24c86e1c3f cmake: Use array iteration for default generator VS variants 2016-10-11 13:19:01 -04:00
Brad King
6db64ad432 cmake: Use array iteration for default generator list 2016-10-11 13:17:48 -04:00
Brad King
d3df00ae53 cmake: Rename default generator selection list variable 2016-10-11 13:16:24 -04:00
Brad King
10160f691c cmake: Rename default generator selection internal variable 2016-10-11 11:50:56 -04:00
Brad King
0838d20e50 cmake: Simplify VS registry entry lookup 2016-10-11 11:46:45 -04:00
Brad King
8f33de92ba cmake: Factor out default generator selection into helper 2016-10-11 11:30:46 -04:00
Kitware Robot
2fb8e5b1c4 CMake Nightly Date Stamp 2016-10-11 00:01:06 -04:00
Stephen Kelly
4134030434 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator
Hide some methods which no longer need to be public.
2016-10-10 20:38:59 +02:00
Stephen Kelly
f03d446e96 cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator
Add UseWatcomQuote state, and remove corresponding method parameters.
2016-10-10 20:38:59 +02:00
Stephen Kelly
3444105f9f cmLocalGenerator: Inline last use of local variable 2016-10-10 20:38:59 +02:00
Stephen Kelly
77c4202edc cmLinkLineComputer: Move RPath computation from cmLocalGenerator
Add state for Relink and populate it at the point of cmLinkLineComputer
initialization.  This allows removal of the parameter in go-between
methods.
2016-10-10 20:38:59 +02:00
Stephen Kelly
09b6cc66b0 cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator
Add a ConvertToOutputForExisting method which can be made virtual later
to satisfy different generator needs.

Pass additional strings as parameters for now.  They can be turned into
class state later.
2016-10-10 20:38:58 +02:00
Stephen Kelly
0c97806325 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator
Add a cmOutputConverter to the cmLinkLineComputer and factory methods to
facilitate shell escapes.

Add state to the cmLinkLineComputer to record whether outputting for
response files or for watcom, to satisfy the cmOutputConverter API.
These are constant for the lifetime of the cmLinkLineComputer, even when
its functionality is extended in the future.  This also keeps the
signatures of cmLinkLineComputer relatively simple.

Pass the cmComputeLinkInformation as a method parameter so that
cmLinkLineComputer is free from target-specific state.  An instance
should be usable for all targets in a directory.
2016-10-10 20:38:58 +02:00
Stephen Kelly
0152a01f11 cmLocalGenerator: Move variable to where it is used 2016-10-10 20:38:57 +02:00
Stephen Kelly
011e6870e4 cmLocalGenerator: Use a std::string instead of char* 2016-10-10 20:38:56 +02:00
Stephen Kelly
cbca80f351 cmLocalGenerator: Move stringstream to where it is used 2016-10-10 20:38:56 +02:00
Stephen Kelly
d48f69d0f5 cmLocalGenerator: Move flag determination up in the function
This content is independent of any targets.
2016-10-10 20:38:55 +02:00
Stephen Kelly
ff8e321c6a cmLocalGenerator: Separate stdlib content from library stream 2016-10-10 20:38:55 +02:00
Stephen Kelly
80f57e67ee cmLocalGenerator: Separate rpath content from library stream 2016-10-10 20:38:55 +02:00
Stephen Kelly
7ef8346825 cmLocalGenerator: Pass link library info to OutputLinkLibraries
Remove the cmGeneratorTarget from the interface.

This is simplification of the OutputLinkLibraries responsibilities so
that it can be broken apart into multiple methods.
2016-10-10 20:38:54 +02:00
Stephen Kelly
6929581206 Makefiles: Port CreateLinkLibs to cmLinkLineComputer 2016-10-10 20:38:54 +02:00
Stephen Kelly
5b361fdda0 cmLinkLineComputer: Extract from cmLocalGenerator
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them.  Start to extract the link line
computation.  Create generator-specific implementations of the interface
to account for generator-specific behavior.

Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it.  Isolate it with MSVC60-specific
names.
2016-10-10 20:38:53 +02:00
Stephen Kelly
2e5d1990f3 Ninja: Constify 2016-10-10 20:38:53 +02:00
Stephen Kelly
b3701f9a52 cmLocalGenerator: Inline conversion into link computation
Make it possible to invoke this functionality independent of
cmLocalGenerator.
2016-10-10 20:38:52 +02:00
Brad King
1e6aaefdee Merge topic 'clean-up-link-configuration'
a1cfc4fe cmMakefile: Simplify programmer error to an assert
4079ba20 cmMakefile: Implement LinkLibraries as an internal property
17ab8e33 cmMakefile: Inline method into only remaining caller
7edfcd0e cmMakefile: Inline method into caller
6c8dc7f1 cmake: Simplify find-package mode library addition
1efca9f4 cmMakefile: Remove obsolete parameter
d9b5f0a3 cmTarget: Remove target name from parameter list
1c70c6cc cmMakefile: Use public API to find a target
2b7baed7 cmMakefile: Inline method into only caller
7ba95492 cmMakefile: Use public API to find a target
6d98b15f cmMakefile: Invert if() condition to remove else
869037ee cmMakefile: Remove ALIAS check
2f6462a6 cmMakefile: Collapse two consecutive if()s into one
148b83a1 cmMakefile: DeMorgan-invert condition
4457a9f1 cmMakefile: Return after error and remove else condition
4d039c5b cmMakefile: Invert handling of error condition
...
2016-10-10 10:23:45 -04:00
Brad King
ea533eb715 Merge topic 'ninja-cleanups'
cc5e6b82 Ninja: Extract identical code from condition
d9fde87d Ninja: Replace array access with local variable
d92c160d Ninja: Separate two coupled calls
2016-10-10 10:23:42 -04:00
Brad King
8fe948c54c Merge topic 'minor-cleanups'
c637e0c5 cmMakefile: Return a string from GetDefineFlags
fbc1b75c Test: Remove condition for CMake version no longer supported
3d0e95f6 cmLocalGenerator: Extract definition retrieval out of loop
2a49d86d Makefiles: Inline only use of method
b0301db2 Makefiles: Make helper class independent of cmLocalGenerator
267e0209 cmMakefile: Remove pointless condition
009019f2 Makefiles: Extract identical code from condition
378849f4 Makefiles: Replace array access with local variable
4a3c49b4 Makefiles: Separate two coupled calls
2016-10-10 10:23:39 -04:00
Brad King
e8cdbec45e Merge topic 'update-kwsys'
c22f3cf7 Merge branch 'upstream-KWSys' into update-kwsys
bf28a387 KWSys 2016-10-07 (dfe9b386)
2016-10-10 10:23:30 -04:00
Brad King
d3f1fcf6d1 Merge topic 'android-export-has-cpp'
dda6775c Android: Record use of C++ by static libs in exported Android.mk files
2016-10-10 10:23:27 -04:00
Stephen Kelly
c637e0c53b cmMakefile: Return a string from GetDefineFlags
Flip condition in GHS for readability.
2016-10-10 10:09:54 -04:00
Stephen Kelly
3d0e95f64c cmLocalGenerator: Extract definition retrieval out of loop 2016-10-10 10:09:54 -04:00
Kitware Robot
e3c5aed6ae CMake Nightly Date Stamp 2016-10-10 00:01:04 -04:00
Stephen Kelly
2a49d86d5d Makefiles: Inline only use of method 2016-10-09 10:47:44 +02:00
Stephen Kelly
b0301db23b Makefiles: Make helper class independent of cmLocalGenerator
It only needs output conversion.
2016-10-09 10:47:44 +02:00
Stephen Kelly
267e02097e cmMakefile: Remove pointless condition
This method is never called with an empty string.
2016-10-09 10:47:44 +02:00
Stephen Kelly
009019f259 Makefiles: Extract identical code from condition 2016-10-09 10:47:43 +02:00
Stephen Kelly
378849f41e Makefiles: Replace array access with local variable 2016-10-09 10:47:43 +02:00
Stephen Kelly
4a3c49b469 Makefiles: Separate two coupled calls 2016-10-09 10:47:43 +02:00
Kitware Robot
785bfae867 CMake Nightly Date Stamp 2016-10-09 00:01:05 -04:00
Stephen Kelly
cc5e6b82c2 Ninja: Extract identical code from condition 2016-10-08 11:36:02 +02:00
Brad King
c22f3cf715 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-10-07 (dfe9b386)
2016-10-08 05:25:35 -04:00
Kitware Robot
8312fd5c1f CMake Nightly Date Stamp 2016-10-08 00:01:07 -04:00
Stephen Kelly
a1cfc4fe3d cmMakefile: Simplify programmer error to an assert 2016-10-07 22:08:03 +02:00
Stephen Kelly
4079ba20d9 cmMakefile: Implement LinkLibraries as an internal property
cmMakefile should not have logic particular to individual cmake
commands.  The link_libraries() command is generally obsolete in favor
of target_link_libraries().  An alternative language for CMake probably
would not offer the former.  The quirks and historical behaviors of the
current language should be separate from the core classes of CMake to
allow replacing the language.
2016-10-07 22:07:50 +02:00
Stephen Kelly
17ab8e33f0 cmMakefile: Inline method into only remaining caller 2016-10-07 22:07:16 +02:00
Stephen Kelly
d9fde87d1a Ninja: Replace array access with local variable 2016-10-07 21:37:38 +02:00
Stephen Kelly
d92c160db3 Ninja: Separate two coupled calls 2016-10-07 21:37:38 +02:00
Stephen Kelly
7edfcd0e83 cmMakefile: Inline method into caller
The various uses of AddLinkLibraryForTarget are going away.  This is the
only remaining non-deprecated use.
2016-10-07 21:25:41 +02:00
Brad King
dda6775c94 Android: Record use of C++ by static libs in exported Android.mk files
When a `PREBUILT_STATIC_LIBRARY` uses C++ in its sources then the `.a`
file will have a link-time dependency on the C++ runtime libraries.
Android NDK r14 will add a way to give this information to the NDK build
system by adding a `LOCAL_HAS_CPP` setting to the `Android.mk` file.
Add this for exported static libraries that use C++.
2016-10-07 15:02:42 -04:00
Stephen Kelly
6c8dc7f1df cmake: Simplify find-package mode library addition
It does not need the cmMakefile version.
2016-10-07 20:23:19 +02:00