CMake calling another build system

Answered

I need to work on a codebase that uses another build system, in this case Fastbuild.

I would like to work on it using CLion, which means I need a CMakeLists.txt.  It easy enough to import all the files I want to work on.

How can I set it up to call an external script when I want to build an executable.

 

2 comments
Comment actions Permalink

I am looking for a good solution to this problem as well.
There is a add_custom_target() in CMake for this but CLion does not index source files listed for such target:
https://youtrack.jetbrains.com/issue/CPP-1028
For time being I am using CLion as IDE but running the build either externally from the terminal, or through a separate CMake target.

0
Comment actions Permalink

Hello!

As Igor has already mentioned, as a workaround, you can try creating a CMakeLists.txt file for CLion and add there the add_custom_target command to actually build the executable, as well as provide a fake add_executable/add_livrary for CLion's code analysis to work. 

For the proper solution, please follow the https://youtrack.jetbrains.com/issue/CPP-1607 ticket.

0

Please sign in to leave a comment.