Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extending CMake with a custom generator?

Tags:

cmake

How would one add support for a new IDE/build system to CMake? Does it provide a mechanism to do this without modifying its code directly?

like image 821
Xtapolapocetl Avatar asked Nov 28 '11 20:11

Xtapolapocetl


People also ask

How do I specify CMake generator?

CMake Generators are platform-specific so each may be available only on certain platforms. The cmake(1) command-line tool --help output lists available generators on the current platform. Use its -G option to specify the generator for a new build tree.

How do I change the generator in my CMake GUI?

For those seeking the CMake GUI answer. Go to File->Delete Cache and then click Configure again. A scenario where changing the generator is needed is that you are keeping the CMake GUI open and reusing the same directory (source and CMakeList.

What are generator expressions in CMake?

Introduction. Generator expressions are evaluated during build system generation to produce information specific to each build configuration.

What is Cmake_make_program?

Tool that can launch the native build system. The value may be the full path to an executable or just the tool name if it is expected to be in the PATH .


1 Answers

You have to write additional C++ code and build CMake to add a new generator. There is no mechanism to add a new generator without writing new code.

What IDE/build system are you thinking of adding to CMake?

Ask on the CMake mailing list ( http://www.cmake.org/mailman/listinfo/cmake ) whether or not anybody else is already working on a generator for the system you're thinking of. I know some recent work has been done to add a Ninja generator... It is not yet in the official CMake release, though: still in progress as of today.

like image 101
DLRdave Avatar answered Sep 18 '22 08:09

DLRdave