Reload cmake project run 4 cmake process

Hello.

I try use CLion for write code in our project. Unfortunately our code use makefiles but I've wrote python script for generating CMakeList files.
In result I have about 1000 cmake files with execute or library and about 100 files with "add_subdirectory" only.

Then I try to open root cmake with CLion. It begin process CMakeList.txt files with cmake and run 4 process:

namezys         68578  68.7  0.9  2519584  75716 s010  R+   11:17PM   0:17.67 /Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE= -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY= -DCMAKE_LIBRARY_OUTPUT_DIRECTORY= -DCMAKE_RUNTIME_OUTPUT_DIRECTORY= -G CodeBlocks - Unix Makefiles /Users/namezys/developing/code namezys         68577  68.1  0.9  2518560  75584 s010  R+   11:17PM   0:17.59 /Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE= -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY= -DCMAKE_LIBRARY_OUTPUT_DIRECTORY= -DCMAKE_RUNTIME_OUTPUT_DIRECTORY= -G CodeBlocks - Unix Makefiles /Users/namezys/developing/code namezys         68576  65.6  0.9  2518560  75580 s010  R+   11:17PM   0:17.58 /Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE= -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY= -DCMAKE_LIBRARY_OUTPUT_DIRECTORY= -DCMAKE_RUNTIME_OUTPUT_DIRECTORY= -G CodeBlocks - Unix Makefiles /Users/namezys/developing/code namezys         68585  62.5  0.9  2510368  75656 s010  R+   11:17PM   0:17.48 /Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE= -DCMAKE_BUILD_TYPE=Release -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY= -DCMAKE_LIBRARY_OUTPUT_DIRECTORY= -DCMAKE_RUNTIME_OUTPUT_DIRECTORY= -G CodeBlocks - Unix Makefiles /Users/namezys/developing/code


I think it is not necessary for me. Can I run cmake only with build type Debug?

7 comments
Comment actions Permalink

CLion processes all build types defined in the project, if you don't need Debug/Release/MinRelease/etc,
you can specify your own list:

set(CMAKE_CONFIGURATION_TYPES "ConfigA;ConfigB" CACHE STRING "" FORCE)
project(ProjectName)

...
0
Comment actions Permalink

Oh! This is so great!

Maybe you also have some hidden option to create cmake cache in custom directory?
Now this directory is ~/.clion10/system/cmake/generated/c465f30/c465f30/RelWithDebInfo

0
Comment actions Permalink

It'll be great if you publish all this hidden options.

0
Comment actions Permalink

Could you please explain what is this needed for?

0
Comment actions Permalink

Thanks for the idea, Nikolai, we'll document them in the web help (work is in progress)

0
Comment actions Permalink

It is needed to run 'make' command manually.

Here are current use cases we use in our projects:
* make test - run all unit tests
* make package - create bunch of .rpm packages, which will be then deployed to target server

Yesm we do run this tasks from Jenkins, but sometimes developer needs to run dev version.

0
Comment actions Permalink

oh, and this ticket is already registered: https://youtrack.jetbrains.com/issue/CPP-3066

0

Please sign in to leave a comment.