1. 22 Apr, 2019 2 commits
  2. 19 Apr, 2019 1 commit
    • Brad King's avatar
      VS: Provide the default platform name to project code · db02be85
      Brad King authored
      The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio
      generators based on `CMAKE_GENERATOR_PLATFORM` or some default.
      Prior to the VS 2019 generator, the default was always `Win32`.
      However, for the `Visual Studio 16 2019` generator, the default is
      based on the host platform.
      
      Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for
      use by project code.  This is particularly useful in toolchain files
      because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so
      `CMAKE_VS_PLATFORM_NAME` is not yet known.  Of course the toolchain file
      author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not
      then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that
      will be used.
      
      Fixes: #19177
      db02be85
  3. 23 Mar, 2019 1 commit
  4. 01 Mar, 2019 1 commit
    • Brad King's avatar
      VS: Fix Fortran target type selection with RC sources · 0b82f56a
      Brad King authored
      The Intel Fortran `.vfproj` files do support both Fortran and the
      Windows Resource compiler (`.rc)` files.  Prior to CMake 3.9 we did not
      support that, but commit 2c9f3578 (VS: Decide project type by linker
      lang as fallback, 2017-03-30, v3.9.0-rc1~340^2) accidentally enabled it.
      It was then broken by commit d3d2c3cd (VS: Fix Fortran target type
      selection when linking C++ targets, 2019-02-04, v3.14.0-rc1~13^2).
      
      Restore support for Fortran+RC in VS projects and add a test case.
      
      Fixes: #19002
      0b82f56a
  5. 20 Feb, 2019 1 commit
  6. 04 Feb, 2019 1 commit
    • Brad King's avatar
      VS: Fix Fortran target type selection when linking C++ targets · d3d2c3cd
      Brad King authored
      Since commit 2c9f3578 (VS: Decide project type by linker lang as
      fallback, 2017-03-30, v3.9.0-rc1~340^2) we consider the linker language
      when detecting whether to generate a `.vfproj` or `.vcxproj` file.
      However, this could cause C-only projects to become `.vfproj` files if
      they link to Fortran projects.  Instead we should consider only the
      `LINKER_LANGUAGE` property on the target itself.  This approach is
      already used for CSharp.  It allows project code to specify the project
      file type for a target with no sources but does not allow linked targets
      to affect it.
      
      Fixes: #18687
      d3d2c3cd
  7. 29 Jan, 2019 1 commit
  8. 28 Jan, 2019 1 commit
  9. 21 Jan, 2019 1 commit
    • Zack Galbreath's avatar
      Pass EXCLUDE_FROM_ALL from directory to targets · dc688857
      Zack Galbreath authored
      When a target is created it now inherits the EXCLUDE_FROM_ALL property
      from its directory. This change makes it possible to include a target
      in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
      dc688857
  10. 16 Jan, 2019 1 commit
  11. 11 Jan, 2019 1 commit
    • Brad King's avatar
      VS: Add Visual Studio 16 2019 generator · 57e48f16
      Brad King authored
      Add this generator *without* support for specifying the target
      architecture in the generator name.  cmake-gui will be taught
      to provide a field for this, and command-line builds can use -A.
      
      Also, teach this generator to select a default target architecture
      based on the host architecture.
      
      Fixes: #18689
      Inspired-by: Egor Pugin's avatarEgor Pugin <egor.pugin@gmail.com>
      57e48f16
  12. 10 Jan, 2019 4 commits
  13. 25 Oct, 2018 1 commit
  14. 01 Jun, 2018 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · d7204e64
      Kitware Robot authored
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      d7204e64
  15. 24 Apr, 2018 1 commit
  16. 23 Apr, 2018 1 commit
  17. 23 Feb, 2018 1 commit
    • Robert Dailey's avatar
      VS: Support C# project references · 076a356c
      Robert Dailey authored
      When specifying a pure C# target in the `target_link_libraries()` call to
      another C++ target, a `<ProjectReference>` was setup for it (we wanted this)
      but also a corresponding `.lib` was added under `<AdditionalDependencies>`
      (we didn't want this).
      
      This change introduces a check that prevents `.lib` linker options from
      being used when the corresponding target for that library is a C# target.
      
      Fixes: #17678
      076a356c
  18. 31 Jan, 2018 1 commit
    • Pavel Solodovnikov's avatar
      Reduce raw string pointers usage. · 653b8946
      Pavel Solodovnikov authored
      * Change some functions to take `std::string` instead of
        `const char*` in the following classes: `cmMakeFile`, `cmake`,
        `cmCoreTryCompile`, `cmSystemTools`,  `cmState`, `cmLocalGenerator`
        and a few others.
      * Greatly reduce using of `const char*` overloads for
        `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
      * Remove many redundant `c_str()` conversions throughout the code.
      653b8946
  19. 21 Dec, 2017 1 commit
  20. 20 Nov, 2017 1 commit
  21. 18 Oct, 2017 1 commit
    • Brad King's avatar
      VS,Xcode: Add CMakeLists.txt sources without mutating targets · 344d149a
      Brad King authored
      Rather than injecting `CMakeLists.txt` files into each target's
      `SOURCES`, teach the generators to add them during generation using
      dedicated code.  This avoids mutating the original targets, and avoids
      polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific
      content.
      
      This also avoids listing the `CMakeLists.txt` sources in the results of
      `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources`
      test no longer needs a separate case for IDEs.
      344d149a
  22. 13 Oct, 2017 1 commit
  23. 21 Sep, 2017 1 commit
  24. 05 Sep, 2017 1 commit
    • Michael Stürmer's avatar
      VS: Do not reference output assemblies if not possible for CSharp target · 7e57e6ae
      Michael Stürmer authored
      Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to
      CXX targets, 2017-06-20) CSharp targets get `ProjectReference` entries
      to their dependencies.  This causes VS to also reference the
      dependency's output assembly by default, which is incorrect for
      non-managed targets.
      
      Fix this by setting `ReferenceOutputAssembly` to `false` for targets
      that can't provide output assemblies.  Unmanaged C++ targets (shared
      libs & executables) can still be referenced and a warning will be shown
      in the IDE but the build will not break anymore.
      
      Fixes: #17172
      7e57e6ae
  25. 30 Aug, 2017 1 commit
  26. 18 Aug, 2017 1 commit
  27. 11 Apr, 2017 2 commits
    • Daniel Pfeifer's avatar
      Use quotes for non-system includes · 1d829c86
      Daniel Pfeifer authored
      Automate with:
      
      git grep -l '#include <cm_' -- Source \
        | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
      
      git grep -l '#include <cmsys/' -- Source \
        | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
      
      git grep -l '#include <cm[A-Z]' -- Source \
        | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
      1d829c86
    • Brad King's avatar
      VS: Simplify use of object libraries in WINDOWS_EXPORT_ALL_SYMBOLS · 10772c51
      Brad King authored
      Object library files are already included by `GetExternalObjects`
      so we don't need to call `UseObjectLibraries` to get them.
      10772c51
  28. 04 Apr, 2017 1 commit
  29. 30 Mar, 2017 1 commit
  30. 21 Mar, 2017 2 commits
  31. 14 Mar, 2017 1 commit
    • Daniel Pfeifer's avatar
      fix include order of windows.h · 4b49c9a2
      Daniel Pfeifer authored
      Comments that indicate a special include order is necessary because
      GetCurrentDirectory might get redefined are outdated.  Remove those
      outdated comments and use the normal ordering of includes.
      4b49c9a2
  32. 09 Mar, 2017 1 commit
    • Brad King's avatar
      Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementation · f36eaf6a
      Brad King authored
      Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the
      implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a
      `.def` file as a source.  Only one of these could be used within a
      single target before anyway.
      f36eaf6a
  33. 07 Mar, 2017 1 commit
  34. 30 Jan, 2017 1 commit