summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* cmMakefile: Store macro list in a vector not in a map.Stephen Kelly2015-02-211-3/+2
| | | | | The signature was computed (incorrectly) and stored as the map value, but never used. Remove it now.
* Merge topic 'cmStandardIncludes-cleanup'Brad King2015-02-101-0/+1
|\ | | | | | | | | | | | | af65da0a cmStandardIncludes: Remove list include. e848cc50 cmStandardIncludes: Remove deque include. 5fea6898 cmStandardIncludes: Remove some VS6 workarounds.
| * cmStandardIncludes: Remove deque include.Stephen Kelly2015-02-061-0/+1
| | | | | | | | Include it only where used.
* | cmMakefile: Remove ExpandSourceListArguments.Stephen Kelly2015-02-051-11/+0
|/
* Merge topic 'fix-COMPILE_FEATURES-genex'Brad King2015-01-151-3/+3
|\ | | | | | | | | | | 45ec182d Features: Fix the COMPILE_FEATURES genex for unavailable features. 2bead0eb cmMakefile: Rename a method to what it really does.
| * cmMakefile: Rename a method to what it really does.Stephen Kelly2015-01-121-3/+3
| | | | | | | | The method does not test availability of compile features.
* | cmMakefile: store the number of last matches in a CMake varBen Boeckel2014-12-031-0/+3
| | | | | | | | | | | | | | | | | | With PushScope and PopScope, keeping track of another bit of data for each scope isn't easy. Instead, store it as another CMake variable so it gets implicitly tracked along with everything else. This works in a revert of commit 7d674b5f0b28a610333644d417c2e8cb796cc9e4.
* | Merge branch 'revert-cached-regex-clear' into ↵Brad King2014-11-261-5/+0
|\ \ | |/ | | | | | | | | revert-cached-regex-clear-for-master Resolve conflict in Source/cmMakefile.h by integrating both changes.
| * Revert "ClearMatches: Only clear matches which were actually set" (#15261)Ben Boeckel2014-11-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit v3.1.0-rc1~557^2~2 (ClearMatches: Only clear matches which were actually set, 2014-03-12). The optimization did not track the match count in the same scope as the variables, allowing possible inconsistency. Resolve conflicts in Source/cmIfCommand.cxx, Source/cmMakefile.cxx, and Source/cmMakefile.h by moving the changes to the new location of the code involved.
* | Track nested loop levels in CMake language with a stack of countersGregor Jasny2014-11-251-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | It gets incremented while entering a loop block (e.g. foreach or while) and gets decremented when leaving the block. Because scope borders for example at function borders must be taken into account the counter is put into a stack. With every new scope an empty counter is pushed on the stack, when leaving the scope the original value is restored. This will allow easy querying if the break command is properly nested within a loop scope. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* | Add an option for explicit BYPRODUCTS of custom commands (#14963)Brad King2014-11-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common idiom in CMake-based build systems is to have custom commands that generate files not listed explicitly as outputs so that these files do not have to be newer than the inputs. The file modification times of such "byproducts" are updated only when their content changes. Then other build rules can depend on the byproducts explicitly so that their dependents rebuild when the content of the original byproducts really does change. This "undeclared byproduct" approach is necessary for Makefile, VS, and Xcode build tools because if a byproduct were listed as an output of a rule then the rule would always rerun when the input is newer than the byproduct but the byproduct may never be updated. Ninja solves this problem by offering a 'restat' feature to check whether an output was really modified after running a rule and tracking the fact that it is up to date separately from its timestamp. However, Ninja also stats all dependencies up front and will only restat files that are listed as outputs of rules with the 'restat' option enabled. Therefore an undeclared byproduct that does not exist at the start of the build will be considered missing and the build will fail even if other dependencies would cause the byproduct to be available before its dependents build. CMake works around this limitation by adding 'phony' build rules for custom command dependencies in the build tree that do not have any explicit specification of what produces them. This is not optimal because it prevents Ninja from reporting an error when an input to a rule really is missing. A better approach is to allow projects to explicitly specify the byproducts of their custom commands so that no phony rules are needed for them. In order to work with the non-Ninja generators, the byproducts must be known separately from the outputs. Add a new "BYPRODUCTS" option to the add_custom_command and add_custom_target commands to specify byproducts explicitly. Teach the Ninja generator to specify byproducts as outputs of the custom commands. In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets that link, the byproducts must be specified as outputs of the link rule that runs the commands. Activate 'restat' for such rules so that Ninja knows it needs to check the byproducts, but not for link rules that have no byproducts.
* | Add USES_TERMINAL option for custom commandsPeter Collingbourne2014-11-141-4/+8
| | | | | | | | | | | | Teach the add_custom_command and add_custom_target commands a new USES_TERMINAL option. Use it to tell the generator to give the command direct access to the terminal if possible.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-2/+2
|/ | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-1/+34
|
* cmGlobalGenerator: Take Build output argument by referenceBrad King2014-07-311-1/+1
| | | | | | 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.
* cmMakefile: Add a CreateSource methodBen Boeckel2014-07-081-0/+7
| | | | | The GetOrCreateSource searches the source file listing again, but some callers know that it already didn't exist.
* cmMakefile: return a backtraceBen Boeckel2014-06-051-1/+1
| | | | | This allows backtraces to be fully controlled by the makefile rather than externally (and makes changing how they are manipulated easier).
* Merge topic 'cxx14-features'Brad King2014-05-291-1/+1
|\ | | | | | | | | dd043c3f Features: Add support for C++14 features.
| * Features: Add support for C++14 features.Stephen Kelly2014-05-221-1/+1
| | | | | | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* | tests: test CMP0053 in WARN mode when watching variablesBen Boeckel2014-05-221-0/+2
|/ | | | | | | When CMP0053 is in WARN mode, variables get expanded twice, leaking the fact that the string was expanded twice and changing behavior. Instead, suppress variable watches when running the expansion to trigger the CMP0053 warning.
* Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-211-0/+4
| | | | | | | | | | | | Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
* cmMakefile: Add methods for checking availability of a feature.Stephen Kelly2014-05-201-0/+8
|
* cmMakefile: Extract CheckNeeded{C,Cxx}Language methods.Stephen Kelly2014-05-201-0/+5
|
* cmMakefile: Extract CompileFeaturesAvailable method.Stephen Kelly2014-05-201-0/+3
|
* cmMakefile: Extract CompileFeatureKnown method.Stephen Kelly2014-05-201-0/+3
|
* Features: Extend concept to C language.Stephen Kelly2014-05-141-0/+6
| | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* EVIS: Reimplement using custom parsing codeBen Boeckel2014-05-081-1/+24
| | | | | | | | | | | | | | | | | | | | | | Introduce a new implementation of ExpandVariablesInString and select between the old and new implementations based on policy CMP0053. Instead of cmCommandArgumentParserHelper, use a custom parser with our own stack. This is much faster and works well for our simple grammar. The new behavior of CMP0053 should expand @VAR@ syntax only in certain contexts. All existing EVIS callers use "replaceAt == true" so hard-code our call to the old implementation. Update the signature to default to "replaceAt == false" and pass "replaceAt == true" explicitly in the call sites for configure_file and string(CONFIGURE). Testing the configure (no generate) step with ParaView shows ~20% performance improvement. In terms of complete configure/generate steps, further testing with ParaView shows a 20% performance improvement over 2.8.12.2 with Unix Makefiles and minimal with Ninja. Ninja is less because it generate step is the expensive part (future work will address this) by a long shot and these changes help the configure step for the most part.
* Merge topic 'dev/regex-variables'Brad King2014-05-071-0/+5
|\ | | | | | | | | | | | | 3f517522 StoreMatches: Minor cleanups ef62fbad ClearMatches: Store match variable names statically f718b30a ClearMatches: Only clear matches which were actually set
| * ClearMatches: Only clear matches which were actually setBen Boeckel2014-04-291-0/+5
| | | | | | | | | | | | | | ClearMatches was clearing many variables which were never set in the first place. Instead, store how many matches were made last time and only clear those. It is moved to the cmMakefile class since it is a common utility used by multiple commands.
* | cmMakefile: Use a hashmap for imported targetsBen Boeckel2014-05-071-2/+7
|/
* cmTarget: Add COMPILE_FEATURES target property.Stephen Kelly2014-04-071-0/+4
| | | | | | | Use the contents of it to upgrade the CXX_STANDARD target property, if appropriate. This will have the effect of adding the -std=c++11 compile flag or other language specification on GNU when that is needed for the feature.
* Merge topic 'compiler-warning-cleanup'Brad King2014-04-041-1/+1
|\ | | | | | | | | | | | | 6c190245 Remove extra semicolons from C++ code. 4bef02e7 cmTypeMacro: Add a class to eat the semicolon following the macro use. ff710539 Remove default labels from fully covered switch statements.
| * Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-1/+1
| | | | | | | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* | Merge topic 'cmMakefile_IsOn_fix_comment'Brad King2014-04-041-2/+5
|\ \ | |/ |/| | | | | a40f57e4 cmMakefile: Revise comment describing IsOn()
| * cmMakefile: Revise comment describing IsOn()Daniele E. Domenichelli2014-04-041-2/+5
| |
* | Merge branch 'master' into revise-compiler-id-policiesBrad King2014-04-021-72/+78
|\ \ | |/
| * stringapi: Use strings for dependency informationBen Boeckel2014-03-081-3/+3
| |
| * stringapi: Use strings for directoriesBen Boeckel2014-03-081-1/+1
| |
| * stringapi: Use strings for feature argumentsBen Boeckel2014-03-081-1/+2
| |
| * stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-2/+2
| |
| * strings: Remove cmStdString referencesBen Boeckel2014-03-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
| * stringapi: Take strings for utility command namesBen Boeckel2014-03-081-2/+3
| |
| * stringapi: Use strings for VS project namesBen Boeckel2014-03-081-1/+1
| |
| * stringapi: Use strings for cache paths as argumentsBen Boeckel2014-03-081-2/+2
| |
| * stringapi: Use strings for AddSubdirectory pathsBen Boeckel2014-03-081-5/+7
| |
| * stringapi: Use strings for output names in AddCustomCommandToOutputBen Boeckel2014-03-081-1/+1
| |
| * stringapi: Use strings in target nameBen Boeckel2014-03-081-14/+15
| |
| * stringapi: Use strings for the languagesBen Boeckel2014-03-081-1/+1
| |
| * stringapi: Use strings for test namesBen Boeckel2014-03-081-2/+2
| |
| * stringapi: Use strings for source namesBen Boeckel2014-03-081-7/+7
| |