Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using biicode and clion?

Is there an easy way to use clion (e.g. debugging) in a c++ project using biicode as construction tool?

In fact, both systems work with cmake, but biicode generates CMakeLists.txt that clion doesn't seem to understand (the one located in blocks/ nor the temporary one in cmake/).

Right now I could only work by using biicode self-generated CMakeLists.txt for regular builds, and a hand-crafted CMakeLists.txt to compile within clion. However duplicating the description of the construction does not sound like a good idea.

I guess some elaborated dark scripting could be done (I am pretty new to cmake), but I'm just playing around and I don't think it is worthwhile to do it or ask for it.

Has anyone tried to use clion and biicode? Is clion fully supporting cmake yet? Is biicode using internal code that fully cmake-compliant tools won't understand? Am I missing some silly idea?

like image 657
jmmut Avatar asked Feb 05 '15 19:02

jmmut


People also ask

What is CLion?

CLion: A cross-platform IDE for C and C++. Knowing your code through and through, CLion can take care of the routine while you focus on the important things.

How does CLion build my project for the selected architecture?

To build your project for the selected architecture, CLion will call the script to configure the environment with the specified parameters. If the version of your compiler toolset is earlier than the version of your Visual Studio installation, pass it in the Version field via the vcvars_ver flag, for example, -vcvars_ver=14.16.

Why should I use CLion to check my code?

Knowing your code through and through, CLion can take care of the routine while you focus on the important things.

What C/C++ compiler does CLion use?

For C/C++ projects, CLion uses GCC/G++, Clang, or MSVC toolset. On Windows, it means that you can select between the MinGW / MinGW-w64 or Cygwin environment, WSL, or Visual Studio if you plan to use Microsoft Visual C++ compiler. For details, refer to Tutorial: Configure CLion on Windows. On macOS, the required tools might be already installed.


2 Answers

Currently it is not possible. Unfortunately both biicode and CLion use cmake and use different conventions about the project layout/structure, and at the moment they are simply incompatible.

The good news are that the people at CLion are helping a lot to figure out the best solution so hopefully this will be fixed soon.

EDIT 19-Feb-2015: Now biicode 2.4.1 and last CLion EAP are compatible. You can open an existing biicode project in CLion using these steps:

  1. CLion->Open project, navigate to your biicode project/cmake/ folder and open it (where the CMakeLists.txt lives)
  2. CLion->Change project root, select your main biicode project folder.

Then you should be able to build and run your targets.

It can be convenient to check in Settings->Build, Execution, Deployment->CMake, "Automatically reload CMake on editing".

And remember, if you change your project, add or remove files, main executables, add or remove dependencies, to run $ bii cpp:configure so the whole project is updated

like image 184
drodri Avatar answered Oct 16 '22 13:10

drodri


Now biicode and CLion work fully with each other. Here's a guide from biicode docs to use CLion.

like image 23
amalulla Avatar answered Oct 16 '22 12:10

amalulla