-
Notifications
You must be signed in to change notification settings - Fork 76
Building stlab libraries with CLion
Foster Brereton edited this page Jul 25, 2017
·
1 revision
This file assumes CLion is properly installed on your machine, and that you have stlab cloned to ~/git/github/stlab.
- In a Terminal, run the following to download and install the conan dependencies, and save
conanbuildinfo.cmaketo thebuilddirectory:(This set of steps is identical to the Xcode setup script, exceptcd ~/git/github/stlab # Your path may vary mkdir -p build cd build conan install .. --build=missing -s build_type=Debug cd ..
cmakeis not executed here - CLion will handle that for you.) - Open CLion, select "Open Project", and open
stlab's top-levelCMakeLists.txtfile: - Two things need to change to get
stlabto build, which will solve next:- The build directory is
cmake-build-debug, notbuild - The
stlab_testing=ONsetting needs to be added to the CMake invocation
- The build directory is
- Make sure you can see the CMake panel at the bottom of the IDE window. If you do not, you may have to select it from View → Tool Windows → CMake:
- In the CMake panel, click the gear icon and select "CMake Settings"
- In the ensuing Preferences Window, change:
- Add "-Dstlab_testing=ON" to the "CMake options" field
- Set the Generation Path to "build"
- You may have to close and reopen the
stlabproject in the IDE. You may also have to Reload the CMake project from within the CMake Panel: - Building and Running should now be available in the
Runmenu.
(You can safely delete the cmake-build-debug directory if it exists.