summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'install-messages'Brad King2014-06-271-4/+19
|\ | | | | | | | | | | | | | | | | | | | | | | d19b64d6 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761) c9568de5 install: Add CMAKE_INSTALL_MESSAGE variable (#13761) ec7cf7ea install: Thread message level setting through internal API abebcd23 file(INSTALL): Add undocumented options to control output verbosity 464567a5 file(INSTALL): Report existing DIRECTORY as Up-to-date f701b0b7 file(INSTALL): Do not pre-create DESTINATION for DIRECTORY f0a01962 cmInstallTargetGenerator: Drop default constructor arguments 67815894 Help: Add install() command document section headers
| * install: Add CMAKE_INSTALL_MESSAGE variable (#13761)Brad King2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | Create a variable to allow users to control which installation messages are printed. In particular, provide a "LAZY" setting that prints "Installing" messages but not "Up-to-date" messages. This is desirable for incremental re-installations. Suggested-by: J Decker <d3ck0r@gmail.com>
| * install: Thread message level setting through internal APIBrad King2014-06-241-0/+1
| | | | | | | | | | | | | | Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
| * cmInstallTargetGenerator: Drop default constructor argumentsBrad King2014-06-241-4/+18
| | | | | | | | | | | | They are used only in cmLocalGenerator::GenerateTargetInstallRules. Move the defaults to a local helper where the context justifies their values.
* | Fix some generator crashes on undefined CMAKE_BUILD_TYPEBrad King2014-06-231-1/+1
|/ | | | | | | | | | Since commit 84fdc9921 (stringapi: Pass configuration names as strings, 2014-02-09), it is not safe to use GetDefinition("CMAKE_BUILD_TYPE") without checking the return value. Use GetSafeDefinition instead so that a missing definition is treated as an empty string like code paths did prior to the above commit. Reported-by: Richard Wirth <richard@califax.de>
* Features: Escape the COMPILE_OPTIONS for dialects.Stephen Kelly2014-06-131-2/+5
| | | | | Allow for future handling as a list, not a string which may contain whitespace.
* Add OBJECT_FILE_DIR rule placeholder for compilation linesBrad King2014-06-051-0/+7
| | | | | | | | | Some compilers do not offer an option to specify the path to the object file, but rather only to the directory in which to place the object file. See issue 14876 for some examples. Add a new OBJECT_FILE_DIR placeholder to specify the directory containing the object file for the current compilation. This may differ from the main target OBJECT_DIR when the object corresponds to a source in a subdirectory.
* Features: Enable compiler extensions by default.Stephen Kelly2014-05-311-2/+10
| | | | | | | | | | | Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
* Features: Add support for C++14 features.Stephen Kelly2014-05-221-0/+1
| | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* Merge topic 'ninja-intel-ipo'Brad King2014-05-221-5/+3
|\ | | | | | | | | | | | | b6e2e0d1 Ninja: Fix Intel interprocedural optimization with static libraries 5d12b87b cmGeneratorTarget: Improve GetCreateRuleVariable API c2eeb08b cmTarget: Add GetFeatureAsBool method
| * cmGeneratorTarget: Improve GetCreateRuleVariable APIBrad King2014-05-211-5/+3
| | | | | | | | | | Pass the language and configuration to the method so it can return the complete rule variable name.
* | Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-211-0/+25
|/ | | | | | | | | | | | Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
* Features: Extend concept to C language.Stephen Kelly2014-05-141-0/+4
| | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* Merge topic 'decay-language-version'Brad King2014-05-081-6/+60
|\ | | | | | | | | | | | | | | | | | | | | 205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay. 1df2116b Features: Decay language flag if requested is not available. c4f4dac2 Project: Fix exit-on-error with compile feature tests. 5bb7ce72 Project: Use nullary form of main for compile feature tests. 64254e7a Project: Remove extern from static string in feature tests. 0d9c99bf Help: Fix order of help entries. dc7639bd Tests: Fix name of cache variable.
| * cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-071-0/+20
| |
| * Features: Decay language flag if requested is not available.Stephen Kelly2014-05-071-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the highest standard compile flags available if requested language version is too new. This supports use-cases like set(CMAKE_CXX_STANDARD 14) # Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14 # or equivalent flag add_executable(main main.cpp) This can be used in combination with preprocessor defines which communicate the availability of certain language features for optional use.
* | Merge topic 'dev/refactor-source-depends-in-ninja'Brad King2014-05-071-5/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 2583eff6 ninja: Factor out custom command order-only depends 18e478a8 ninja: Factor out target-level order-only dependencies 6fa6bedf LocalGenerator: Add a string overload for AppendFlags 01b79c63 ninja: Don't use a stringstream to build an argument list 3c640891 ninja: Use string parameters
| * | LocalGenerator: Add a string overload for AppendFlagsBen Boeckel2014-05-071-5/+14
| |/
* | OS X: Use -iframework for system framework directoriesMikoĊ‚aj Siedlarek2014-05-071-3/+17
|/ | | | | | | Just like -I flag has its -isystem counterpart which marks an include directory as a system directory and prevents unwanted warnings, on Apple systems there is -iframework -- a system directory replacement for -F. Use this flag to implement include_directories(SYSTEM) for frameworks.
* Merge topic 'target_compile_features'Brad King2014-04-151-0/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9eaf3755 Export: Populate INTERFACE_COMPILE_FEATURES property. 8ed59fc2 Add target_compile_features command. 4e6ca504 cmTargetPropCommandBase: Change the interface to return bool. 5412dede cmTarget: Transitively evaluate compiler features. baff4434 cmTarget: Allow populating COMPILE_FEATURES using generator expressions. f97bf437 Features: Add cxx_auto_type. 03355d6b cmTarget: Add COMPILE_FEATURES target property. faeddf64 project: Add infrastructure for recording CXX compiler features 913394af cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties. 8238a6cd Add some COMPILE_OPTIONS for specifying C++ dialect. 892243fc Tests: Require CMake 3.0 for the SystemInformation test. 59b5fdd3 Don't load Clang-CXX from AppleClang-CXX.
| * cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | Extend the interface of the target_compile_features command with PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES target property if they are set. Consume the INTERFACE_COMPILER_FEATURES target property from linked dependent targets to determine the final required compiler features and the compile flag, if needed. Use the same pattern of origin-debugging which is used for other build properties.
| * cmTarget: Allow populating COMPILE_FEATURES using generator expressions.Stephen Kelly2014-04-071-9/+6
| | | | | | | | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.
| * cmTarget: Add COMPILE_FEATURES target property.Stephen Kelly2014-04-071-0/+13
| | | | | | | | | | | | | | Use the contents of it to upgrade the CXX_STANDARD target property, if appropriate. This will have the effect of adding the -std=c++11 compile flag or other language specification on GNU when that is needed for the feature.
| * cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.Stephen Kelly2014-04-071-0/+29
| | | | | | | | | | These are used to determine whether to add -std=c++11, -std=gnu++11 etc flags on the compile line.
* | Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-13/+21
|/ | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
* Remove default labels from fully covered switch statements.Stephen Kelly2014-04-031-1/+0
| | | | | Allow compilers to warn when new enum values are added, making switches no-longer fully-covered.
* Merge topic 'target-transitive-sources'Brad King2014-04-031-3/+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-3/+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.
* | Merge topic 'target-sources-refactor'Brad King2014-04-031-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources. aa0a3562 cmGeneratorTarget: Compute target objects on demand 042c1c83 cmTarget: Compute languages from object libraries on demand. fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand. c355d108 cmComputeTargetDepends: Track object library depends. e5da9e51 cmTarget: Allow any generator expression in SOURCES property. 5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages 28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand. bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression. 8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES. 4959f341 cmSourceFileLocation: Collapse full path for directory comparisons. fcc92878 cmSourceFileLocation: Remove unused Update method. 59e8740a cmTarget: Remove AddSourceFile method 26d494ba cmTarget: Use string API to add sources to cmTarget objects. d38423ec cmTarget: Add a method to obtain list of filenames for sources. ...
| * cmTarget: Use string API to add sources to cmTarget objects.Stephen Kelly2014-03-311-2/+2
| | | | | | | | | | Continue to call GetOrCreateSource where necessary to create cmSourceFile objects which have the GENERATED attribute set.
* | Simplify multiple config handling.Stephen Kelly2014-04-021-11/+8
|/ | | | | Use conventional pattern of not repeating the loop body for empty config.
* Merge topic 'add_custom_command-no-INTERFACE-lib'Brad King2014-03-201-1/+2
|\ | | | | | | | | 2600e923 Disallow INTERFACE libraries with add_custom_command(TARGET).
| * Disallow INTERFACE libraries with add_custom_command(TARGET).Stephen Kelly2014-03-191-1/+2
| | | | | | | | Don't attempt to trace their dependencies.
* | cmLocalGenerator: Add ComputeObjectFilenames interface.Stephen Kelly2014-03-131-0/+8
| | | | | | | | | | Implement it in the local generators and use it in the global generators.
* | Generalize cmCustomCommandGenerator to more fieldsBrad King2014-03-121-6/+7
| | | | | | | | | | | | | | 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.
* | Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-3/+3
| | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* | Remove some c_str() calls.Stephen Kelly2014-03-111-82/+82
| | | | | | | | | | | | 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 for dependency informationBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-19/+19
| |
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-10/+10
| | | | | | | | | | | | | | | | | | | | | | 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: Take strings in escaping functionsBen Boeckel2014-03-081-26/+28
| |
* | stringapi: Use strings in target nameBen Boeckel2014-03-081-10/+10
| |
* | stringapi: Use strings in Convert methods in LocalGeneratorBen Boeckel2014-03-081-17/+19
| | | | | | | | | | The C strings were turned into std::strings internally anyways and most callers used .c_str().
* | stringapi: Use strings for the languagesBen Boeckel2014-03-081-26/+29
| |
* | stringapi: Use strings for variable namesBen Boeckel2014-03-081-1/+1
| | | | | | | | Variable names are always generated by CMake and should never be NULL.
* | stringapi: Use strings for property namesBen Boeckel2014-03-081-6/+10
| | | | | | | | Property names are always generated by CMake and should never be NULL.
* | cmLocalGenerator: Add response file option to OutputLinkLibrariesBrad King2014-03-041-9/+14
| | | | | | | | | | Response files require different path conversion to be threaded through construction of the link libraries flags.
* | cmLocalGenerator: Simplify GetIncludeFlags output formattingBrad King2014-03-041-12/+4
| | | | | | | | Use the output format argument to ConvertToIncludeReference.
* | cmLocalGenerator: Add format option to ConvertToLinkReferenceBrad King2014-03-041-3/+4
| | | | | | | | Replace the hard-coded SHELL output format with an optional argument.
* | cmLocalGenerator: Add format option to ConvertToIncludeReferenceBrad King2014-03-041-2/+3
| | | | | | | | Replace the hard-coded SHELL output format with an optional argument.