summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'run-include-what-you-use'Brad King2015-05-211-0/+2
|\ | | | | | | | | | | ada5ffce Add options to run include-what-you-use with the compiler 67fa3da9 cmake: Add internal -E mode to run include-what-you-use with the compiler
| * Add options to run include-what-you-use with the compilerBrad King2015-05-191-0/+2
| | | | | | | | | | | | Create a <LANG>_INCLUDE_WHAT_YOU_USE target property (initialized by a CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE variable) to specify an IWYU command line to be run along with the compiler.
* | cmTarget: Simplify CMP0023 message loop.Stephen Kelly2015-05-181-15/+5
| | | | | | | | | | This method is only called if there is a mismatch and something to print. Remove intermediate container.
* | cmTarget: Simplify output computation.Stephen Kelly2015-05-181-1/+1
| | | | | | | | | | We always have line information for contexts resulting from command execution.
* | cmTarget: Store context in stack only if different.Stephen Kelly2015-05-181-8/+5
| | | | | | | | | | | | The PushTLLCommandTrace method is called once per link item for a single target_link_libraries command. Avoid storing copies of identical execution contexts and rely on the uniqueness while printing output.
* | cmTarget: Store only cmListFileContext for CMP0023 handling.Stephen Kelly2015-05-181-15/+12
| | | | | | | | | | Only the top level execution context is shown, as appropriate, so store only that.
* | cmTarget: Remove needless iteration.Stephen Kelly2015-05-181-1/+0
|/ | | | This is not a loop.
* Merge topic 'refactor-cmPolicies'Brad King2015-05-051-26/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 013ada80 cmPolicies: Implement PolicyMap in terms of bitset. be6664c2 cmPolicies: Implement abstraction for PolicyMap. de211686 Port to static cmPolicies API. 13981f20 cmPolicies: Make all API static. 23e2bcc8 cmPolicies: Remove unused DefinePolicy method. 5641ba4f cmPolicies: Remove unused cmPolicy class. 3de54497 cmPolicies: Loop over all policies using enum constants. 387aff20 cmPolicies: Trivialize GetPolicyStatus method. dbf680d6 cmPolicies: Use more-direct ID access. 8c204133 cmPolicies: Implement in terms of public API. e3a8c029 cmPolicies: Make private method file-static. cb765af0 cmPolicies: Implement short description access with XMacros. 5df267fa cmPolicies: Implement version check with XMacro. 2235cfeb cmPolicies: Implement id to version with XMacro. 05d84388 cmPolicies: Implement id to string conversion with XMacro. 6eaade8a cmPolicies: Introduce XMacro table for policy data. ...
| * Port to static cmPolicies API.Stephen Kelly2015-05-041-26/+12
| |
* | Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-10/+8
|/
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-4/+4
|
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* Move property definition to cmState.Stephen Kelly2015-04-131-14/+0
|
* Merge topic 'introduce-cmState'Brad King2015-04-131-2/+2
|\ | | | | | | | | | | | | | | f081c5bd cmState: Move CacheEntryType enum from cmCacheManager. f71fdf0e cmMakefile: Remove unused CacheManager accessor. ff7169a0 Port to cmState. a6b1ad13 Introduce cmState class.
| * cmState: Move CacheEntryType enum from cmCacheManager.Stephen Kelly2015-04-131-2/+2
| |
* | cmake: Remove DebugConfigs member.Stephen Kelly2015-04-121-2/+2
| | | | | | | | It adds needless complexity to global property handling.
* | Properties: Add CROSSCOMPILING_EMULATOR target property.Matt McCormick2015-04-071-0/+1
|/ | | | | | | Add CROSSCOMPILING_EMULATOR target property for executables. This is used by subsequent patches to run exectuables created for the target system when crosscompiling. The property is initialized by the CMAKE_CROSSCOMPILING_EMULATOR variable when defined.
* OS X: Add handling for XCTest bundlesGregor Jasny2015-03-231-1/+15
| | | | | | | | | | An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Genex: Allow COMPILE_LANGUAGE when processing include directories.Stephen Kelly2015-03-091-5/+9
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Allow COMPILE_LANGUAGE when processing compile definitions.Stephen Kelly2015-03-091-5/+9
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Enable use of COMPILE_LANGUAGE for compile options.Stephen Kelly2015-03-091-9/+17
| | | | | | Follow-ups will allow the use of the generator expression for compile definitions and include directories for non-IDE generators.
* Merge topic 'minor-cleanups'Brad King2015-02-231-5/+5
|\ | | | | | | | | | | | | | | c021f59c cmMakefile: Store macro list in a vector not in a map. 2d130896 cmMakefile: Fix list of macros generation. f1969234 cmFunctionCommand: Remove ineffectual code. 1116698a cmTarget: Don't needlessly clear vectors in the destructor.
| * cmTarget: Don't needlessly clear vectors in the destructor.Stephen Kelly2015-02-211-5/+5
| | | | | | | | This will be done anyway for us.
* | cmTarget: Port loop to algorithm.Stephen Kelly2015-02-201-6/+3
|/
* cmTarget: Remove template argument workaround.Stephen Kelly2015-02-171-9/+5
| | | | | | Pre-C++98 compilers required that the template argument be used in the function parameters. Those compilers are no longer supported as hosts, so drop the workaround.
* cmTarget: Use a sorted vector in place of a set.Stephen Kelly2015-02-111-17/+10
| | | | | | | The vector has a more easy-to-use API. Join the string with cmJoin, and avoid erasing from the container in the loop.
* Replace loop with algorithm.Stephen Kelly2015-02-061-7/+3
|
* Use insert member instead of back_inserter.Stephen Kelly2015-02-061-2/+1
|
* Merge topic 'consistent-empty-method'Brad King2015-01-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 5f69314e Replace foo.length() pattern with !foo.empty(). fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty() f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty(). 86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty(). fd7b3712 Replace foo.size() pattern with !foo.empty(). aa773035 Replace !foo.size() pattern with foo.empty(). 64592633 cmListCommand: Use empty() and expand whitespace. 607e1938 Replace 'foo.size() != 0' pattern with !foo.empty(). 930bd478 Replace 'foo.size() == 0' pattern with foo.empty(). d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
| * Replace 'foo.size() != 0' pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
| |
* | Use the cmDeleteAll algorithm for types derived from std::map.Stephen Kelly2015-01-171-10/+2
|/
* Merge topic 'delete-algorithm'Brad King2015-01-151-7/+1
|\ | | | | | | | | | | | | | | 65b81da4 cmVariableWatch: Use the cmDeleteAll algorithm with for_each. 30d2de9a cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll. 4a6e795b Use the cmDeleteAll algorithm instead of trivial raw loops. abb4a678 Add a generic algorithm for deleting items in a container.
| * Use the cmDeleteAll algorithm instead of trivial raw loops.Stephen Kelly2015-01-131-7/+1
| |
* | Merge topic 'fix-LOCATION-with-TARGET_OBJECTS'Brad King2015-01-151-0/+1
|\ \ | |/ |/| | | | | 23f3798c cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
| * cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)Stephen Kelly2015-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit v3.1.0-rc1~297^2~5 (cmTarget: Drop 'head' argument from GetSourceFiles, 2014-07-10) exposed a dormant bug in source file computation, causing the test case to regress. After that commit, the source file computation and caching finds an existing container of source files. Prior to that patch, the GetSourceFiles method was called with either a null pointer for the head cmTarget, or it was called with the this pointer. The processSources method is eventually called, which normalizes the difference between the null pointer and the this pointer for the head target. However, the cache key depends on the actual pre-normalized pointer. The change in that commit caused the entry to be found in the cache where it was not before, which resulted in incorrect behavior. Prior to that commit, the test case also fails if the GetSourceFiles overload taking a vector<cmSourceFile*> is changed to normalize the head target at the beginning of the method: cmTarget const* head = head_ ? head_ : this; Such a construct was correctly used in other locations where similar caching was in place, before being removed in commit v3.1.0-rc1~310^2~25 (cmTarget: Remove 'head' argument from GetLinkInformation, 2014-06-12), but is not neccessary anymore. Commit v3.1.0-rc1~674^2~2 (cmTarget: Cache the cmSourceFiles in GetSourceFiles., 2014-04-05) introduced the caching, but fails the test case for an unrelated reason. That unrelated error was introduced in commit v3.1.0-rc1~688^2~5 (cmTarget: Allow any generator expression in SOURCES property., 2014-03-18) and fixed in commit v3.1.0-rc1~561^2~1 (cmTarget: Fix listing of source files at configure-time., 2014-04-13). All commits which fail the test case in the testable way do so when such a cached version of the source files is found and returned at generate time. In the test case, the cached content is populated at configure-time through the use of the deprecated LOCATION property with CMP0026 OLD. The cached content is an empty container for the bar target in the test case, because its source file 'foo.cpp.o' is not known until generate-time. That means that no source files are available to compute the link language and the reported error is issued. The actual problem is that the SourceFilesMap should be cleared after configure time by cmTarget::ClearLinkMaps. Clear it there now.
* | Merge topic 'join-algorithm'Brad King2015-01-121-28/+3
|\ \ | | | | | | | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * | Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-28/+3
| | |
* | | Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-38/+38
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * | | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-38/+38
| |/ / | | | | | | | | | All compilers hosting CMake support the std class.
* | | cmTarget: Use insert instead of std::copy.Stephen Kelly2015-01-111-2/+2
| | | | | | | | | | | | | | | insert can reserve() memory in the container, and this is more-consistent with the rest of CMake now.
* | | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-16/+4
| | |
* | | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-5/+2
|/ / | | | | | | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* | Merge topic 'osx-cfbundle-tweaks'Brad King2014-12-191-9/+2
|\ \ | | | | | | | | | | | | | | | | | | b189c599 Tests: Run CFBundleTest only with valid configuration 3a605693 Xcode: Call IsCFBundleOnApple to decide if bundle is being built 207b7af0 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal
| * | cmTarget: Use GetCFBundleDirectory within GetFullNameInternalGregor Jasny2014-12-171-9/+2
| | | | | | | | | | | | | | | | | | Replace duplicated code by call to GetCFBundleDirectory. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* | | Add 'ANDROID_API_MIN' target property to set Android Target MIN APIDmitry Polyanitsa2014-12-171-0/+1
|/ / | | | | | | | | | | Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property default. Teach the VS generator to write the MIN API value into Nsight Tegra project files.
* | Fix some Clang -Wstring-conversion warningsSean McBride2014-12-121-6/+6
| | | | | | | | | | Some false positives, but some flagged faulty asserts where the ! was inside the string instead of outside.
* | Merge topic 'target-sources-error-conditions'Brad King2014-12-011-3/+23
|\ \ | |/ | | | | | | | | | | 8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES. e1348056 Export: Disallow export of targets with INTERFACE_SOURCES bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES
| * cmTarget: Don't allow relative paths in INTERFACE_SOURCESStephen Kelly2014-11-291-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES. Existence is already checked by cmSourceFile::GetFullPath. Add a check to disallow relative paths in source directories. Otherwise code such as target_sources(lib1 INTERFACE foo.cpp) would fail if consumed by a target in a different directory. Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether the entry comes from an IMPORTED target or not. In the include directories case, the directory for a non-imported target might not exist yet but might be created. In the sources case, a file which does not yet exist in the filesystem must be explicitly marked with the GENERATED property. Adjust existing tests and add a new test for the error.
* | Merge topic 'remove-ancient-msvc-workarounds'Brad King2014-11-251-12/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12cb0b86 Help: Update developer manual with some C++ features now permitted. ba74465f cmGeneratorTarget: Remove MSVC7 workaround 41363c0c VisualStudio: Remove MSVC6 compatibility macro. 4efcfe52 cmSystemTools: Remove MSVC6 compatibility define. 5f4695cd cmStandardIncludes: Remove MSVC6 condition for cmArrayBegin macro. 7a064337 cmFindCommon: Remove MSVC6 workaround for nested struct private access. fdb73547 cmTarget: Remove std::min and std::max MSVC6 compatibility code.