configure CMake project for easy building on other platforms without CLion

Answered

I am fairly new at C/C++, CLion and CMake.  Having worked a lot with text editors and makefiles over the last year of building some projects I am quite pleased with the streamlined workflow inside of CLion.

However, I am trying to look for a little guidance on how to configure the project best for developing / building and testing on my local computer, but then being able to build it easily on a remote linux HPC cluster.

The idea here is that I don't have CLion running on the HPC cluster, but will have CMake and Make.  However, when I build within CLion, the CMake commands that build the project is a little difficult for me to follow, and I am looking for how best to make this project be developed in CLion, but transparent to build and run without CLion, but I don't know what I don't know.

Is there a tutorial on this somewhere?  Is there a function that can export a build script that sets all required variables and runs the right commands? Am I just making this more complicated than it has to be?

I know this is a bit open ended, but thanks very much for any comments.

0
2 comments
Avatar
Permanently deleted user

Hi there, don't know if this helps but can't hurt to share it https://www.youtube.com/watch?v=g1zPcja3zAU&t=. it discusses remote development in various configurations.

0

Hello!

CLion supports remote development. It means you can work on a macOS, Linux, or Windows desktop targeting a remote Linux machine connected via SSH. The CLion instance runs locally, and your source files are also placed on the local client, with automatic synchronization to the remote host. On the remote host side, CLion performs compilation and build using host compilers and CMake, uses host GDB for debug, and runs the application on the remote target. More details: https://www.jetbrains.com/help/clion/remote-projects-support.html.

Please note that for now remote development is supported only for CMake projects. 

0

Please sign in to leave a comment.