Commit Graph

20803 Commits

Author SHA1 Message Date
Brad King 943fe6e3b4 Revert "try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes"
Revert commit v3.6.0-rc1~160^2 (try_compile: Honor
CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11).  The behavior it
introduced can break projects that depend on the lack of such behavior.
We will have to introduce a policy or other mechanism to enable the
behavior in a compatible way.  Simply revert it for now.

See issue #16174.
2016-06-28 15:03:45 -04:00
Brad King f913121758 Merge topic 'compiler-features'
059a6ca0 Merge branch 'unknown-aliased-target' into compiler-features
1d6909a2 use CM_NULLPTR
b4b73f56 cxx features: add check for nullptr
a7a92390 mark functions with CM_OVERRIDE
9e2d6f0c CM_OVERRIDE: mark destructor overridden in the feature test.
2ca76a66 Validate target name in ALIASED_TARGET property getter
2016-06-28 09:06:39 -04:00
Brad King 1b021a64f8 Merge topic 'ninja-no-rsp-for-rc'
15b3f6f0 ninja, rc: ignore CMAKE_NINJA_FORCE_RESPONSE_FILE for RC files
2016-06-28 09:06:34 -04:00
Brad King 059a6ca07a Merge branch 'unknown-aliased-target' into compiler-features 2016-06-28 09:03:00 -04:00
Daniel Pfeifer 1d6909a287 use CM_NULLPTR 2016-06-28 09:02:26 -04:00
Kitware Robot 7287893d41 CMake Nightly Date Stamp 2016-06-28 00:01:07 -04:00
Daniel Pfeifer b4b73f56a2 cxx features: add check for nullptr 2016-06-27 23:24:39 +02:00
Daniel Pfeifer a7a9239096 mark functions with CM_OVERRIDE 2016-06-27 23:24:38 +02:00
Daniel Pfeifer 9e2d6f0c4d CM_OVERRIDE: mark destructor overridden in the feature test.
This is important for two reasons:

1. A compiler might warn about a class that has a virtual member
function but no virtual destructor.  We don't want to treat the feature
as incomplete in this case.

2. MSVC10 supports the override identifier except on destructors.  In
this case, the feature really is incomplete and we want to detect it as
such.
2016-06-27 23:24:09 +02:00
Ben Boeckel 15b3f6f0f1 ninja, rc: ignore CMAKE_NINJA_FORCE_RESPONSE_FILE for RC files
In commit v3.6.0-rc1~174^2 (Ninja: Honor CMAKE_NINJA_FORCE_RESPONSE_FILE
for compile rules, 2016-04-06), Ninja learned to look for
`CMAKE_NINJA_FORCE_RESPONSE_FILE` in the current scope or the
environment in order to force response file usage for all compilation
rules.

However, on Windows, the RC compiler goes through cmcldeps which does a
`replace(output, output + ".dep.obj")` on the command line. However,
with a response file (which we name `output + ".rsp"`), the response
file path is replaced instead causing the compiler to (correctly)
complain that the response file `output + ".dep.obj.rsp"` does not
exist.

What needs to happen is for cmcldeps to look through the response file,
replace *its* contents and place it in the `output + ".dep.obj.rsp"`
file.

Also add a test which actually compiles an RC file into a library and
executable for all generators on Windows and additionally test
`CMAKE_NINJA_FORCE_RESPONSE_FILE` for Ninja generators.

