Reputation: 103
I have a CMake project that is configured using a script instead of calling cmake directly. This scripts generates multiple build directories for various combinations of build type (release vs debug) and machine architecture (x86-64 vs aarch64). Is there a way to get CLion to call this script when loading the project and point it to the one of the directories with resulting build files? Or just point it to the resulting build files after manually running the script if that is easier? Whatever it takes to get the code navigation tools to work really.
Upvotes: 0
Views: 184
Reputation: 2769
From the question:
I have a CMake project that is configured using a script instead of calling cmake directly.
If those scripts call CMake by passing it parameters then your best bet is to dig into them, figure out how CMake is being invoked from that script, and replicate that by manually calling CMake.
Once you have everything sorted out and you're able to configure your project with CMake alone then just configure Clion to do what you did manually.
Once you get that ball rolling, you should invest some time cleaning up your project to remove that script, because that's a huge code smell. Instead, leverage something like putting together a CMakePresets.json
file for your project that does all the configurations for you.
Upvotes: 0