summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merge topic 'remove-c_str-calls'Brad King2014-03-121-50/+50
|\ | | | | | | | | | | | | 3be265b3 Workaround Sun C++ 5.9 compiler crash af8a1643 Remove c_str calls when using stream APIs. 21c573f6 Remove some c_str() calls.
| * Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-4/+4
| | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
| * Remove some c_str() calls.Stephen Kelly2014-03-111-46/+46
| | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* | Makefile: Improve handling of WMake verbose output and errorsJiri Malak2014-03-101-12/+25
|/ | | | | | | | | | | * The '-e' option has nothing to do with verbose output. It is now properly handled by .ERASE directive in make file * The '-s' option sets silent output globally, it cannot be switched off. It is now handled only by .SILENT directive in make file directive is simply controlled by a conditonal block. Remove SilentNoColon member variable as it is no longer needed.
* stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-1/+1
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-8/+8
| | | | | | | | | | | 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: Use strings in target nameBen Boeckel2014-03-081-7/+7
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-1/+1
|
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+1
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* Merge topic 'make-entry-no-parallel'Brad King2013-12-201-0/+11
|\ | | | | | | | | bd11de0 Makefile: Allow "gmake target1 target2 -j" (#14312)
| * Makefile: Allow "gmake target1 target2 -j" (#14312)Brad King2013-12-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the .NOTPARALLEL target to each local Makefile command-line interface entry point file so that even with -j we launch only one "make -f Makefile2" at a time. The actual build rules in Makefile2 and lower will still run in parallel. Do not add .NOTPARALLEL for Borland or Watcom make tools because they do not tolerate it. Other make tools that do not understand .NOTPARALLEL will not be hurt. Suggested-by: Robert Luberda <robert-cmake@debian.org>
* | Remove INTERFACE build targets.Stephen Kelly2013-12-101-1/+0
|/ | | | | | | | | | | | | | | Commit b04f3b9a (Create make rules for INTERFACE_LIBRARY targets., 2013-08-21) extended the makefile generator to create build targets for INTERFACE_LIBRARY targets. No other generators were extended with this feature. This conflicts with the feature of whitelisting of target properties read from INTERFACE_LIBRARY targets. The INTERFACE_* properties of the INTERFACE_LIBRARY may legitimately contain TARGET_PROPERTY generator expressions for reading properties from the 'head target'. The 'head target' would be the INTERFACE_LIBRARY itself when creating the build rules for it, which means that non-whitelisted properties would be read.
* Merge topic 'use-generator-target'Brad King2013-12-021-0/+5
|\ | | | | | | | | 02a545c Don't generate subdir convenience rules for IMPORTED targets.
| * Don't generate subdir convenience rules for IMPORTED targets.Stephen Kelly2013-11-291-0/+5
| | | | | | | | | | | | | | | | | | This was missing from commit c34968a9 (Port some of the generator API to cmGeneratorTarget., 2012-10-10). The generator targets stored with the cmMakefile include IMPORTED targets, unlike the accessor for resgular targets. Before this patch, rules would be generated for Qt5::Core for example, which result in broken makefiles.
* | INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-1/+2
|/ | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* Port some of the generator API to cmGeneratorTarget.Stephen Kelly2013-11-221-23/+31
| | | | | | | Just enough to reach the BuildMacContentDirectory method and the NeedRelinkBeforeInstall methods. In the future, those methods can be moved to cmGeneratorTarget.
* Refactor tool selection for edit_cache (#14544)Brad King2013-11-121-11/+0
| | | | | | | | | Refactor edit_cache tool selection to ask each global generator for its preference. Teach the Ninja generator to always use cmake-gui because Ninja by design cannot run interactive terminal dialogs like ccmake. Teach the Makefile generator to use cmake-gui when also using an "extra" generator whose IDE has no terminal to run ccmake, and otherwise fall back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
* Create make rules for INTERFACE_LIBRARY targets.Stephen Kelly2013-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The result is that the depends of the target are created. So, add_library(somelib foo.cpp) add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp) add_library(extra EXCLUDE_FROM_ALL foo.cpp) target_link_libraries(anotherlib extra) add_library(iface INTERFACE) target_link_libraries(iface INTERFACE anotherlib) Executing 'make iface' will result in the anotherlib and extra targets being made. Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY will not result in the executable being built with 'make iface' because of the logic in cmComputeTargetDepends::AddTargetDepend. So far, this is implemented only for the Makefile generator. Other generators will follow if this feature is possible for them. Make INTERFACE_LIBRARY targets part of the all target by default. Test this by building the all target and making the expected library EXCLUDE_FROM_ALL.
* Makefile: Always create clean target commandBrad King2013-10-161-37/+37
| | | | | Borland Make complains if the phony clean target has no rule to build it. If there are no files to clean, generate and run an empty clean script.
* Generate modern-style cmake code.Stephen Kelly2013-08-221-16/+16
| | | | | | | | | | | The commits 9db31162 (Remove CMake-language block-end command arguments, 2012-08-13) and 77543bde (Convert CMake-language commands to lower case, 2012-08-13) changed most cmake code to use lowercase commands and no parameters in termination commands. However, those changes excluded cmake code generated in c++ by cmake. Make a similar style change to code generated by cmake.
* Merge topic 'drop-old-vs-dependency'Brad King2013-07-161-1/+0
|\ | | | | | | | | 4bb6e24 VS,Xcode: Drop incorrect legacy dependency trace (#14291)
| * VS,Xcode: Drop incorrect legacy dependency trace (#14291)Brad King2013-07-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the "vsProjectFile" argument from cmTarget::TraceDependencies. It appears to be the modern equivalent to a hunk added in commit ba68f771 (...added new custom command support, 2003-06-03): + name = libName; + name += ".dsp.cmake"; + srcFilesToProcess.push(name); but was broken by refactoring at some point. The current behavior tries to trace dependencies on a source file named the same as a target, which makes no sense. Furthermore, in code of the form add_executable(foo foo.c) add_custom_command(OUTPUT "${somewhere}/foo" ... DEPENDS foo) the "vsProjectFile" value "foo" matches source "${somewhere}/foo.rule" generated to hold the custom command and causes the command to be added to the "foo" target incorrectly. Simply drop the incorrect source file trace and supporting logic.
* | Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.Stephen Kelly2013-07-111-2/+2
|/ | | | Refactor to create AddCompileDefinitions.