Fixes #16167.
2016-06-27 14:34:06 -04:00
Brad King d3544d023b Merge topic 'compiler-features'
7647f6af Add CM_OVERRIDE to some functions
5286110d cxx features: add check for override
09aa2c94 Use <unordered_set> where available
ea5477e4 Make C++ feature checks extensible
2016-06-27 10:40:35 -04:00
Brad King fd36f4e024 Merge topic 'ninja-osx-content-on-target'
8bbd5db4 Ninja: Make bundle resources a dependency of their target
2016-06-27 10:40:30 -04:00
Daniel Pfeifer 7647f6afa4 Add CM_OVERRIDE to some functions
Run clang-tidy's modernize-use-override checker.  This checker must have
issues in version 3.8.  It has way too little matches.  And it adds
override to destructors.  Revert the changes on the destructors and
change override to CM_OVERRIDE.
2016-06-27 10:37:41 -04:00
Daniel Pfeifer 5286110d6f cxx features: add check for override 2016-06-27 10:37:41 -04:00
Daniel Pfeifer 09aa2c9418 Use <unordered_set> where available 2016-06-27 10:37:40 -04:00
Daniel Pfeifer ea5477e43d Make C++ feature checks extensible
Turn the feature check for cxx11_unordered_map into a function such that
we can use it for other features as well.  Drop the 11 suffix, as we may
want to check features from other standards.
2016-06-27 10:37:40 -04:00
Kitware Robot 99c873c835 CMake Nightly Date Stamp 2016-06-27 00:01:04 -04:00
Gregor Jasny 2ca76a6651 Validate target name in ALIASED_TARGET property getter 2016-06-26 22:00:00 +02:00
Kitware Robot c68cf9e4d1 CMake Nightly Date Stamp 2016-06-26 00:01:05 -04:00
Kitware Robot 3a0449439f CMake Nightly Date Stamp 2016-06-25 00:01:05 -04:00
Kitware Robot f05657de9d CMake Nightly Date Stamp 2016-06-24 00:01:08 -04:00
Florent Castelli 8bbd5db4c1 Ninja: Make bundle resources a dependency of their target
Fixes #13816.
2016-06-23 15:50:03 -04:00
Brad King c2c2a2f4c7 Merge topic 'vs-tool-override'
ed05f11d VS: Add a VS_TOOL_OVERRIDE source file property
2016-06-23 08:59:29 -04:00
Brad King 015876fa81 Merge topic 'vs-sdk-refs'
35a6cac2 VS: Add VS_SDK_REFERENCES target property to reference external SDKs
2016-06-23 08:59:26 -04:00
Brad King f101d4eff3 Merge topic 'xcode-bundle-extension'
e36e5a26 Xcode: Properly handle BUNDLE_EXTENSION
2016-06-23 08:59:23 -04:00
Kitware Robot 46f49c918a CMake Nightly Date Stamp 2016-06-23 00:01:15 -04:00
Brad King d152ae123d CMake 3.6.0-rc3 2016-06-22 09:02:00 -04:00
Gilles Khouzam 35a6cac2d3 VS: Add VS_SDK_REFERENCES target property to reference external SDKs
Allow one to specify external SDK references such as
`Microsoft.AdMediatorWindows81, Version=1.0`.
2016-06-22 08:34:12 -04:00
Kitware Robot de943c3128 CMake Nightly Date Stamp 2016-06-22 00:01:10 -04:00
Brad King 8380f47cc9 Merge topic 'output-converter'
8ddbd4c2 cmOutputConverter: remove unnecessary conversion
bdaadbdc cmOutputConverter: collapse ConvertToOutputForExisting functions
191fc3a0 cmOutputConverter: remove unused 'local' argument
b86007e3 cmOutputConverter: remove 'optional' argument
cde127b0 cmOutputConverter::Convert: invert condition
c23f89bc cmOutputConverter::Convert: make precondition explicit
2016-06-21 13:57:16 -04:00
Brad King b70f18379b Merge topic 'refactor-flags'
41925efe cmGeneratorTarget: Fix Fortran module directory regression
2016-06-21 13:56:59 -04:00
Brad King 41925efe76 cmGeneratorTarget: Fix Fortran module directory regression
Refactoring in commit 49f10f0d (cmGeneratorTarget: Adopt Fortran module
directory generation, 2016-06-10) accidentally made a local variable
declared `static` causing results to be re-used incorrectly.
2016-06-21 13:37:06 -04:00
Kitware Robot 76c186b72f CMake Nightly Date Stamp 2016-06-21 00:01:11 -04:00
Daniel Pfeifer 8ddbd4c280 cmOutputConverter: remove unnecessary conversion 2016-06-20 23:18:59 +02:00
Daniel Pfeifer bdaadbdc2b cmOutputConverter: collapse ConvertToOutputForExisting functions 2016-06-20 23:11:05 +02:00
Daniel Pfeifer 191fc3a0f3 cmOutputConverter: remove unused 'local' argument 2016-06-20 23:03:28 +02:00
Daniel Pfeifer b86007e385 cmOutputConverter: remove 'optional' argument
Remove the 'optional' paramenter from the second overload of the Convert
function.  This parameter is used from one single location.  Inline the
codepath for which the argument is true to the callsite.
2016-06-20 22:32:02 +02:00
Daniel Pfeifer cde127b084 cmOutputConverter::Convert: invert condition
Make the control flow of the 'optional' argument more explicit.
2016-06-20 22:12:36 +02:00
Daniel Pfeifer c23f89bc76 cmOutputConverter::Convert: make precondition explicit 2016-06-20 22:11:20 +02:00
Brad King cd1f1cb544 Merge topic 'cmDependsJavaParserHelper-dangling-ptr'
fe27879c cmDependsJavaParserHelper: fix dangling pointer
2016-06-20 10:58:10 -04:00
Daniel Pfeifer fe27879c6b cmDependsJavaParserHelper: fix dangling pointer
The cmDependsJavaParserHelper tries to implement a "deep copy" in the
assignment operator of the internal class CurrentClass.  To do that, it
uses std::copy and std::back_inserter.  The copy constructor is
implemented in terms of the assignment operator but it does not
initialize the member NestedClasses, a pointer to vector.  This pointer
is dereferenced in the assignment operator.  Change the pointer to a
value and rely on the compiler generated special functions.
2016-06-20 10:56:39 -04:00
Gilles Khouzam ed05f11dd2 VS: Add a VS_TOOL_OVERRIDE source file property
This property allow to specify a specific Visual Studio tool for a
source file overriding the default tool behavior.  For example, a
`.resw` file being processed as a `PriResource` file.  This has the
advantage of being able to teach CMake to process new file types without
code modifications.
2016-06-20 10:46:14 -04:00
Brad King 74fde78311 Merge topic 'cmake-trace-source'
e63151ff cmake: Add an option to control what files needs to be traced
2016-06-20 09:56:06 -04:00
Brad King 711caeb3bd Merge topic 'refactor-flags'
802b36fb cmExtraSublimeTextGenerator: Use GetTargetCompileFlags
3c488ce8 cmLocalGenerator: Adopt target compile flag generation
5467e794 cmLocalGenerator: Add method to get Fortran-specific compiler flags
49f10f0d cmGeneratorTarget: Adopt Fortran module directory generation
0392f72b Refactor Makefile/Ninja tool working directory storage
2016-06-20 09:55:56 -04:00
Brad King af0f1e4f22 Merge topic 'cmake-gui-Qt-LGPLv3'
9ad10c8f cmake-gui: Reference LGPLv3 when redistributing Qt
2016-06-20 09:55:54 -04:00
Brad King 5c7b2aafbd Merge topic 'revert-vs-clang-minsize'
78249be2 VS: Fix regressed mapping for the cl `/Os` compiler flag
2016-06-20 09:55:48 -04:00
Kitware Robot f4c35c3dc2 CMake Nightly Date Stamp 2016-06-20 00:01:06 -04:00
Kitware Robot d637809136 CMake Nightly Date Stamp 2016-06-19 00:01:06 -04:00
Gregor Jasny e36e5a2680 Xcode: Properly handle BUNDLE_EXTENSION 2016-06-18 23:23:32 +02:00
Kitware Robot 2e351f892e CMake Nightly Date Stamp 2016-06-18 00:01:07 -04:00
Brad King 9ad10c8feb cmake-gui: Reference LGPLv3 when redistributing Qt
Download http://www.gnu.org/licenses/lgpl.txt and place it as
Licenses/LGPLv3.txt in our source tree.  When building cmake-gui, use
option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification in the
"About" dialog of how the distribution of Qt is licensed.  Install the
license file as ${CMAKE_ROOT}/Licenses/LGPLv3.txt so that the dialog can
display a path to it.
2016-06-17 15:02:54 -04:00
Tobias Hunger 802b36fb62 cmExtraSublimeTextGenerator: Use GetTargetCompileFlags
Replace some custom code with equivalent code from the framework.

