Is it possible to build a simple project without CMake? Follow
I'm just dipping into a bit of C++ without wanting to have to learn a build system. I'm following a course which uses eclipse which I have never got along with and I know PHPStorm well.
Is there a way to build a project in CLion which only has a few files without CMake ? e.g. a simple Windows command line executable?
The course also uses the MinGW compiler in case that is relevant.
Please sign in to leave a comment.
I find that I also would like to use CLion without CMake. Everything I am reading uses gnu make and I cannot figure out how to translate those examples into CMake (which I think I ought to be able to do without too much guessing frankly) . I don't find it a very guessable API and neither is it documented except for people who already understand it of course and the ideas behind make generally.
I have literally exhausted DDG hits for CMake documentation and, as people are saying online, it's very poor- even the books on it are very bad.
I am just looking for something simpler. If CMake is going to stand in my way of using CLion it may mean I have to look for another IDE because really, whatever it's virtues, it's just too poorly documented.
People are telling me that gnu make is easy to understand and well documented, even if it's expansive, so I would prefer to learn and use that.
My 2 cents.
I use a batch file that runs cl with command-line flags to build my program.
no, that is not possible for now. CLion project model is based on CMake. When you create a new project in CLIon, the IDE generates CMakeLists.txt for it automatically. If you try import some non-CMake project to CLion, the IDE generates CMakeLists.txt file for it too.
Any updates on this? I also want to use IDE code features, but I'm not interested to waste time on messing with crappy build systems. I use one .bat file to build on Windows.
I wish CLion could:
1. Run .bat to build binaries (.bat contains set of cl.exe commands)
2. Go to build dir
3. Run .exe, use .pdb files in same folder for debug
Is there any plan to support this?
Any update on this? The only way CLion would be usable for me is without requiring CMake as I don't plan on pulling that dependency into my project.
@_brian on what build system is your project based?
C++ is the language which parsing/resolve requires some extra knowledge like compilation flags, header search paths, etc. This information is stored in the project model and has to be extracted from there. So the build system integration is basically essential for truly smart code features. For now, CMake, Makefiles, Compilation Database and Gradle are supported - https://www.jetbrains.com/help/clion/project-models.html.
If you are working with a project which is not based on CMake, Gradle, or Makefiles, you can try generating a compilation database for it (https://www.jetbrains.com/help/clion/compilation-database.html#compdb_generate) and open it in CLion. A compilation database lets CLion detect project files and extract all the necessary compiler information, such as include paths and compilation flags.