CLion doesn't execute Custom Build Targets
Hi All!
I am working on a large project and try to figure out if CLion is a possible solution for it.
In this project we are using CMake, but as the whole setup before executing cmake is a little bit complex, the execution of cmake is wrapped by a custom script. So instead of CLion executes CMake by itself, CLion should execute the mentioned script.
It seems that the Custom Build Targets Feature (File->Settings->Build, Execution, Deployment-> Custom Build Targets) is perfectly suitable for such things. There I defined a script for building and cleaning the project. However I can't modify my project in a way that the external scripts are executed. CLion always wants to execute CMake itself.
To verify that I understand this feature correctly, I
- created a simple HelloWorld, without any buildfile (so no CMakeLists.txt, Makfefile, whatever),
- opened the folder in CLion,
- added custom build targets again, one for building (g++ hellloworld.cpp -o helloworld) and one for removing the file again (rm helloworld). See screenshot for details.

However, still I can't execute the build via Build -> Build Project as it's greyed out. So it seems I totally misunderstand the whole feature.
Can anyone please explain?
Cheers
Timo
请先登录再写评论。