This also fixes some fixmes left in the custom code.
2016-06-17 14:53:01 -04:00
Tobias Hunger 3c488ce899 cmLocalGenerator: Adopt target compile flag generation
Factor the flag generation out of cmCommonTargetGenerator::GetFlags
into a new cmLocalGenerator::GetTargetCompileFlags method.
This will allow it to be used without a target generator available.
2016-06-17 14:49:38 -04:00
Brad King 5467e7945d cmLocalGenerator: Add method to get Fortran-specific compiler flags
Add a cmLocalGenerator::GetTargetFortranFlags virtual method to get
generator-specific generation of Fortran-specific flags.  Implement it
in cmLocalCommonGenerator by moving the implementation from
cmCommonTargetGenerator::AddFortranFlags.  This will allow it to be used
without having a target generator available.

Inspired-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-17 14:49:29 -04:00
Tobias Hunger 49f10f0d24 cmGeneratorTarget: Adopt Fortran module directory generation
Move code to create/get the fortran module directory from the
cmCommonTargetGenerator to cmGeneratorTarget.

Rename the ComputeFortranModuleDirectory method to
CreateFortranModuleDirectory as this method *creates* the directory if
it is missing.
2016-06-17 14:22:29 -04:00
Brad King 0392f72bef Refactor Makefile/Ninja tool working directory storage
Move cmCommonTargetGenerator::WorkingDirectory to cmLocalCommonGenerator
and add an access method.
2016-06-17 14:22:28 -04:00
Alex Turbov e63151ff54 cmake: Add an option to control what files needs to be traced
Even in relatively small projects using `--trace` (and `--trace-expand`)
may produce a lot of output.  When developing a custom module usually
one is interested in output of only a few particular modules.

