This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Multiple build configurations from CMake project.

Tags: None
(comma "," separated)
ibbles
Registered Member
Posts
3
Karma
0
How do I make multiple build configurations from a single CMakeLists.txt?

For example, I do OpenCL development and have both the Intel and the AMD SDKs installed. I pass -DOCL=AMD or -DOCL=Intel to cmake to chose whose headers and libraries to use. Now I want to create the following directory structure:

Code: Select all
work/
          repository/
                            CMakeLists.txt
                            source/
                                        bunch of hand-written stuff.
          build/
                    AMD/
                             bunch of generated stuff.
                    Intel/
                              bunch of generated stuff.


I can make the AMD part just fine, but it creates some files in the "repository" directory. In particular a repository.kdev4. When I want to create the Intel part the CMake project wizard in KDevelop stops with the following message:

There already exists a project configuration file at work/repository/repository.kdev4.
Do you want to override it or open the existing file?


The answer to the question is neither, I want to create a new project configuration.

I have given the projects different names in the wizard, and none is named "repository".

What should I do? I would like to be able to have both projects open at the same time in different instances of KDevelop.


edit: I can add that I create my projects by opening the CMakeLists.txt as a project and not by manually running cmake with -G"KDevelop3". I don't understand what to do with the files it generates.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]