summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-2/+2
|
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-3/+4
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-6/+6
|
* Use cmGeneratorTarget for property access.Stephen Kelly2015-10-171-7/+7
|
* Use GetName from cmGeneratorTarget.Stephen Kelly2015-10-171-4/+4
|
* cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-2/+2
|
* Merge topic 'clean-up-cmTarget'Brad King2015-10-161-21/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | 55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
| * cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-18/+18
| | | | | | | | | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
| * Generators: Use GetType from the cmGeneratorTarget.Stephen Kelly2015-10-141-12/+12
| |
* | cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget.Stephen Kelly2015-10-141-1/+1
|/
* cmGeneratorTarget: Move GetSupportDirectory from cmTarget.Stephen Kelly2015-10-121-2/+2
|
* cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.Stephen Kelly2015-10-121-1/+1
|
* cmGeneratorTarget: Move GetPDBDirectory from cmTarget.Stephen Kelly2015-10-081-1/+2
|
* cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-081-4/+4
|
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-171-0/+4
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* cmGeneratorTarget: Move GetCompilePDBDirectory from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLinkerLanguage from cmTarget.Stephen Kelly2015-08-051-5/+5
|
* cmGeneratorTarget: Move GetInstallNameDir* from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move NeedRelinkBeforeInstall from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* cmGeneratorTarget: Move HasSOName from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLibraryNames from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+53
| | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* cmMakefileTargetGenerator: Require cmGeneratorTarget.Stephen Kelly2015-06-221-1/+1
|
* Convert: Remove specification of default parameter.Stephen Kelly2015-05-201-1/+1
|
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-4/+4
|
* Merge topic 'custom-command-multiple-outputs'Brad King2015-03-091-3/+2
|\ | | | | | | | | 66a9c90c Makefile: Fix multiple custom command outputs regression (#15116)
| * Makefile: Fix multiple custom command outputs regression (#15116)Brad King2015-03-071-3/+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.
* | Makefile: Add progress to link step messagesBrad King2015-02-071-1/+5
|/
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-3/+3
| | | | All compilers hosting CMake support the std class.
* Makefile: Fix rebuild with multiple custom command outputs (#15116)Brad King2014-12-051-12/+9
| | | | | | | 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.
* LocalGenerator: Add a string overload for AppendFlagsBen Boeckel2014-05-071-2/+2
|
* Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-4/+10
| | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
* Makefile: Generate single-quoted object lists for WatcomJiri Malak2014-03-271-1/+4
| | | | | | | | | | | | | | | | 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.
* Remove some c_str() calls.Stephen Kelly2014-03-111-30/+30
| | | | | | 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.
* stringapi: Use strings in target nameBen Boeckel2014-03-081-2/+2
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-24/+12
|
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-2/+2
| | | | Variable names are always generated by CMake and should never be NULL.
* Windows: Use response files to specify link libraries for GNU toolsBrad King2014-03-051-1/+13
| | | | | | | | | Work around the command-line-length limit by using an @linklibs.rsp response file to pass the flags for link libraries. This allows very long lists of libraries to be used in addition to the existing support for passing object files via response file. Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
* Makefile: Rename linker response file boolean to be more specificBrad King2014-03-051-5/+5
| | | | | Rename local variable useResponseFile to useResponseFileForObjects when it represents CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS.
* Makefile: Factor out some duplicate link libraries generationBrad King2014-03-041-6/+1
| | | | | | | The generators for executable and library targets duplicate the logic to call the OutputLinkLibraries helper on the local generator. Factor it out into a cmMakefileTargetGenerator::CreateLinkLibs method to avoid dpulication.
* MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-0/+4
| | | | | | | | | | Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files 2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY properties. Those properties now exclusively handle linker PDB files. Since STATIC libraries do not link their compiler PDB file becomes more important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB file location and pass the value to the MSVC /Fd option.
* Makefile: Fix per-config linker PDB output directoryBrad King2014-02-241-1/+1
| | | | | | Also, now that all call sites of cmTarget::GetPDBName and cmTarget::GetPDBDirectory pass the configuration, make the argument non-optional.
* Merge topic 'fix-compile-OBJECT_DIR'Brad King2014-01-021-7/+5
|\ | | | | | | | | 03f3b4e Replace <OBJECT_DIR> rule placeholder consistently (#14667)
| * Replace <OBJECT_DIR> rule placeholder consistently (#14667)Brad King2014-01-021-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The <OBJECT_DIR> placeholder is supposed to be the base intermediate files directory for the current target. This is how it gets replaced during link line generation. However, during compile line generation we replace it with the directory containing the current object file which may be a subdirectory. Fix replacement of <OBJECT_DIR> in the generated compile lines to be the base intermediate files directory. This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the MSVC compile line in order to match the VS IDE default compiler program database location in the intermediate files directory. For source files in a subdirectory relative to the current target this caused the wrong location to be used for the compiler program database. This becomes particularly important when using precompiled headers. While at it, use the cmTarget::GetSupportDirectory method to compute the intermediate files directory for the current target instead of repeating the logic in a few places.
* | Remove INTERFACE build targets.Stephen Kelly2013-12-101-3/+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.
* | INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | Just enough to reach the BuildMacContentDirectory method and the NeedRelinkBeforeInstall methods. In the future, those methods can be moved to cmGeneratorTarget.
* | Create make rules for INTERFACE_LIBRARY targets.Stephen Kelly2013-10-211-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Unify the way the flags of a static library are readPatrick Gansterer2013-07-311-6/+2
| | | | | Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central function for getting the linker flags for a given target.
* Revert "Use --sysroot when cross compiling."Stephen Kelly2013-07-121-20/+0
| | | | | | | This reverts commit de4da665d3205afa239749c41513a315c3831f51. This feature is not yet ready for release. It needs to be merged with the CMAKE_OSX_SYSROOT feature.