summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Do not treat DEFINITIONS as a built-in directory propertyStephen Kelly2015-04-021-2/+13
| | | | | | | | Add policy CMP0059 to cover this change. The property has been deprecated since CMake 2.4 anyway. This will help clean up cmMakefile -- the DefineFlagsOrig member should not need to exist.
* cmMakefile: Remove unused PreOrder member.Stephen Kelly2015-04-011-6/+3
| | | | Remove references from dependendent API.
* cmMakefile: Remove unused Prefix member.Stephen Kelly2015-04-011-1/+0
| | | | | Unused since it was added in commit 1f42f521 (NEW: move from tools and config to create CMake, 2000-08-29).
* cmMakefile: Remove unused SubDirectoryOrder member.Stephen Kelly2015-04-011-1/+0
| | | | | The last use was removed in v2.4.0~2054 (ENH: add support for out of source source, 2005-03-14)
* cmMakefile: Remove AddExtraDirectory method.Stephen Kelly2015-04-011-6/+0
| | | | It has no effect.
* Fix warnings from clang scanbuild.Bill Hoffman2015-03-251-2/+6
|
* Merge topic 'cmAlgorithms-cleanup'Brad King2015-03-121-0/+1
|\ | | | | | | | | | | | | 95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator. 4448f175 cmInstalledFile: Move Property implementation out of line. 7916d7ba Include cmAlgorithms where it is used.
| * Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
| |
* | add_custom_command: Diagnose MAIN_DEPENDENCY limitation.Nils Gladitz2015-03-091-0/+27
|/ | | | | The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across multiple custom commands.
* Merge topic 'minor-cleanups'Brad King2015-02-231-16/+6
|\ | | | | | | | | | | | | | | c021f59c cmMakefile: Store macro list in a vector not in a map. 2d130896 cmMakefile: Fix list of macros generation. f1969234 cmFunctionCommand: Remove ineffectual code. 1116698a cmTarget: Don't needlessly clear vectors in the destructor.
| * cmMakefile: Store macro list in a vector not in a map.Stephen Kelly2015-02-211-16/+6
| | | | | | | | | | The signature was computed (incorrectly) and stored as the map value, but never used. Remove it now.
| * cmMakefile: Fix list of macros generation.Stephen Kelly2015-02-211-1/+1
| | | | | | | | | | It was broken by commit 7ee56f03 (Convert loops into the commonly used pattern., 2015-01-17).
* | Convert some raw loops to cmWrap.Stephen Kelly2015-02-201-7/+1
| |
* | cmMakefile: Add flag to result and manipulate in place.Stephen Kelly2015-02-181-5/+5
| | | | | | | | | | Rather than creating a string, manipulating it, and then copying it to the result.
* | cmMakefile: Replace two loops with std::replace.Stephen Kelly2015-02-181-13/+2
| |
* | cmMakefile: Replace loop with composed algorithm.Stephen Kelly2015-02-181-12/+5
|/
* Replace common loop pattern with cmJoinStephen Kelly2015-02-111-27/+3
|
* Convert loops into the commonly used pattern.Stephen Kelly2015-02-111-21/+13
|
* 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 list include.Stephen Kelly2015-02-061-0/+1
| | | | | | | | Include it only where used.
* | cmMakefile: Remove ExpandSourceListArguments.Stephen Kelly2015-02-051-13/+0
|/
* Features: Define meaning for no language standard defaultBrad King2015-01-291-2/+44
| | | | | | | | | | | | Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that the toolchain has no notion of lanuage standard levels. In this case the <LANG>_STANDARD[_REQUIRED] properties will have no effect. Update the RunCMake.CompileFeatures test to exclude the LinkImplementationFeatureCycle test when there is no standard default. It can never fail because no use of specific features will adjust the CXX_STANDARD level required for any target since the standard levels have no meaning in this case.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-4/+4
|
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Merge topic 'delete-algorithm'Brad King2015-01-151-39/+7
|\ | | | | | | | | | | | | | | 65b81da4 cmVariableWatch: Use the cmDeleteAll algorithm with for_each. 30d2de9a cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll. 4a6e795b Use the cmDeleteAll algorithm instead of trivial raw loops. abb4a678 Add a generic algorithm for deleting items in a container.
| * Use the cmDeleteAll algorithm instead of trivial raw loops.Stephen Kelly2015-01-131-39/+7
| |
* | Merge topic 'fix-COMPILE_FEATURES-genex'Brad King2015-01-151-5/+6
|\ \ | |/ |/| | | | | | | 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-5/+6
| | | | | | | | The method does not test availability of compile features.
* | Merge topic 'join-algorithm'Brad King2015-01-121-11/+1
|\ \ | | | | | | | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * | Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-11/+1
| | |
* | | Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-39/+39
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * | | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-39/+39
| |/ / | | | | | | | | | All compilers hosting CMake support the std class.
* | | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-15/+3
| | |
* | | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-6/+1
|/ / | | | | | | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* | Merge topic 'cached-regex-clear-fixed'Brad King2014-12-041-0/+58
|\ \ | | | | | | | | | | | | | | | ceecd790 cmMakefile: store the number of last matches in a CMake var 7878d061 test: add a test for clearing regex results
| * | cmMakefile: store the number of last matches in a CMake varBen Boeckel2014-12-031-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | file: Add LOCK subcommand to do file and directory lockingRuslan Baratov2014-12-031-0/+10
|/ / | | | | | | | | | | | | | | | | Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases.
* | Merge branch 'revert-cached-regex-clear' into ↵Brad King2014-11-261-47/+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-47/+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.
| * Merge branch 'revert-definition-map-lookup' into releasev3.1.0-rc1Brad King2014-10-241-1/+1
| |\
* | | Track nested loop levels in CMake language with a stack of countersGregor Jasny2014-11-251-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+13
| | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'revert-definition-map-lookup'Brad King2014-10-271-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | d1b62185 Merge branch 'parent-scope-tests' into variable-pull-failure 5f414cef Revert "cmDefinitions: Don't store parent lookups" e0c0b1ac test: add a test for PARENT_SCOPE with multiple scopes 064c415d test: add test for PARENT_SCOPE behavior
| * | Revert "cmDefinitions: Don't store parent lookups"Ben Boeckel2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5abfde6cb8a1ae0b2825797eab6c2e9842eb7c49. The behaviors associated with implicit pulldown on variable lookup seriously conflict with the optimizations made in these commits. Basically, since values were copied upon variable lookup, not just on PARENT_SCOPE, coupled with PARENT_SCOPE's behavior based on whether the variable is in the current scope or not causes serious problems with not storing a value for every variable at every scope. The commit changed behavior of the following example, among other cases: function(test_set) set(blah "value2") message("before PARENT_SCOPE blah=${blah}") set(blah ${blah} PARENT_SCOPE) message("after PARENT_SCOPE blah=${blah}") endfunction() set(blah value1) test_set() message("in parent scope, blah=${blah}") Reported-by: Alex Merry <alex.merry@kde.org> Reported-by: Ben Cooksley <bcooksley@kde.org>
* | | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-14/+14
| |/ |/| | | | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* | Merge topic 'if-sanity'Brad King2014-09-151-0/+61
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin e177e7af FPHSA: Avoid if() dereferencing of quoted variable 425acc52 cmcurl: Use if(DEFINED) to simplify conditions cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable 2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable 0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions 188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if() b900c1cc If: Extract cmConditionEvaluator from if() implementation
| * | If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-0/+61
| | |
* | | CMake: Add CMAKE_GENERATOR_PLATFORM optionBrad King2014-09-051-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorPlatform test to cover basic use cases for the option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and that it is rejected when the generator does not support a user setting.