summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Merge topic 'target-language-genex'Brad King2015-03-101-12/+38
|\ | | | | | | | | | | | | | | | | | | | | 232a6883 Help: Add release notes for target-language-genex. 9e168941 File(GENERATE): Process genex evaluation files for each language. b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories. 0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions. 5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options. e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression. 4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
| * Genex: Allow COMPILE_LANGUAGE when processing include directories.Stephen Kelly2015-03-091-0/+26
| | | | | | | | Issue an error if this is encountered by an IDE generator.
| * Genex: Allow COMPILE_LANGUAGE when processing compile definitions.Stephen Kelly2015-03-091-16/+16
| | | | | | | | Issue an error if this is encountered by an IDE generator.
* | Merge topic 'custom-command-multiple-outputs'Brad King2015-03-091-54/+2
|\ \ | |/ |/| | | | | 66a9c90c Makefile: Fix multiple custom command outputs regression (#15116)
| * Makefile: Fix multiple custom command outputs regression (#15116)Brad King2015-03-071-54/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.2.0-rc1~272^2~2 (Makefile: Fix rebuild with multiple custom command outputs, 2014-12-05) we changed the generated makefile pattern for multiple outputs from out1: depends... commands... out2: out1 to out1 out2: depends... commands... This was based on the incorrect assumption that make tools would treat this as a combined output rule and run the command(s) exactly once for them. It turns out that instead this new pattern is equivalent to out1: depends... commands... out2: depends... commands... so the commands may be run more than once. Some documents suggest using a "dedicated witness" stamp file: stamp: depends... rm -f stamp touch stamp.tmp commands... mv stamp.tmp stamp out1 out2: stamp However, if the commands fail the error message will refer to the stamp instead of any of the real outputs, which may be confusing to readers. Also, this approach seems to have the same behavior of the original approach that motiviated the above commit: multiple invocations are needed to bring consumers of the outputs up to date. Instead we can return to the original approach but add an explicit touch to each extra output rule: out1: depends... commands... out2: out1 touch -c out2 This causes make tools to recognize that all outputs have changed and therefore to execute any commands that consume them.
| * Merge branch 'makefile-missing-comment' into releaseBrad King2015-02-101-1/+1
| |\
* | | cmAlgorithms: Add cmWrap.Stephen Kelly2015-02-201-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port some existing cmJoin to use it. cmJoin is cumbersome to use in cases where the objective is to somehow 'quote' each item and then join it with a separator. In that case, the joiner string is harder to read and reason about. cmWrap aims to solve that. Provide an overload taking char wrappers to simplify the case of surrounding every element in quotes without needing to escape the quote character.
* | | Use cmJoin where possible.Stephen Kelly2015-02-201-7/+1
| | |
* | | Merge topic 'use-cmRange'Brad King2015-02-121-13/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7c3f6376 Convert loop into two algorithms. 8a399c8c Convert loop to the common pattern. abfca975 Move loop inside of condition. 0b61b86d Handle last element outside of the loop. e21f7829 cmTarget: Use a sorted vector in place of a set. 559dc155 cmSet: Replace loop with cmJoin. 0ea71932 cmFindBase: Replace loop with cmJoin on range. 9380e85f Convert loops to cmJoin algorithm with cmRange. bb10012f cmStringCommand: Accumulate with cmJoin and range adaptors. 0c12f1ea cmAlgorithms: Add a range adaptor and API for adjusting a range. 27c6f017 Use cmJoin to accumulate string ranges. 4e78ebbd cmAlgorithms: Add a Range container and adaptor method. 89102249 Replace common loop pattern with cmJoin 7b8725bf Convert loops populating maybe-empty content into the common pattern. 7ee56f03 Convert loops into the commonly used pattern. 0a4e5674 cmMacroCommand: Remove counting variable. ...
| * | | Convert loop into two algorithms.Stephen Kelly2015-02-111-10/+6
| | | |
| * | | Convert loop to the common pattern.Stephen Kelly2015-02-111-10/+4
| | | |
| * | | Move loop inside of condition.Stephen Kelly2015-02-111-12/+12
| | | | | | | | | | | | | | | | The loop is only executed if the condition is true.
| * | | Handle last element outside of the loop.Stephen Kelly2015-02-111-3/+11
| | | | | | | | | | | | | | | | | | | | There is no point in checking on each loop iteration whether it is the last element.
* | | | Merge topic 'makefile-missing-comment'Brad King2015-02-111-1/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| eeb2831b Makefile: Fix regression in target-bound custom command COMMENT output
| * | Makefile: Fix regression in target-bound custom command COMMENT outputNils Gladitz2015-02-101-1/+1
| | | | | | | | | | | | | | | Fix a logic typo introduced by commit v3.1.0-rc1~781^2 (Generalize cmCustomCommandGenerator to more fields, 2014-03-10).
* | | Merge topic 'use-algorithms'Brad King2015-02-101-9/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d8639733 cmSystemTools: Remove unnecessary comparison. 803317aa cmSystemTools: Early return if size makes later comparison false. 11093a03 Replace temporary bool by inlining warning condition. 6cd2ee95 Replace loop with member algorithm. 94e993a0 cmComputeLinkDepends: Remove temporary iterator copy. 69dbe51b Replace loop with algorithm. 683fafea Replace a loop with std::transform. 63f584b6 Replace while loop with member insert. 74c4d9d2 Take a size check outside of an inner loop. 71d47115 Use insert member instead of back_inserter. 39622c99 Convert while loop to member insert. a7fcc148 Convert loop to algorithm. d46c4f07 Extract a prefix variable from loop. d59913f0 Take computation out of loop. 3f3db744 cmMakefile: Remove ExpandSourceListArguments. bd990c80 Remove use of ExpandSourceListArguments. ...
| * | | Convert loop to algorithm.Stephen Kelly2015-02-061-5/+2
| | | |
| * | | Extract a prefix variable from loop.Stephen Kelly2015-02-061-5/+2
| | | |
| * | | Take computation out of loop.Stephen Kelly2015-02-061-1/+3
| | |/ | |/|
* | | Makefile: Change link step message color to bold greenBrad King2015-02-071-1/+1
| | | | | | | | | | | | Avoid displaying red messages when no error has occurred.
* | | Makefile: Fix output during parallel builds (#12991)Brad King2015-02-061-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace use of separate "cmake -E cmake_progress_report" and "cmake -E cmake_echo_color" commands to report the progress and message portions of build output lines with --progress-* options to the latter to print everything with a single command. The line buffering of the stdout FILE stream should cause the whole line to be printed with one atomic write. This will avoid inter-mixing of line-wise messages from different processes during a parallel build.
* | | bootstrap: Enable color Makefile outputBrad King2015-02-051-9/+1
|/ / | | | | | | | | | | Build the needed infrastructure during bootstrap in order to allow "cmake -E cmake_echo_color" to be used unconditionally during generation.
* | Makefile: Generate .NOTPARALLEL without .PHONY (#14312)Brad King2015-01-301-1/+1
| | | | | | | | | | | | | | | | | | In commit v3.0.0-rc1~222^2 (Makefile: Allow "gmake target1 target2 -j", 2013-12-18) we added generation of a .NOTPARALLEL rule and told the generator it is "symbolic" because the file will never be created. This causes ".PHONY" to be used. However, "clearmake" does not support parsing of .PHONY specifically for .NOTPARALLEL, so simply drop it. This should not affect the role of the .NOTPARALLEL rule for GNU make.
* | Merge topic 'consistent-empty-method'Brad King2015-01-191-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5f69314e Replace foo.length() pattern with !foo.empty(). fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty() f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty(). 86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty(). fd7b3712 Replace foo.size() pattern with !foo.empty(). aa773035 Replace !foo.size() pattern with foo.empty(). 64592633 cmListCommand: Use empty() and expand whitespace. 607e1938 Replace 'foo.size() != 0' pattern with !foo.empty(). 930bd478 Replace 'foo.size() == 0' pattern with foo.empty(). d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
| * | Replace 'foo.length() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
| | |
| * | Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
| | |
* | | Convert raw loops to vector member insert.Stephen Kelly2015-01-181-5/+2
|/ /
* | Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | | All compilers hosting CMake support the std class.
* | | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-7/+2
|/ / | | | | | | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* | Makefile: Workaround Borland Make bug with multiple outputsBrad King2014-12-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a rule of the form out1 out2: dep1 out1 out2: dep2 Borland Make complains that there are multiple rules for "out1" even though this works when there is only one output. Instead generate out1 out2: dep1 dep2 for Borland Make, but only when there are multiple outputs.
* | Makefile: Fix rebuild with multiple custom command outputs (#15116)Brad King2014-12-051-3/+43
| | | | | | | | | | | | | | Fix the generated makefiles for custom commands with multiple outputs to list all the outputs on the left hand side of the build rule. This is much simpler and more reliable than the old multiple-output-pair infrastructure.
* | Makefile: Add assembly and preprocessed targets for FortranTim Gallagher2014-11-101-2/+3
| | | | | | | | Extend the FortranOnly test to cover "make <src>.i" targets.
* | Makefile: Refactor checks for lang-specific targets and export compile cmdsTim Gallagher2014-11-051-18/+24
| | | | | | | | | | | | The checks are now split into languages that are able to generate assembly listings, languages that are able to generate preprocessed listings, and languages that are able to export the compile commands.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-3/+3
|/ | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'Brad King2014-07-221-2/+2
| | | | | Rename the internal enumeration value for converting paths destined for use in Makefile rule syntax.
* LocalGenerator: Add a string overload for AppendFlagsBen Boeckel2014-05-071-3/+10
|
* Merge topic 'target-transitive-sources'Brad King2014-04-031-2/+4
|\ | | | | | | | | | | | | | | | | | | | | 9407174b target_sources: New command to add sources to target. 81ad69e0 Make the SOURCES target property writable. 6e636f2e cmTarget: Make the SOURCES origin tracable. 3676fb49 cmTarget: Allow transitive evaluation of SOURCES property. e6971df6 cmTarget: Make the source files depend on the config. df753df9 cmGeneratorTarget: Don't add computed sources to the target. 869328aa cmComputeTargetDepends: Use valid config to compute target depends.
| * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
* | Makefile: Generate single-quoted object lists for WatcomJiri Malak2014-03-271-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile generators. The underlying problem is with the Watcom linker, not with WMake. The Watcom linker wants object files to be single-quoted. Add <LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the generators to use Watcom-style single quotes for object files on link lines. On Windows, Watcom uses the GetCommandLine API to get the original command-line string and do custom parsing that expects single quotes. On POSIX systems, Watcom approximates the original command line by joining all argv[] entries separated by a single space. Therefore we need to double-quote the single-quoted arguments so that the shell does not consume them and they are available for the parser to see.
* | cmLocalUnixMakefileGenerator3: Re-organize ConvertToQuotedOutputPathJiri Malak2014-03-271-33/+32
|/ | | | | Use one code path whether the components list is empty or not. Fix indentation accordingly.
* Merge topic 'watcom-updates'Brad King2014-03-201-0/+1
|\ | | | | | | | | | | | | | | 64c2342a Watcom: Enable 'WMake Makefiles' generator on Linux 5d9aa66c Watcom: Introduce OpenWatcom compiler id and fix compiler version 9292d3b8 Watcom: Detect compiler target architecture and platform fbc883c9 Watcom: Add one blank line to Makefile for better readability
| * Watcom: Add one blank line to Makefile for better readabilityJiri Malak2014-03-171-0/+1
| |
* | Rename local 'dir_max' variables to 'dir'Stephen Kelly2014-03-171-6/+6
|/ | | | | The code is not computing the maximum length directory, as is the case in cmLocalVisualStudioGenerator::ComputeLongestObjectDirectory.
* cmLocalGenerator: Add ComputeObjectFilenames interface.Stephen Kelly2014-03-131-0/+14
| | | | | Implement it in the local generators and use it in the global generators.
* cmGeneratorTarget: Constify cmSourceFile* in containers.Stephen Kelly2014-03-131-3/+3
| | | | | Some of them will be used with other APIs which require value_type to be cmSourceFile const*.
* Makefiles: Compute local object files on demand.Stephen Kelly2014-03-131-12/+46
| | | | Don't compute them up front.
* Generalize cmCustomCommandGenerator to more fieldsBrad King2014-03-121-16/+18
| | | | | | | Until now the cmCustomCommandGenerator was used only to compute the command lines of a custom command. Generalize it to get the comment, working directory, dependencies, and outputs of custom commands. Update use in all generators to support this.
* cmCustomCommand: Return std::string from GetWorkingDirectoryBrad King2014-03-121-6/+7
|