1. 29 Nov, 2014 2 commits
    • Stephen Kelly's avatar
      Export: Disallow export of targets with INTERFACE_SOURCES · e1348056
      Stephen Kelly authored
      This can be allowed in the next release, but it needs to have some
      features present and tested such as
      
      * Ensuring that relative paths do not appear in the generated property.
      * Ensuring that paths to the source or build directories do not appear.
      * Generating a check in the file for CMake 3.1 or later so that the
          resulting property will be consumed.
      * Ensuring that any referenced targets are part of an export set and
          generating a check for them.
      * INSTALL_INTERFACE and BUILD_INTERFACE content.
      
      All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
      but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
      As the checks introduce some new error conditions, it is better to
      disallow exporting fully for this case and introduce proper error
      conditions later instead of policies.
      e1348056
    • 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
  2. 06 Jun, 2014 1 commit
    • Brad King's avatar
      Tests: Fix RunCMake.TargetSources on Xcode 1.5 · 0366ba5d
      Brad King authored
      Xcode 1.5 does not support multiple configurations.  The generator also
      adds some sources internally that cause extra OriginDebug output.
      Update the expected output to tolerate it.
      0366ba5d
  3. 13 Apr, 2014 1 commit
    • Stephen Kelly's avatar
      cmTarget: Fix listing of source files at configure-time. · b8af2011
      Stephen Kelly authored
      Since commit e5da9e51 (cmTarget: Allow any generator expression in
      SOURCES property., 2014-03-18), source files are computed by
      true evaluation of generator expressions, including TARGET_OBJECTS.
      This evaluation requires the presence of cmGeneratorTarget objects
      since commit bf98cc25 (Genex: Evaluate TARGET_OBJECTS as a normal
      expression., 2014-02-26).
      
      Ensure that we don't attempt to evaluate the TARGET_OBJECTS generator
      expression at configure-time, as can happen if CMP0024 or CMP0026
      are OLD.  Use old-style parsing of the source item to extract
      object target names in that case.
      
      Avoid calling GetProperty("SOURCES") to bypass warnings from CMP0051.
      Refactor existing logic in GetLanguages which is similar in intent to
      the new GetSourceFiles code.
      b8af2011
  4. 02 Apr, 2014 2 commits
    • Stephen Kelly's avatar
      6e636f2e
    • Stephen Kelly's avatar
      cmTarget: Make the source files depend on the config. · e6971df6
      Stephen Kelly authored
      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.
      e6971df6