Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active August 11, 2023 02:51
Show Gist options
  • Save scivision/b9c1f3243fefe48f2dff0a84c40327fb to your computer and use it in GitHub Desktop.
Save scivision/b9c1f3243fefe48f2dff0a84c40327fb to your computer and use it in GitHub Desktop.
CMake print generator version (Make, Ninja, Visual Studio ...)
execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} --version
OUTPUT_VARIABLE gen_ver)
string(REGEX REPLACE "\n" ";" gen_ver "${gen_ver}")
list(GET gen_ver 0 gen_ver)
message(STATUS "${CMAKE_GENERATOR}
${CMAKE_MAKE_PROGRAM}
${gen_ver}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment