summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Fix spelling and typos (non-binary)Andreas Mohr2013-05-071-4/+4
|
* Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)Stephen Kelly2013-03-251-1/+0
| | | | | | | | | | | | | | The API for retrieving per-config COMPILE_DEFINITIONS has long existed because of the COMPILE_DEFINITIONS_<CONFIG> style properties. Ensure that the provided configuration being generated is also used to evaluate the generator expressions in cmTarget::GetCompileDefinitions. Both the generic COMPILE_DEFINITIONS and the config-specific variant need to be evaluated with the requested configuration. This has the side-effect that the COMPILE_DEFINITIONS does not need to be additionally evaluated with no configuration, so the callers can be cleaned up a bit too.
* Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake.Stephen Kelly2013-02-071-22/+5
| | | | | | | | | | | | | | | | | | | | | | As INTERFACE_COMPILE_DEFINITIONS are now possible, we can have situations like this: add_library(foo ...) add_library(bar ...) target_link_libraries(foo bar) target_compile_definitions(bar INTERFACE SOME_DEF) The INTERFACE_COMPILE_DEFINITIONS of bar determine how foo should be compiled, and if they change, foo should be rebuilt. Additionally, as of commit d1446ca7 (Append the COMPILE_DEFINITIONS from the Makefile to all targets., 2012-09-17), we don't need to read definitions from the makefile if we read them from the target, so also de-duplicate the cached info. The DependInfo for INTERFACE_INCLUDE_DIRECTORIES is already handled correctly.
* Always use the auto_ptr from cmsys.Stephen Kelly2012-11-201-1/+0
| | | | | | This is for consistency throughout cmake. The cmsys version exists becaues uses of auto_ptr types as return types does not work with some implementations in ancient compilers.
* AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)Alex Neundorf2012-11-061-3/+7
| | | | | | | | | | | | | The code handling IMPLICIT_DEPENDS was only able to track a single file, the latest file replaced earlier files in the list. The documentation now mentions that the language has to be prefixed to every file and the test now uses two implicit dependencies, where only the second is modified to trigger re-running of the custom command. Alex Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
* Makefile: Support directory names containing '=' (#12934)Brad King2012-06-061-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c8ef6430 (Allow directory names containing '=' and warn if necessary, 2012-02-06) we allow directories with '=' instead of rejecting them as was previously done since commit 8704525f (Reject directory names containing '=', 2011-01-14). However, we did not warn in all cases that '=' may cause failure, such as when it appears on the right-hand side of a dependency line. Both commits above were made assuming that '=' cannot be escaped in Make syntax, but it can be achieved with a variable: EQUALS = = left$(EQUALS)side : right$(EQUALS)side Use this approach to escape '=' in dependency lines, thus supporting the character in paths. All our tests now pass when CMake is built in source and build trees both containing '=', except for the "OutOfSource" test. It fails in its coverage of the obscure "OutOfBinary" test case where part of the build tree is located outside the main build tree of the test. The reason is that CMake must invoke a command like $(MAKE) -f /path/with=sign/build.make /path/with=sign/somefile but the make tool interprets the last argument as a variable assignment. This is an acceptable limitation, since the case is so obscure, in exchange for supporting '=' cleanly otherwise.
* Build object library targets in MakefilesBrad King2012-03-131-0/+1
| | | | | | Treat OBJECT libraries as STATIC libraries but leave out the archive step. The object files will be left behind for reference by other targets later.
* Pre-compute object file names before Makefile generationBrad King2012-03-091-39/+0
| | | | | | | Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked during cmGeneratorTarget construction. Implement it in the Makefile generator to pre-compute all object file names for each target. Use the results during generation instead of re-computing it later.
* Merge branch 'cleanup-object-file-names' into object-libraryBrad King2012-03-091-11/+14
|\
| * Hide Makefile local object info inside local generatorBrad King2012-03-081-0/+14
| | | | | | | | | | Make cmLocalUnixMakefileGenerator3::LocalObjectInfo private and add cmLocalUnixMakefileGenerator3::AddLocalObjectFile to create entries.
| * Remove unused partial OBJECT_FILES property implementationBrad King2012-03-061-11/+0
| | | | | | | | | | | | | | Remove partial implementation added by commit ca0230a3 (check in initial conv library stuff, 2007-02-16) since it was never finished. It does not make sense for multi-configuration generators since no specific build configuration is processed at CMake time.
* | Extract and use the INCLUDE_DIRECTORIES target properties.Stephen Kelly2012-02-221-22/+0
|/ | | | | | | | | Eliminate callers of cmMakefile::GetIncludeDirectories. All callers of GetIncludeDirectories should go through the local generator object. Only the local generator calls cmTarget::GetIncludeDirectories directly.
* Merge topic 'warn-funny-path-names'David Cole2012-02-071-0/+15
|\ | | | | | | | | c8ef643 Allow directory names containing '=' and warn if necessary (#12934)
| * Allow directory names containing '=' and warn if necessary (#12934)Brad King2012-02-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The approach taken by commit 8704525f (Reject directory names containing '=', 2011-01-14) was perhaps too heavy-handed for avoiding the obscure cases when '=' in the path fails due to limitations of Make syntax. Only two CMake tests: LinkDirectory OutOfSource fail when the path contains '=' and they cover obscure cases. Instead of rejecting such paths outright just warn when the problem may occur.
* | Exit the loop when we have determined the language.Stephen Kelly2012-01-081-0/+1
| |
* | fix #12262: dependency scanning for ASM filesAlex Neundorf2011-12-181-0/+2
| | | | | | | | | | | | | | | | Now also CMAKE_ASM_INCLUDE_PATH is written into CMakeDirectoryInformation.cmake, which is necessary to make the dependency scanning for included files work. Alex
* | Merge topic 'fix-typo'David Cole2011-11-081-1/+1
|\ \ | | | | | | | | | | | | 6d51f5f Fix typo.
| * | Fix typo.Stephen Kelly2011-11-041-1/+1
| | |
* | | Watcom: Use shortpath to CMake if full path has parens (#12548)Brad King2011-11-031-17/+25
|/ / | | | | | | | | | | | | | | | | | | The Watcom WMake tool has trouble running commands in paths that have parentheses. We already convert most commands to a shortpath for Watcom if the path contains a space, but the use of $(CMAKE_COMMAND) hides the true path from that conversion. Factor the shortpath conversion code out into a new ConvertShellCommand method. Teach it to convert paths that contain parentheses as well as spaces. Use the new method to convert the value of $(CMAKE_COMMAND) and other helper variables.
* | fix #12262: use the C dependency scanner also for ASM filesAlex Neundorf2011-10-051-1/+1
| | | | | | | | | | | | | | | | Files for the ASM language are those assembler files which are processed by the C/CXX compiler, and they may contain preprocessor directives, so run the C dependency scanner also on them. Alex
* | Fix for bug #12413, nmake did not handle targets with + in the name.Bill Hoffman2011-08-241-0/+2
| | | | | | | | | | | | | | If you had a + in the name of a target with nmake, it created a variable in the makefile that used + in its name, which is not allowed by nmake. To make the implementation easier, + is now not allowed for any make generators as part of a variable name.
* | MinGW: Remove old workaround and use native echo (#12283)Brad King2011-06-161-5/+2
| | | | | | | | | | | | | | | | | | The workaround added by commit 7e92f0b4 (Hack to make echo command work properly in mingw32-make, 2006-10-05) and updated by commit 69356d8a (Juse use cmake -E echo instead of the native echo, 2006-10-13) no longer seems necessary with modern mingw32-make. Furthermore it slows performance due to the time spent loading a cmake process instead of plain echo.
* | Change working drive only in MinGW MakefilesBrad King2011-04-081-2/+5
| | | | | | | | | | | | | | | | | | The parent commit assumed that "cd /d" would work in all Windows shells. While all modern versions of windows have shells that support it, the shells used by NMake and Borland make do not. Borland make does not seem to even support changing drive letters with "d:". Just revert the feature for all make tools except MinGW where the shell is known to support this feature.
* | Fix working drive of make rules on WindowsBrad King2011-04-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | Teach cmLocalUnixMakefileGenerator3::CreateCDCommand to change working directories for make tools using a Windows shell using "cd /d" instead of just "cd". This tells the shell to change the current drive letter as well as the working directory on that drive. Commit abaa0267 (When the working directory for a custom command is on another drive..., 2007-12-17) fixed the same problem for VS IDE generators as reported by issue #6150.
* | Optionally pass include directories with response filesBrad King2011-03-171-0/+14
|/ | | | | | Create platform option CMAKE_<lang>_USE_RESPONSE_FILE_FOR_INCLUDES to enable use of response files for passing the list of include directories to compiler command lines.
* Factor out common custom command generatorBrad King2010-12-081-20/+7
| | | | | | The Makefile, VS, and Xcode generators previously duplicated some custom command line generation code. Factor this out into a separate class cmCustomCommandGenerator shared by all generators.
* Improve signature of cmLocalGenerator::GetRealDependencyBrad King2010-12-081-3/+6
| | | | Allow file-level custom command dependencies to be skipped.
* Don't enforce VERBOSE makefiles for the CodeBlocks generatorAlex Neundorf2010-11-111-2/+1
| | | | | | | | | Instead of enforcing verbose makefile, now the generated build command includes "VERBOSE=1" so the output will be verbose when building in C::B. Also removed the now unused setForceVerboseMakefiles(). Alex
* Remove trailing whitespaceAlex Neundorf2010-11-111-36/+36
| | | | Alex
* Enable calling commands with : in argv[1] (#9963)David Cole2010-09-101-2/+9
| | | | | | | | | | | | | | | | | | | The solution seems hackish, but it works: for NMake only, prepend a no-op command before each real command that begins with ". This is really a work-around for an NMake problem. When a command begins with ", nmake truncates the first argument to the command after the first : in that arg. It has a parsing problem. Workaround..., hackish..., but it should solve the issue for #9963 and its related friends. Also, modify the CustomCommand test to replicate the problem reported in issue #9963. Before the NMake specific code change, the test failed. Now, it passes. Ahhhhhh.
* Fix failing ExternalProject test on Borland dashboards.David Cole2010-06-031-0/+22
| | | | | | | | If there is a .bat or .cmd file used as a custom command then the Borland Makefiles generator (specifically) requires using the "call " syntax before the name of the .bat or .cmd file. This fix applies to all Makefile based generators where WindowsShell is true.
* Fix warnings in CMake source code.David Cole2009-09-301-5/+3
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.