Opening CMake Projects (CLion)
Overview
This guide explains how to open an existing CMake project in CLion.
Before You Start
Before you open an existing cmake project in CLion, ensure:
-
You have installed CLion
-
Clion has a suitable CMake executable available
Opening a CMake Project
1. Launch CLion, click 'Open'

click open
2. Select the root 'CMakeLists.txt' file

Navigate to where you have cloned your cmake project to, in my case /tmp/Comp270-As1-Ws1
, and select the
root CMakeLists.txt file.
Then, click OK
3. If prompted, open as Project

If prompted, click Open and Project
4. If prompted, trust the project

If prompted, click Trust Project
5. Set up build configurations

Modify the run/build setting if required. The default options should be fine, unless you need/want to make release builds or alter cmake variables.
When happy, click OK
6. Run the Project

You can now navigate, edit and run the code as normal.