I'm looking for a way to work on multiple projects in parallel in CLion IDE.
For now I can only work on each project in a window at a time, but I'm looking for a solution similar to Eclipse IDE (see below) - being able to see my different projects' directories on a side bar and choosing the one I want, compiling it by itself, etc.
Is there a way to do it?
In CLion, you can open several projects simultaneously in different windows. By default, each time you open a project while another one is opened, CLion prompts you to choose whether to open the project in the same window or in a new window.
Project settings are stored in the project directory as a set of XML files under the . idea folder. This folder contains both user-specific settings that shouldn't be placed under version control and project settings that are normally shared among developers working in a team, for example, the code style configuration.
Open the project you want to share. From the main menu, choose Git | GitHub | Share Project on GitHub. If you have already registered your GitHub account in CLion, connection will be established using these credentials. If you have not registered your account in CLion, the Login to GitHub dialog opens.
Yes: CLion doesn't allow you to open multiple projects from the menu because it uses the CMake system, which is script based.
However, CMake is quite capable of encompassing multiple projects, and CLion will correctly parse your CMake file and show all relevant directories in the project explorer.
To do this, just like in Visual Studio, you need a parent "solution" and one or more child "projects".
Here is a simple CMake example in which "my_solution" references two child projects, "my_application" and "my_library". Here, my three folders are arranged:
xxx/my_solution/CMakeLists.txt
xxx/my_application/CMakeLists.txt
xxx/my_library/CMakeLists.txt
And xxx/my_solution/CMakeLists.txt
simply reads:
cmake_minimum_required(VERSION 3.7)
project(my_solution)
add_subdirectory("${PROJECT_SOURCE_DIR}/../my_library" "${PROJECT_SOURCE_DIR}/my_library_output")
add_subdirectory("${PROJECT_SOURCE_DIR}/../my_application" "${PROJECT_SOURCE_DIR}/my_application_output")
Note that it is also permitted to put my_application
and my_library
within the my_solution
directory, as in Visual Studio.
No. CLion either:
as you can see in the documentation. I think this is wanted in their design; probably to maintain CLion fast and reactive...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With