CMake version recommendations and install

CMake ≥ 3.17 is strongly recommended in general for more robust and easy syntax.

Compile/Install CMake

This will get you the latest release of CMake. For Linux and Mac, admin/sudo is NOT required.

  • Linux: Download/build/install Cmake 3 using cmake_setup
  • Mac: brew install cmake or use .dmg
  • Windows: use Windows win64-x64 installer


There is an unoffical PyPi CMake package:

pip install cmake

This often is the quickest cross-platform way to get the current CMake release.

CMake major versions

  • 3.19: added support for ISPC language, JSON parsing, FindPython/find_package version ranges
  • 3.18: CMake Profiler cmake -B build --profiling-output=perf.json --profiling-format=google-trace
  • 3.17: Ninja Multi-Config generator, --debug-find to see what find_package() is trying to do, eliminate Windows “sh.exe is on PATH” error. Recognize that Ninja 1.10.0 correctly works with Fortran.
  • 3.16: Precompiled headers, unity builds, many advanced project features
  • 3.15: CMAKE_GENERATOR environment variable works like -G option, enhanced Python interpreter finding, add “cmake –install” command
  • 3.14: check_fortran_source_runs(), better FetchContent
  • 3.13: ctest --progress, better Matlab compiler support, lots of new linking options, fixes to Fortran submodule bugs, cmake -B build incantation, target_sources() with absolute path
  • 3.12: transitive library specification (out of same directory), full Fortran Submodule support
  • 3.11: specify targets initially w/o sources, FetchContent


These versions of CMake have been deprecated. Setting cmake_policy to accomodate these old versions emits a deprecation warning from CMake.

  • 3.10: added Fortran Flang (LLVM) compiler, extensive MPI features added
  • 3.9: further C# and Cuda support originally added in CMake 3.8.
  • 3.8: Initial Cuda support
  • 3.7: comparing ≤ ≥ , initial Fortran submodule support
  • 3.6: better OpenBLAS support
  • 3.5: Enhanced FindBoost target with auto Boost prereqs
  • 3.4: Limit CPU usage when using ctest -j parallel tests
  • 3.3: List operations such as IN_LIST