Driveworks, CMake & CLion IDE

Hello,

In the latest Driveworks version (0.6.x), the samples have been refactored a lot.
To understand the code and update our own code to handle the numerous API changes and improvements, we would like to load Driveworks sample in CLion (C/C++ IDE).

CLion IDE is handling CMake based projects and we are able to import many projects base on CMake as soon as they come with their CMakeList.txt file.
Unfortunately, we are not able to load Driveworks sample in this great IDE.

By any chance, did someone managed to load Driveworks samples in this IDE?

Best regards,
Xavier

When using CLion it’s important to provide the relevant toolchain information for each configuration. The CMakeLists.txt for the driveworks samples is both weirdly generic and weirdly specific so it’s better to just setup your own version with a lot of information hardcoded for your system.

In our case, we have a Debug and Release configurations, and have two toolchains: clang6_amd64 and gcc7_aarch64. The toolchains are kept separate from the system and have corresponding cmake toolchain files for the project. In the configuration settings I tell CLion to use -DCMAKE_TOOLCHAIN_FILE=/foo.toolchain.cmake and it seems to work well.