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. 25 Nov, 2014 1 commit
    • Stephen Kelly's avatar
      WCDH: Make the header -Wundef safe for the C language. · d0af0fae
      Stephen Kelly authored
      The __STDC_VERSION__ macro may be defined or not depending on the
      implementation dialect of C.  Test that it is defined before testing
      its value.
      
      The CXX tests do not need such a change because they define __cplusplus
      in all dialects.
      d0af0fae
  3. 20 Nov, 2014 2 commits
  4. 18 Nov, 2014 1 commit
  5. 10 Nov, 2014 1 commit
    • Daniele E. Domenichelli's avatar
      Fix link line order when shared libraries are de-duplicated · 4db31095
      Daniele E. Domenichelli authored
      Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in
      generated link lines, 2014-07-30) we de-duplicate shared library targets
      on the link line.  However, some toolchains will fail linking if an
      executable is linking to a shared library that is not used directly and
      a static library that depends on the shared one.  The linker may not
      keep the reference to the shared library the first time and then the
      symbols needed by the static library may not be found.
      
      Fix this by reversing the direction of the for loop that removes the
      duplicate shared libraries, in order to ensure that the last occurrence
      of the library is left instead of the first one.
      
      Extend Tests/Dependency with a case covering this behavior.  Create an
      executable that links to a shared library and a static library but only
      needs the shared library as a dependency of the static library.
      
      Co-Author: Brad King <brad.king@kitware.com>
      4db31095
  6. 24 Oct, 2014 2 commits
  7. 22 Oct, 2014 1 commit
  8. 13 Oct, 2014 1 commit
    • Brad King's avatar
      Ninja: Fix RC include directories regression · f4c5eade
      Brad King authored
      Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags
      output formatting, 2014-03-04) caused Windows Resource Compiler include
      directories to be computed as relative paths in the Ninja generator.
      This breaks the cmcldeps handling of include paths.  The reason for the
      regression is that several cmLocalGenerator::GetIncludeFlags callers
      treated the fourth "bool forResponseFile" argument as if it controlled
      whether include directories were a full path.  It actually did control
      that by accident until the above commit.
      
      Add an explicit "bool forceFullPaths" argument to GetIncludeFlags
      and thread the value through ConvertToIncludeReference as needed.
      Update GetIncludeFlags call sites that really wanted to control the
      forResponseFile setting to be aware of the new argument.  Extend the
      VSResource test to cover this case.
      f4c5eade
  9. 10 Oct, 2014 1 commit
    • Clinton Stimpson's avatar
      OSX: Warn when attempting to change runtime paths on OS X 10.5 · 50e261dd
      Clinton Stimpson authored
      Even though 10.5 supports @rpath, the support is not complete
      enough for CMake.  For instance, install_name_tool doesn't support
      adding and removing rpaths.
      
      Also modifying BundleUtilities test to remove an undesirable cmake
      generated runtime path.  The intent was to build with the install
      rpath as is done with the other cases in this test.
      50e261dd
  10. 07 Oct, 2014 5 commits
  11. 06 Oct, 2014 2 commits
  12. 30 Sep, 2014 3 commits
    • Brad King's avatar
      VS: Fix Tegra-Android platform linking of libraries by name · 178f56a5
      Brad King authored
      
      
      Nsight Tegra Visual Studio Edition handles prefixing of library names
      with '-l' automatically, so teach the generator not to do so.
      Reported-by: default avatarMourad Boufarguine <mourad@boufarguine.name>
      178f56a5
    • Brad King's avatar
      Tests: Add test for VS Nsight Tegra generator support · 7115702f
      Brad King authored
      Create a VSNsightTegra test based on the "two-libs" example from the
      Android NDK.  Add it whenever testing on a machine with VS 11 or 12
      and the NVIDIA Nsight Tegra Visual Studio Edition installed.  Exclude
      it when there is a space in the path to the source or build tree because
      the tools do not seem to support it.
      7115702f
    • Brad King's avatar
      VS: Support Intel Fortran 15 .vfproj generation (#15175) · a128129a
      Brad King authored
      
      
      This version of the Intel Fortran plugin to Visual Studio says:
      
       please make sure that $(OutDir), $(TargetName) and $(TargetExt)
       property values match the value specified in %(Link.OutputFile)
      
      We must set TargetName and TargetExt in addition to the existing
      setting for OutputDirectory.  The settings do not appear to hurt
      older versions of Intel Fortran, so set them unconditionally.
      
      Extend the FortranOnly test to cover a corresponding use case by
      using the OUTPUT_NAME target property.
      Inspired-by: default avatarIan Harvey <Ian.Harvey@megms.com.au>
      a128129a
  13. 29 Sep, 2014 1 commit
  14. 26 Sep, 2014 1 commit
  15. 22 Sep, 2014 1 commit
    • Sylvain Joubert's avatar
      Ninja: Prevent compilers to be silently modified · 6120fca8
      Sylvain Joubert authored
      Unlike with Unix Makefiles generator modifying compiler paths was not
      protected with Ninja generator.  It was possible to modify them in the
      cache without the expected effect on the generated solution.  Also
      activate corresponding tests with Ninja.
      6120fca8
  16. 18 Sep, 2014 1 commit
  17. 17 Sep, 2014 1 commit
  18. 16 Sep, 2014 1 commit
    • Brad King's avatar
      Tests: Fix CMP0054 warnings · fa7d47ac
      Brad King authored
      Hack the CMP0054 warning locally to be an error and run the test suite.
      Resolve CMP0054 in Tests/* code as appropriate for each case.
      fa7d47ac
  19. 15 Sep, 2014 3 commits
  20. 11 Sep, 2014 2 commits
  21. 10 Sep, 2014 1 commit
  22. 05 Sep, 2014 2 commits
    • Brad King's avatar
      VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8 · b97736a2
      Brad King authored
      For VS generator names that do not specify the platform name, read
      CMAKE_GENERATOR_PLATFORM to get it.
      
      Extend the RunCMake.GeneratorPlatform test with a case covering
      use of the x64 platform when the test generator is a Visual Studio
      generator whose name does not specify a platform.
      b97736a2
    • Brad King's avatar
      CMake: Add CMAKE_GENERATOR_PLATFORM option · 0f1f1271
      Brad King authored
      Reject the option by default.  It will be implemented on a per-generator
      basis.  Pass the setting into try_compile project generation.  Add cache
      entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to
      hold the value persistently.
      
      Add a RunCMake.GeneratorPlatform test to cover basic use cases for the
      option.  Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and
      that it is rejected when the generator does not support a user setting.
      0f1f1271
  23. 03 Sep, 2014 1 commit
  24. 02 Sep, 2014 2 commits
  25. 28 Aug, 2014 1 commit