1. 25 Jun, 2015 1 commit
    • Brad King's avatar
      cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) · 30c2e1dd
      Brad King authored
      Since commit v3.3.0-rc1~62^2~5 (cmTarget: Store only cmListFileContext
      for CMP0023 handling, 2015-05-18) a call to target_link_libraries on a
      target that was defined in another (non-ancestor) directory crashes
      because no execution context is left active.  Fix this by getting the
      execution context from the actual cmMakefile where the current
      target_link_libraries call takes place.  Test this by verifying that
      such calls correctly produce an error diagnostic instead of crashing.
      30c2e1dd
  2. 19 May, 2015 1 commit
  3. 18 May, 2015 5 commits
  4. 04 May, 2015 1 commit
  5. 03 May, 2015 1 commit
  6. 20 Apr, 2015 2 commits
  7. 13 Apr, 2015 2 commits
  8. 12 Apr, 2015 1 commit
  9. 07 Apr, 2015 1 commit
    • Matt McCormick's avatar
      Properties: Add CROSSCOMPILING_EMULATOR target property. · 579c4bec
      Matt McCormick authored
      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.
      579c4bec
  10. 23 Mar, 2015 1 commit
  11. 10 Mar, 2015 1 commit
  12. 09 Mar, 2015 3 commits
  13. 21 Feb, 2015 1 commit
  14. 20 Feb, 2015 1 commit
  15. 17 Feb, 2015 1 commit
  16. 11 Feb, 2015 1 commit
  17. 06 Feb, 2015 2 commits
  18. 18 Jan, 2015 1 commit
  19. 17 Jan, 2015 1 commit
  20. 13 Jan, 2015 2 commits
    • Stephen Kelly's avatar
    • Stephen Kelly's avatar
      cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338) · 23f3798c
      Stephen Kelly authored
      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.
      23f3798c
  21. 11 Jan, 2015 4 commits
  22. 08 Jan, 2015 1 commit
  23. 17 Dec, 2014 2 commits
  24. 12 Dec, 2014 1 commit
  25. 29 Nov, 2014 1 commit
    • Stephen Kelly's avatar
      cmTarget: Don't allow relative paths in INTERFACE_SOURCES · bb5905bb
      Stephen Kelly authored
      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.
      bb5905bb
  26. 23 Nov, 2014 1 commit