summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't duplicate -D defines sent to the compiler.Stephen Kelly2012-08-201-2/+8
| | | | | | | | | | | 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.
* Merge topic 'ninja-cldeps'David Cole2012-06-191-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eb410e8 Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build 5ead31d Ninja: try work around for bcc32 bug 1333b57 Ninja: build server fixes 9081e3a remove warning about unused parameter f430bea Ninja: maybe this fixes the bcc32 build f2c1288 Ninja: msvc6 for-scoping 44b9bbc Ninja: build with old msvc versions 57156a5 Ninja: build server fixes f1abdce Ninja: some bytes of the rc files couldn't be piped correctly 2de963d Ninja: don't remove space between command and parameters 50b6f33 Ninja: build cmcldeps with mingw c05653e Ninja: try to make GetProcessId visible ab245ff Ninja: but cl supports /nologo ... bf58e9a Ninja: no /nologo option in old rc.exe 2fb07fc Ninja: Eclipse and KDevelop fixes for ninja 518c065 Ninja: don't pollute build dir with preprocessed rc files ...
| * remove warning about unused parameterPeter Kuemmel2012-06-161-1/+1
| |
| * Ninja: Eclipse and KDevelop fixes for ninjaPeter Kuemmel2012-06-151-0/+4
| | | | | | | | Thx to Claus Klein
| * Ninja: work with ninja/master, don't compile rc files with clPeter Kuemmel2012-06-121-0/+1
| | | | | | | | | | Ninja generates for paths with spaces wrong results for $out.d, using the new DEP_FILE variable instead.
* | Refactor generation of shared library flagsStephen Kelly2012-06-121-1/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* make cmLocalGenerator::EscapeForCMake() staticAlex Neundorf2012-03-261-1/+1
| | | | | | This way it can be used also if there is no cmLocalGenerator instance around Alex
* Merge topic 'cleanup-object-file-names'Brad King2012-03-131-8/+0
|\ | | | | | | | | | | | | 0996f2a Hide Makefile local object info inside local generator 67734be VS: Simplify object name computation 4ae7f36 Remove unused partial OBJECT_FILES property implementation
| * Remove unused partial OBJECT_FILES property implementationBrad King2012-03-061-8/+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.
* | Merge topic 'target-include-directories'David Cole2012-03-081-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d662dff Fix shadowed variable warning on dashboard results f66e735 Fix compiler warning reported on older Borland dashboard. d90eed4 Fix compiler error reported on older Borland dashboard. 8233636 Update the documentation regarding INCLUDE_DIRECTORIES. d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES c21db87 Make search paths ordered and unique 22021f0 Remove cmMakefile::GetIncludeDirectories 9106b56 Extract and use the INCLUDE_DIRECTORIES target properties. 840509b Keep the INCLUDE_DIRECTORIES target property up to date. a4d5f7b Add API to get the ordered includes for a target. 8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories 7620932 Remove include flags memoization. 97a5faa Make it safe to call this method without creating duplicates. edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
| * | Extract and use the INCLUDE_DIRECTORIES target properties.Stephen Kelly2012-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate callers of cmMakefile::GetIncludeDirectories. All callers of GetIncludeDirectories should go through the local generator object. Only the local generator calls cmTarget::GetIncludeDirectories directly.
| * | Remove include flags memoization.Stephen Kelly2012-02-221-2/+1
| | |
| * | Refactor GetIncludeFlags to take includes instead of fetching themStephen Kelly2012-02-221-2/+2
| |/
* | doxygen: Improve API docs of GetRealDependencyYury G. Kudryashov2012-02-281-9/+12
|/ | | | Use list instead of sequence of sentences in one paragraph.
* Doxygen: Improve code documentation.Nicolas Despres2011-10-231-0/+1
|
* Fix typo.Nicolas Despres2011-10-231-2/+2
|
* Remove trailing white-spaces.Nicolas Despres2011-10-231-24/+24
|
* Introduce a cmLocalGenerator::ConvertToIncludeReference functionPeter Collingbourne2011-10-021-1/+3
| | | | | This provides a mechanism for the local generator to override how header search paths are generated.
* Make cmLocalGenerator::ConvertToLinkReference virtualPeter Collingbourne2011-10-021-1/+1
| | | | | This provides a mechanism for the local generator to override how library search paths are generated.
* Add const versions of some getters.Nicolas Despres2011-10-021-0/+2
|
* Fortran: Add support for free- and fixed-form flagsBrad King2011-08-311-0/+8
| | | | | | | 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 clLocalGenerator::GetTargetFlags() publicAlex Neundorf2011-07-021-1/+1
| | | | | | This will later on be used for getting the link flags Alex
* Optionally pass include directories with response filesBrad King2011-03-171-1/+2
| | | | | | 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.
* Remove cmLocalGenerator::GetRealLocationBrad King2010-12-081-5/+0
| | | | | | The cmCustomCommandGenerator::GetCommand method completely replaces the purpose of this method. Re-implement GetRealLocation inline at the only remaining call site and remove it.
* Skip file-level dependencies on custom targets (#11332)Brad King2010-12-081-0/+1
| | | | | | | A custom command may name a target created by add_custom_target in its DEPENDS field. Treat this case as a target-level dependency only since a custom target provides no standard file on which to add a file-level dependency.
* Improve signature of cmLocalGenerator::GetRealDependencyBrad King2010-12-081-2/+3
| | | | Allow file-level custom command dependencies to be skipped.
* Merge branch 'mingw-response-files'Brad King2010-06-151-1/+1
|\
| * 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.
* | -improve crosscompiling from Linux to iphone (#10526)Alex Neundorf2010-05-011-2/+0
|/ | | | | | 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.
* Introduce "build feature" lookup frameworkBrad King2009-10-021-0/+4
| | | | | | | This creates cmTarget::GetFeature and cmMakefile::GetFeature methods to query "build feature" properties. These methods handle local-to-global scope and per-configuration property lookup. Specific build features will be defined later.
* 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.
* Optionally force conversion to relative pathBrad King2009-09-221-1/+1
| | | | | | | | In cmLocalGenerator::ConvertToRelativePath we normally convert to relative path only if the local and remote paths both lie inside the source tree or both lie inside the build tree. This commit adds an optional 'force' argument to allow conversion even when this rule is violated.
* Factor cmLocalGenerator::Configure input file readBrad King2009-09-031-0/+3
| | | | | | This method tells the cmMakefile to read the input CMakeLists.txt file. We factor out the call into a ReadInputFile method so it can be extended without polluting the Configure method.
* Factor cmLocalGenerator::Configure object max pathBrad King2009-09-031-0/+1
| | | | | | Much of the code in this method was dedicated to computing ObjectMaxPath after configuring the directory. We move this last step into its own ComputeObjectMaxPath method for better organization.
* ENH: add group support and fix borland errorBill Hoffman2009-07-111-4/+4
|
* ENH: first pass at VS 10, can bootstrap CMake, but many tests still failBill Hoffman2009-06-251-1/+1
|
* BUG: Use new include dir suppresson for all gensBrad King2009-02-261-1/+2
| | | | | | This fixes CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to be used for all generators instead of just those that construct their own compiler command lines directly. See issue #8598.
* BUG: Remove implicit include dir suppressionBrad King2009-02-241-2/+1
| | | | | | | We used to suppress generation of -I/usr/include (and on OSX also -I/usr/local/include). This behavior seems to cause more trouble than it's worth, so I'm removing it until someone encounters the original problem it fixed. See issue #8598.
* ENH: Add rule substitutions useful for launchersBrad King2009-02-101-0/+1
| | | | | | This defines make rule substitutions <LANGUAGE>, <TARGET_NAME>, <TARGET_TYPE>, and <OUTPUT>. They will be useful for RULE_LAUNCH_* property values.
* ENH: Define RULE_LAUNCH_* propertiesBrad King2009-02-101-0/+7
| | | | | | | This defines global, directory, and target properties RULE_LAUNCH_COMPILE, RULE_LAUNCH_LINK, and RULE_LAUNCH_CUSTOM. Their values specify 'launcher' command lines which are prefixed to compile, link, and custom build rules by Makefile generators.
* ENH: Warn if build dir is too long for filesystemBrad King2008-12-161-0/+1
| | | | | | When an object file directory is too deep to place an object file without exceeding CMAKE_OBJECT_PATH_MAX, this issues a warning. Previously we silently ignored the problem. See issue #7860.
* ENH: Refactor passing of max length object dirBrad King2008-12-161-2/+2
| | | | | | When computing the maximum length full path to the build directory under which object files will be placed, pass the actual path instead of just its length. This will be useful for error message generation.
* ENH: Fix optional use of relative paths.Brad King2008-10-091-3/+20
| | | | | | | These changes refactor cmLocalGenerator methods Convert and ConvertToOutputForExisting to support references inside the build tree using relative paths. After this commit, all tests pass with Makefile generators when relative paths are enabled by default. See issue #7779.
* ENH: Create Info.plist files in OS X FrameworksBrad King2008-09-021-0/+7
| | | | | | | A Mac OS X Framework should provide a Resources/Info.plist file containing meta-data about the framework. This change generates a default Info.plist for frameworks and provides an interface for users to customize it.
* ENH: Allow custom limit on object file path lengthBrad King2008-08-211-0/+1
| | | | | | | | Some native build tools, particularly those for cross compiling, may have a limit on the length of the full path to an object file name that is lower than the platform otherwise supports. This change allows the limit to be set by the project toolchain file through the variable CMAKE_OBJECT_PATH_MAX.
* ENH: Allow multiple OS X applications bundles to be created in a single ↵Brad King2008-02-141-0/+6
| | | | build directory. Converted Info.plist files to be generated directly instead of configured with make variables. The MACOSX_BUNDLE_* variables are now properties (and vars for compatibility).
* ENH: Enable use of link script whenever incremental archive construction ↵Brad King2008-01-301-0/+4
| | | | rules are available. Enable use of archive construction rules on MSYS.