Visual Studio update Ninja build

The Ninja build executable for Visual Studio is located like:

C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe

which can be determined from:

where ninja

The factory Visual Studio Ninja version may be too old for use with CMake Fortran projects. If this is so, when Generating a CMake project from Visual Studio, errors will result stating so. This is particularly needed for CMake + Ninja + Fortran projects, which require Ninja ≥ 1.10.

Fix

Replace the Visual Studio Ninja executable with the latest Ninja version, perhaps with a soft link to the ninja.exe desired.

  1. move the old Ninja exe

    move "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" ninja.old
    
  2. create a softlink to the new Ninja like:

    mklink "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" C:/ninja/ninja.exe