How to open a .cmake file
Quick, free ways to open CMake on any system.
A .cmake file is a CMake Script File. If double-clicking does nothing, your computer simply does not have an app that reads CMake yet. Here is how to fix that on each operating system, using free software wherever possible.
Open a .cmake file step by step
- Confirm the file really is a .cmake. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
- On Windows, open it with VS Code (CMake Tools) or Visual Studio.
- On Mac, use VS Code (CMake Tools) or CLion.
- On Linux, try VS Code (CMake Tools) or CLion.
- Still stuck? Search for a dedicated CMake viewer.
Best apps to open .cmake files
Windows
- VS Code (CMake Tools)
- Visual Studio
- any text editor
macOS
- VS Code (CMake Tools)
- CLion
- any text editor
Linux
- VS Code (CMake Tools)
- CLion
- any text editor
Frequently asked questions
Why can't I open my .cmake file?
Almost always because no installed app understands CMake. Install one of the apps above, or convert the file to a format your existing software already reads.
What is the difference between CMakeLists.txt and a .cmake file?
CMakeLists.txt is the entry point CMake looks for in each directory; .cmake files are modules, toolchains and helpers that those lists include() or that CMake loads as Find modules.
Does CMake compile my code?
No. It generates the build system (Ninja, Makefiles, IDE projects) that then compiles the code, which is why it is called a build-system generator.