c++cmakeclionbiicode

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?


Solution

  • 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