CLION is a great IDE for working with C++. It lets you debug your project and is compatible with CMAKE.

At this stage, only macOS (intel) is supported for working with chronotext-cross, but in theory it could work on Linux as well with a few adjustments.

As a prerequisite for macOS: you must have Xcode and the command line tools installed.

How to import a project into CLION

Open the File/Import project… menu and choose path/to/chronotext-cross/tests/TestingLighting.

Open the CLION/Preferences… menu and fill as follows:

CMake options: -DRUN=EXE -DCLION=ON -DPLATFORM=osx -DCMAKE_CXX_FLAGS="-std=c++14" Environment: CROSS_PATH=path/to/chronotext-cross

At the top right of the window, open the Edit Configurations… window:

And configure it as follows:

How to duplicate a CLION project

  1. Duplicate the path/to/chronotext-cross/test/TestingLighting folder.

  2. Rename the folder to TestingLighting2.

  3. Inside the folder, remove the .idea, cmake-build-debug and build folders.

  4. Inside CMakeLists.txt and CTestConfig.cmake replace the occurences of TestingLighting by TestingLighting2.

Building the chronotext-cross library in debug mode

In order to debug a project with CLION, we need a library built in debug mode:

cd path/to/chronotext-cross
source setup.sh
cd $CROSS_PATH/core/src
./build.osx.debug.sh