summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix config-specific INCLUDE_DIRECTORIES in multi-config generatorsStephen Kelly2012-10-171-4/+14
| | | | | | | | Commit 08cb4fa4 (Process generator expressions in the INCLUDE_DIRECTORIES property, 2012-09-18) contained an incorrect assumption that CMAKE_BUILD_TYPE was set on the makefile for each generated configuration in multi-config generators. Fix that by making the GetIncludeDirectories API depend on the config.
* Merge topic 'vs-pdb-output'Brad King2012-10-011-1/+1
|\ | | | | | | | | | | | | | | 2ccca05 Run PDBDirectoryAndName test on MSVC and Intel efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test 3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
| * Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-1/+1
| | | | | | | | | | | | | | This enables changing the name and output folder of the debug symbol files produced by MS compilers. Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
* | Add a wrapper for accessing config-specific compile-definitions.Stephen Kelly2012-09-191-5/+4
| |
* | Append the COMPILE_DEFINITIONS from the Makefile to all targets.Stephen Kelly2012-09-191-4/+0
| | | | | | | | | | | | | | | | This way we don't need to check the definitions from the Makefile when generating later, and can more easily add generator expressions. Duplication is not a problem as the definitions are de-duplicated before generating.
* | Move GetIncludeDirectories to cmGeneratorTarget.Stephen Kelly2012-09-191-4/+8
| |
* | Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.Stephen Kelly2012-09-191-1/+1
| |
* | Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-2/+4
|/
* Don't duplicate -D defines sent to the compiler.Stephen Kelly2012-08-201-13/+21
| | | | | | | | | | | There is no need to do so. Be consistent with include directories and ensure uniqueness. This requires changing the API of the cmLocalGenerator::AppendDefines method, and changing the generators to match. The test unfortunately can't test for uniqueness, but it at least verifies that nothing gets lost.
* Ninja: remove warningsPeter Kümmel2012-07-181-10/+9
|
* Re-factor OS X content generator start up.Nicolas Despres2012-07-171-12/+2
|
* Re-factor bundle content copying rules generation.Nicolas Despres2012-07-171-35/+37
|
* Remove unused ivars to eliminate compiler warningsDavid Cole2012-06-201-4/+2
|
* Refactor generation of shared library flagsStephen Kelly2012-06-121-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* VS: Restore header files marked as OS X Framework content (#13196)Brad King2012-05-071-8/+18
| | | | | | | | | | | | | | | Header files listed in a target's PUBLIC_HEADER or similar properties are marked as OS X Framework content. Refactoring performed by commit 11d9b211 (Add cmGeneratorTarget to represent a target during generation, 2012-03-07) commit 45c2f932 (Simplify cmMakefileTargetGenerator using cmGeneratorTarget, 2012-03-07) commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source classification, 2012-03-19) and related commits accidentally removed such files from treatment as normal header files by the VS generator (generators other than Makefiles and Xcode). Move handling of such files out of cmGeneratorTarget and back to cmMakefileTargetGenerator. The central cmGeneratorTarget classification will always treat them as header or extra sources.
* Add $<TARGET_OBJECTS:...> expression to use an object libraryBrad King2012-03-161-0/+3
| | | | | | For now do not allow an OBJECT library to reference other object libraries. Teach cmTarget::ComputeLinkImplementation to include the languages of object libraries used by a target.
* Build object library targets in MakefilesBrad King2012-03-131-11/+19
| | | | | | 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-10/+4
| | | | | | | 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.
* Simplify cmMakefileTargetGenerator using cmGeneratorTargetBrad King2012-03-091-50/+40
| | | | | Replace the classification of source files in this generator using that computed by cmGeneratorTarget.
* Merge branch 'cleanup-object-file-names' into object-libraryBrad King2012-03-091-10/+2
|\
| * Hide Makefile local object info inside local generatorBrad King2012-03-081-10/+2
| | | | | | | | | | Make cmLocalUnixMakefileGenerator3::LocalObjectInfo private and add cmLocalUnixMakefileGenerator3::AddLocalObjectFile to create entries.
* | Extract and use the INCLUDE_DIRECTORIES target properties.Stephen Kelly2012-02-221-3/+32
| | | | | | | | | | | | | | | | | | Eliminate callers of cmMakefile::GetIncludeDirectories. All callers of GetIncludeDirectories should go through the local generator object. Only the local generator calls cmTarget::GetIncludeDirectories directly.
* | Refactor GetIncludeFlags to take includes instead of fetching themStephen Kelly2012-02-221-1/+5
|/
* Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-051-0/+10
| | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
* Factor makefile generator link rule lookup into helper functionBrad King2011-12-051-0/+7
| | | | | This provides a place in the makefile generators to adjust the link rules for both libraries and executables.
* Fortran: Add support for free- and fixed-form flagsBrad King2011-08-311-0/+35
| | | | | | | Define a "Fortran_FORMAT" target and source file property. Initialize the target property from a "CMAKE_Fortran_FORMAT" variable. Interpret values "FIXED" and "FREE" to indicate the source file format. Append corresponding flags to the compiler command line.
* Make std::map usage more portable in language=>flags/defines mapsBrad King2011-05-171-14/+22
| | | | | | | | | | | | | | Older versions of GCC, the HP compiler, and the SGI MIPSpro compiler do not like the use of make_pair in this case and the conversions it requires: a value of type "const char *" cannot be used to initialize an entity of type "char [1]" /usr/include/g++-3/stl_pair.h:68: assignment of read-only location Instead use a map lookup pattern already used throughout the rest of our source tree.
* make compile command output optionalManuel Klimek2011-04-251-1/+2
|
* implement cxx command outputManuel Klimek2011-04-251-2/+19
|
* cache flags and definesManuel Klimek2011-04-251-45/+52
|
* refactor flags and definesManuel Klimek2011-04-251-55/+65
|
* Optionally pass include directories with response filesBrad King2011-03-171-2/+35
| | | | | | 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 old-style -D flags out from -I flag generationBrad King2011-03-151-0/+5
| | | | | | Move the GetDefineFlags call from cmLocalGenerator::GetIncludeFlags to all call sites so that the method exclusively constructs a string of include search path flags.
* Merge topic 'link-depend-def-file'Brad King2010-12-161-0/+6
|\ | | | | | | | | 3e27997 Make link rule depend on ".def" file (#11014)
| * Make link rule depend on ".def" file (#11014)Brad King2010-12-151-0/+6
| | | | | | | | | | | | | | When the link command line references a ".def" file the rule should depend on it. Inspired-By: Eric Huhtala
* | Merge topic 'cray-compiler'Brad King2010-12-161-7/+6
|\ \ | |/ |/| | | | | ab9ebb0 Fix Fortran .mod timestamps with Cray compiler
| * Fix Fortran .mod timestamps with Cray compilerBrad King2010-12-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | Commit 34e1ac24 (Create Fortran info variables for .mod behavior, 2010-11-12) incorrectly taught GetFortranModuleDirectory to return a relative path. We really want to use "." as the module directory only as a workaround for compilers that do not do so by default. Therefore we need this default only when generating the compiler command line and not when scanning dependencies. Revert the previous change to GetFortranModuleDirectory and apply the change only at one of its call sites.
* | Make Fortran $obj.provides.build targets not .PHONYBrad King2010-12-061-1/+1
|/ | | | | | | Commit 60cd72d0 (Cleaned up generation of symbolic rules, 2006-02-15) incorrectly made these Makefile targets .PHONY even though the build rule touches an actual file. Correct it so that the copy_f90_mod and touch steps do not happen on every "make".
* Create Fortran info variables for .mod behaviorBrad King2010-11-121-0/+13
| | | | | | Define CMAKE_Fortran_MODDIR_DEFAULT and CMAKE_Fortran_MODOUT_FLAG variables to help some Fortran compilers generate .mod files in the current working directory.
* Define LINK_DEPENDS target property (#11406)Brad King2010-11-051-0/+7
| | | | | Custom Makefile link rules may need to depend on linker scripts. Define this property to allow user-specified link-time dependencies.
* Consolidate duplicate link rule make dependency codeBrad King2010-11-051-0/+31
| | | | | Factor code previously duplicated for library and executable rules into a common method.
* Merge branch 'tru64-make-includes'Brad King2010-06-151-3/+6
|\
| * Tru64: Use full-path include directives in Makefiles (#10569)Brad King2010-06-141-3/+6
| | | | | | | | | | | | | | | | Tru64's make(1) resolves relative paths in "include" directives with respect to the includer. This is inconsistent with all other known make tools. Note that this make tool treats the path literally so we cannot use our standard FULL path code which escapes spaces. Instead qualify the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
* | Merge branch 'mingw-response-files'Brad King2010-06-151-2/+13
|\ \ | |/ |/|
| * Use platform variable for response file flagBrad King2010-03-111-1/+12
| | | | | | | | | | | | | | | | Create platform variable "CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG" to specify an alternative to "@" for referencing response files. It applies specifically to response files with linker options. See issue #10401.
| * Use forward slashes for objects in response filesBrad King2010-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | Response files are parsed by tools, not by shells. We teach cmLocalGenerator::Convert() a new "RESPONSE" output format and use it for objects listed in response files. It does not do special slash or MSYS root translation like the "SHELL" format does. This is necessary for GNU tools on Windows to understand response file content. See issue #10401.
* | -fix GetFrameworkFlags() for Mac, which was broken with my last commitAlex Neundorf2010-05-031-2/+1
| | | | | | | | Alex
* | -improve crosscompiling from Linux to iphone (#10526)Alex Neundorf2010-05-011-6/+8
|/ | | | | | Patch by Karol Krizka Alex
* Fix line-too-long style violationsBrad King2009-10-231-1/+2
| | | | | The commit "Define per-target OSX_ARCHITECTURES property" introduced some long lines. This wraps them into multiple shorter lines.
* Define per-target OSX_ARCHITECTURES propertyBrad King2009-10-211-0/+4
| | | | | | | | | | | The CMAKE_OSX_ARCHITECTURES variable works only as a global setting. This commit defines target properties OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> to specify OS X architectures on a per-target and per-configuration basis. See issue #8725.