Add a `--trace-source=<file>` option to enable tracing only a subset of
source files.  The final output would be only from requested modules,
ignoring anything else not matched to given filename(s).
2016-06-17 11:46:23 -04:00
Brad King 9e47255604 Merge topic 'xcode-mig-support'
8be00e44 Help: Add release note about XCODE_FILE_ATTRIBUTES source file property
27eb657d Xcode: Add support for mig files
811f6c82 Xcode: Add XCODE_FILE_ATTRIBUTES source file property
ef494edf Xcode: Don't emit empty settings blocks.
82ebbf68 Xcode: Add function to conditionally add Xcode Attributes
025edea0 Xcode: Add const qualifiers
2016-06-17 11:06:47 -04:00
Brad King e4cb7d7609 Merge topic 'link_what_you_use'
a0902efa Help: Add notes for topic 'link_what_you_use'
96242f80 Add options to run `ldd -u -r` as a "link-what-you-use" tool
2016-06-17 11:06:44 -04:00
Brad King 44f81be934 Merge topic 'CodeBlocks-generated-sources'
afd6cc6b CodeBlocks: Show generated files in non-utility targets
2016-06-17 11:06:40 -04:00
Brad King 9ef7ccdcf9 Merge topic 'CodeBlocks-include-order'
76b462ea cmExtraCodeBlocksGenerator: Do not shuffle include directories
2016-06-17 11:06:37 -04:00
Bill Hoffman 96242f8022 Add options to run `ldd -u -r` as a "link-what-you-use" tool
Create a LINK_WHAT_YOU_USE target property and corresponding
CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior.
Extend link commands by running `ldd -u -r` to detect shared
libraries that are linked but not needed.
2016-06-17 10:56:40 -04:00
James Touton 27eb657d11 Xcode: Add support for mig files 2016-06-17 10:49:06 -04:00
James Touton 811f6c8252 Xcode: Add XCODE_FILE_ATTRIBUTES source file property
This adds values to the ATTRIBUTES list in PBXBuildFile settings.
2016-06-17 10:49:06 -04:00
James Touton ef494edf76 Xcode: Don't emit empty settings blocks. 2016-06-17 10:49:06 -04:00
Gregor Jasny 82ebbf683e Xcode: Add function to conditionally add Xcode Attributes 2016-06-17 10:49:05 -04:00
James Touton 025edea019 Xcode: Add const qualifiers 2016-06-17 10:49:05 -04:00
Brad King 3a50c55ff6 Merge branch 'CodeBlocks-include-order' into release 2016-06-17 10:40:14 -04:00
Tobias Hunger 76b462eacb cmExtraCodeBlocksGenerator: Do not shuffle include directories
Report include directories in a sensible order. Do not shuffle them
when trying to make them unique.
2016-06-17 10:37:29 -04:00
Brad King 4160d68189 Merge branch 'revert-vs-clang-minsize' into release 2016-06-17 10:20:16 -04:00
Brad King 78249be29d VS: Fix regressed mapping for the cl `/Os` compiler flag
In commit v3.6.0-rc1~279^2~10 (VS: in Clang/C2 toolset, setup correct
compiler settings, 2016-02-18) a flag mapping was added for the clang
`-Os` flag.  However, this collides with a mapping we already had for
the MSVC flag of the same name.  This is a symptom of a larger problem
in that the VS generators need a per-toolset flag map (issue #16153).

For now, simply drop the new mapping and drop `-Os` from clang compiler
flags in the MinSizeRel configuration.

Reported-by: Felix Bruns <felixbruns@gmail.com>
2016-06-17 10:18:47 -04:00
Kitware Robot d4283ca18b CMake Nightly Date Stamp 2016-06-17 00:01:07 -04:00
Enrico Bedau afd6cc6b92 CodeBlocks: Show generated files in non-utility targets
Since 2.6.3 the UTILITY target may have source files. A defect was filed
that these files are now visible in the source tree. A fix later removed
all generated files from the source tree, regardless of the target type.
You can't even include them by using the SOURCES option. This fix adds
generated files again, except for the UTILITY target which cluttered the
source tree.

Fixes #14272.
2016-06-16 09:55:29 -04:00
Brad King a854e1795f Merge topic 'cmOutputConverter-stringstream'
d645b03e cmOutputConverter: implement Shell__GetArgument using ostringstream
2016-06-16 09:46:56 -04:00
Brad King 0e523d0612 Merge topic 'cleanup-streams'
ed5fa48d cmXMLWriter: use ifstream from KWSys
24ab29b8 Prefer istringstream and ostringstream over stringstream.
ab8b77dd Remove redundant arguments from fstream constructors
eb79fa72 Access std::ios_base with std::ios
2016-06-16 09:46:54 -04:00
Brad King 290913fab8 Merge topic 'iwyu-preparation'
1c2c6297 cmTargetLinkLibraryType: Extract from cmStandardIncludes.h
ffdc0a8e cmTypeMacro: Extract from cmStandardIncludes.h
e4eb88e2 cmCustomCommandLines: Extract from cmStandardIncludes.h
535ec2bf cmDocumentationEntry: Extract from cmStandardIncludes
c3819aca cmConfigure.h: Establish as 'include first' file
2016-06-16 09:46:49 -04:00
Brad King 84c0fdb192 Merge topic 'clean-up-cmMakefile-IssueMessage'
5bbcf758 cmIfCommand: Don't rely on NestedError logic to issue messages
262ce91e cmMakefile: Extract invoke result variables
2016-06-16 09:46:47 -04:00
Brad King 2701b519b1 Merge topic 'clean-up-Parser'
905e738f Parser: Out-of-line conditional code to cmMakefile
0a9094cd Parser: Issue file open error messages through dedicated API
2016-06-16 09:46:44 -04:00
Brad King ce62454019 Merge topic 'find_package-duplicate-search-paths'
919db25c cmFindPackageCommand: remove duplicate paths from error message
ebf18df5 cmFindPackageCommand: use iterators to loop over configurations
2016-06-16 09:46:42 -04:00
Daniel Pfeifer 1c2c629769 cmTargetLinkLibraryType: Extract from cmStandardIncludes.h 2016-06-16 09:26:50 -04:00
Daniel Pfeifer ffdc0a8e28 cmTypeMacro: Extract from cmStandardIncludes.h 2016-06-16 09:26:33 -04:00
Daniel Pfeifer e4eb88e21d cmCustomCommandLines: Extract from cmStandardIncludes.h 2016-06-16 09:25:22 -04:00
Kitware Robot 83ae79442c CMake Nightly Date Stamp 2016-06-16 00:01:06 -04:00
Daniel Pfeifer d645b03e9c cmOutputConverter: implement Shell__GetArgument using ostringstream
This removes the need to calculate the resulting string length
beforehand.
2016-06-15 23:44:37 +02:00
Kitware Robot 909d51bece CMake Nightly Date Stamp 2016-06-15 00:01:06 -04:00
Daniel Pfeifer ed5fa48d50 cmXMLWriter: use ifstream from KWSys 2016-06-14 23:26:16 +02:00
Daniel Pfeifer 24ab29b882 Prefer istringstream and ostringstream over stringstream.
Use istringsream for parsing, ostringstream for generation.
2016-06-14 22:37:36 +02:00
Daniel Pfeifer ab8b77dd33 Remove redundant arguments from fstream constructors
Don't pass the default value of the openmode parameter explicitly.
2016-06-14 22:28:55 +02:00
Daniel Pfeifer eb79fa7260 Access std::ios_base with std::ios
Just because it is shorter.
2016-06-14 22:23:08 +02:00
Kitware Robot 33f74dc524 CMake Nightly Date Stamp 2016-06-14 00:01:10 -04:00
Daniel Pfeifer 535ec2bf1a cmDocumentationEntry: Extract from cmStandardIncludes 2016-06-13 22:41:29 +02:00
Daniel Pfeifer c3819acad2 cmConfigure.h: Establish as 'include first' file
At the moment, cmStandardIncludes.h needs to be included before any
standard includes because it disables some warnings that are caused
by the standard library of some compilers.  Move this responsibility
to the cmConfigure.h file.

Also add include guards to cmConfigure.h to make sure the file can be
included multiple times.
2016-06-13 22:37:28 +02:00
Stephen Kelly 5bbcf758a1 cmIfCommand: Don't rely on NestedError logic to issue messages 2016-06-13 20:20:44 +02:00
Stephen Kelly 262ce91e8a cmMakefile: Extract invoke result variables
Make it more clear what is happening here.
2016-06-13 20:20:44 +02:00
Stephen Kelly 905e738ffe Parser: Out-of-line conditional code to cmMakefile
Simplify parser API.
2016-06-13 20:19:16 +02:00
Stephen Kelly 0a9094cd10 Parser: Issue file open error messages through dedicated API 2016-06-13 20:19:16 +02:00
Ben Boeckel 919db25c3b cmFindPackageCommand: remove duplicate paths from error message
Fixes #15252.
2016-06-13 11:16:12 -04:00
Ben Boeckel ebf18df580 cmFindPackageCommand: use iterators to loop over configurations 2016-06-13 11:16:10 -04:00
Brad King 9f3546bbb4 CMake 3.6.0-rc2 2016-06-13 10:28:02 -04:00
Brad King 473634eb1c Merge topic 'expose-cache-properties'
63c0e92c cmState: Expose list of properties of values in the cache
6eee2463 cmCacheEntry: Retrieve all properties of cache entries
120899c6 cmPropertyList: Add a way to retrieve all properties
7066218e cmake: Kill cmake::CacheManager and its getter
2016-06-13 10:03:05 -04:00
Brad King 4e66ca1952 Merge topic 'fix-cmake-ISP-violation'
23f87e81 cmake: Remove force from IssueMessage API
54c65d5f cmake: Extract DisplayMessage API.
2016-06-13 09:54:27 -04:00
Brad King 18e00ac7b9 Merge topic 'avoid-cmMakefile-IssueMessage-after-configure'
ea5324cd cmMakefile: Port messages for compile features to cmake
df8c3130 cmGlobalGenerator: Don't use cmMakefile::IssueMessage after configure
946d1e50 cmMakefile: Avoid IssueMessage after configure is finished
096c7754 cmLocalGenerator: Store Backtrace for the directory
2016-06-13 09:54:24 -04:00
Brad King 3b14a4bca4 Merge topic 'fix-Message-API-ISP-violation'
0a4af073 cmake: Issue message independent of cmMakefile definition
2016-06-13 09:54:20 -04:00
Brad King 941fbe31f5 Merge topic 'find-lib32'
896ad251 Teach find_library and find_package to search lib32 paths (#11260)
2016-06-13 09:54:17 -04:00
Brad King ff1cce464d Merge topic 'add-braces'
757b0ff5 Add missing braces around statements in header files
a16bf141 Add missing braces around statements.
bd9e551c PseudoMemcheck: revise style with clang-format.
2016-06-13 09:54:14 -04:00
Brad King 7ce354d3ac Merge topic 'refactor-cmLocalGenerator-flags'
f62ed322 cmLocalGenerator: Add GetTargetDefines to get all defines for a target
853b1bb4 cmLocalGenerator: Constify AppendDefines and AddCompileDefinitions
2016-06-13 09:54:09 -04:00
Kitware Robot 06ee543c00 CMake Nightly Date Stamp 2016-06-13 00:01:05 -04:00
Stephen Kelly 23f87e8157 cmake: Remove force from IssueMessage API
The force parameter is ugly and makes the method harder to reason about
(issues the message ... but maybe it doesn't ... but then again you can
force it).  It is a violation of

 https://en.wikipedia.org/wiki/Interface_segregation_principle

and is the kind of thing described in a recent blog here:

 http://code.joejag.com/2016/anti-if-the-missing-patterns.html

 "Any time you see this you actually have two methods bundled into one.
  That boolean represents an opportunity to name a concept in your code."
2016-06-12 22:09:27 +02:00
Stephen Kelly 54c65d5fb2 cmake: Extract DisplayMessage API. 2016-06-12 22:08:47 +02:00
Stephen Kelly ea5324cd4b cmMakefile: Port messages for compile features to cmake 2016-06-12 19:01:45 +02:00
Stephen Kelly df8c3130d6 cmGlobalGenerator: Don't use cmMakefile::IssueMessage after configure 2016-06-12 19:01:45 +02:00
Stephen Kelly 946d1e50dc cmMakefile: Avoid IssueMessage after configure is finished 2016-06-12 19:01:45 +02:00
Stephen Kelly 096c7754b3 cmLocalGenerator: Store Backtrace for the directory
Don't rely on cmMakefile to provide that.  Use it to issue messages.
2016-06-12 19:01:45 +02:00
Stephen Kelly 0a4af0735f cmake: Issue message independent of cmMakefile definition
The makefile is only used when called by the cmMessageCommand, so inline
the use of it there.  It otherwise creates an undesirable dependency on
cmMakefile for issuing messages in the cmake instance, a violation of
the Interface Segregation Principle.

 https://en.wikipedia.org/wiki/Interface_segregation_principle

This also makes it more explicit that the variable definitions only
affect the message() command.  If an AUTHOR_WARNING is issued for any
other reason, it is not affected.  To affect that, it is necessary to
set the cache variable instead of the regular variable.

This is an unfortunate interface quirk, but one which can't be fixed
easily now.
2016-06-12 18:38:33 +02:00
Kitware Robot acf0c0f444 CMake Nightly Date Stamp 2016-06-12 00:01:09 -04:00
Daniel Pfeifer 757b0ff5dd Add missing braces around statements in header files 2016-06-11 09:49:00 +02:00
Kitware Robot d6e99fa834 CMake Nightly Date Stamp 2016-06-11 00:01:07 -04:00
Daniel Pfeifer a16bf141bc Add missing braces around statements.
Apply fixits of clang-tidy's readability-braces-around-statements
checker.
2016-06-10 18:36:24 +02:00
Daniel Scharrer 896ad251de Teach find_library and find_package to search lib32 paths (#11260)
Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the
``FIND_LIBRARY_USE_LIB64_PATHS`` property.  This helps find commands on
multilib systems that use ``lib32`` directories and either do not have
``lib`` symlinks or point ``lib`` to ``lib64``.
2016-06-10 11:09:16 -04:00
Tobias Hunger 63c0e92c93 cmState: Expose list of properties of values in the cache 2016-06-10 09:33:41 -04:00
Tobias Hunger 6eee24634b cmCacheEntry: Retrieve all properties of cache entries 2016-06-10 09:33:41 -04:00
Tobias Hunger 120899c698 cmPropertyList: Add a way to retrieve all properties 2016-06-10 09:33:02 -04:00
Tobias Hunger 7066218e79 cmake: Kill cmake::CacheManager and its getter
This member variable is never initialized and has apparently moved
to cmState.
2016-06-10 09:27:59 -04:00
Tobias Hunger f62ed322dc cmLocalGenerator: Add GetTargetDefines to get all defines for a target 2016-06-10 09:24:49 -04:00
Brad King 853b1bb4ba cmLocalGenerator: Constify AppendDefines and AddCompileDefinitions 2016-06-10 09:24:11 -04:00
Brad King 98aafb2ad6 Merge topic 'refactor-cmLocalGenerator-flags'
d9613b96 cmLocalGenerator: Move GetFrameworkFlags implementation to private helper
70d3bf85 cmLocalGenerator: Adopt GetFrameworkFlags method
de4ee088 cmCommonTargetGenerator: De-duplicate CMAKE_BUILD_TYPE lookup
2016-06-10 09:10:04 -04:00
Brad King 1bde72a390 Merge topic 'cmake-gui-osx-symlink-qt5-plugin'
f2840155 cmake-gui: Teach Qt5 where plugins are when launched through a symlink
2016-06-10 09:09:47 -04:00
Kitware Robot 1f9b35da10 CMake Nightly Date Stamp 2016-06-10 00:01:06 -04:00
Robert Maynard f28401554a cmake-gui: Teach Qt5 where plugins are when launched through a symlink
When we are on OSX and we are launching cmake-gui from a symlink, the
application will fail to launch as it can't find the qt.conf file which
tells it what the name of the plugin folder is. We need to add this path
BEFORE the application is constructed as that is what triggers the
searching for the platform plugins
2016-06-09 13:21:27 -04:00
Tobias Hunger d9613b962e cmLocalGenerator: Move GetFrameworkFlags implementation to private helper 2016-06-09 10:41:42 -04:00
Tobias Hunger 70d3bf8580 cmLocalGenerator: Adopt GetFrameworkFlags method
Move it from cmCommonTargetGenerator.
2016-06-09 10:39:57 -04:00
Brad King 8f3bd1f454 Merge topic 'ninja-no-ranlib-windows'
ea598671 Run ranlib on archives only if the tool is available
2016-06-09 09:18:28 -04:00
Brad King c21397b2df Merge topic 'refactor-cmLocalGenerator-flags'
b0d3e693 cmLocalGenerator: Pass configuration to GetTargetFlags
2016-06-09 09:18:26 -04:00
Brad King 065bb0ffeb Merge topic 'small-cleanups'
9f25fc4d Prefer std::ostream& over derivatives as parameters
f9cc43ea cmake: remove unnused member Verbose
6e658085 cmake: Fix constness of methods
87ffd76d cmake: Make internal method file static
fa169fe8 Parser: Merge identical conditions
2016-06-09 09:18:23 -04:00
Brad King 01632c2552 Merge topic 'xmlwriter'
e9da5192 CPack/PackageMaker: port to cmXMLWriter
2016-06-09 09:18:21 -04:00
Daniel Pfeifer e9da5192e5 CPack/PackageMaker: port to cmXMLWriter 2016-06-09 09:16:34 -04:00
Kitware Robot 3969994758 CMake Nightly Date Stamp 2016-06-09 00:01:07 -04:00
Daniel Pfeifer 9f25fc4dbb Prefer std::ostream& over derivatives as parameters 2016-06-08 23:08:40 +02:00
Daniel Pfeifer f9cc43ea37 cmake: remove unnused member Verbose 2016-06-08 23:08:33 +02:00
Stephen Kelly 6e65808516 cmake: Fix constness of methods 2016-06-08 23:08:29 +02:00
Stephen Kelly 87ffd76d1a cmake: Make internal method file static 2016-06-08 23:08:24 +02:00
Stephen Kelly fa169fe8a7 Parser: Merge identical conditions 2016-06-08 23:08:14 +02:00
Tobias Hunger de4ee088e7 cmCommonTargetGenerator: De-duplicate CMAKE_BUILD_TYPE lookup 2016-06-08 16:41:41 -04:00
Tobias Hunger b0d3e693f1 cmLocalGenerator: Pass configuration to GetTargetFlags
Move the configuration lookup to call sites.  This will allow
multi-configuration callers to use the method.
2016-06-08 16:18:31 -04:00
Brad King 8632251b25 Merge topic 'find_path-in-framework'
188baef0 find_path: Fix location of <dir/header.h> in a framework on OS X
2016-06-08 12:56:00 -04:00
Brad King 5572f5fffd Merge topic 'clang-format-again'
ff08a80a Source/CPack: Run clang-format to fix style
3b284432 Tests/FindOpenCL: Run clang-format to fix style
2016-06-08 12:55:58 -04:00
Brad King ea59867187 Run ranlib on archives only if the tool is available
CMakeFindBinUtils sets CMAKE_RANLIB to `:` if it is not available in
order to get a no-op.  This does not work on a Windows host build
environment that runs commands in `cmd` instead of `sh`.  Teach the
Ninja and Makefile generators to simply skip the command if it is `:`.

This this was already done by the Makefile generator since commit
v2.6.0~3161 (BUG: Do not write link script lines that use the ':',
2006-06-18), but only when using a link script.

Reported-by: Michael Jäntsch <Michael.Jaentsch@gmx.de>
2016-06-08 12:00:44 -04:00
Kitware Robot 1cfc750150 CMake Nightly Date Stamp 2016-06-08 00:01:07 -04:00
Harry Mallon 188baef00c find_path: Fix location of <dir/header.h> in a framework on OS X
After finding it in `foo.Framework/Headers/dir/header.h`, we should
report the `foo.Framework/Headers` directory, not
`foo.Framework/Headers/dir`, because the former is what actually
contains the path the caller wishes to include.
2016-06-07 09:04:35 -04:00
Brad King ff08a80af1 Source/CPack: Run clang-format to fix style 2016-06-07 08:41:16 -04:00