Questions tagged [cmake]
Questions about CMake, an open-source cross-platform "meta-make" where you can describe your software project's build, test and deployment process in an abstract way using configuration files. From those configurations it can generate build environments for all sorts of compilers and IDEs on all major operating systems.
35
questions
2
votes
3
answers
172
views
How to decouple spagheti code for unit tests [duplicate]
A little background on the project: we as a company receive a spaghetti source code, and into that we add even more spaghetti code. So with that I want to say that
complete restructuring and ...
10
votes
4
answers
4k
views
Is there something between Debug and Release build?
Specifically with CMake builds, if you don't specify a build type explicitly, the build will use neither Debug nor Release compilation flags.
I was writing my own Makefile for a simple program and ...
1
vote
1
answer
141
views
App that can be deployed both as monolith and microservices?
We have a monolith C++ application and I consider doing some major refactorings. Since we're not completely ready to go full "microservices only" (maybe in about two years time), I want to ...
1
vote
1
answer
67
views
CMake Reusability and Package Management
My question is focused on CMake C++ projects and separating out code into multiple repositories for re-usability, and somewhat mimicking a naive package management system. For now I would like to ...
1
vote
0
answers
187
views
Are absolute paths in C++ libraries okay to have if they are *generated* at configuration time from non absolute paths?
I've recently created a library that needs a non-text (but platform agnostic) resource to be used. I basically tell CMake, if this is an install interface, it's in the "${...
-1
votes
1
answer
158
views
development environment for C++ GUI applications
I am currently developing some C++ GUI application using wxWidgets (although the GUI framework doesn't really matter here) and thus far have been developing this on my own, which was working well. ...
0
votes
1
answer
422
views
Global vs local CMake functions for compiler flags
In the online book "Introduction to Modern CMake", I found the following recommendation:
Do not use global functions: This includes link_directories, include_libraries, and similar.
Yet the ...
10
votes
2
answers
2k
views
Should Visual Studio specific files be excluded from version control?
I work on a number of code projects, some open source and some not. Many of these projects are intended to be cross-platform, most often running on either Linux (my natural habitat) or Windows and ...
2
votes
0
answers
245
views
How to "orchestrate" a multi-repository installation
Suppose I'm working on software to be installed on a Linux machine (not mine).
Say the software consists of applications the user might start independently; an application which will likely be started ...
-2
votes
1
answer
127
views
In C++, does it make sens to have library project be composed of other libraries?
I'm working on a C++ project which is currently divided into "sub modules" / "components". Each of these are compiled into a separate library (components are usually 10-20 files).
The libraries are ...
3
votes
0
answers
277
views
C++ dependency management across projects
We are developing a benchmarking framework in C++, with Make and CMake as build tools. The aim of the framework is to allow others who build algorithms to perform head-to-head comparison against prior ...
5
votes
1
answer
757
views
What is the right way to create a build system?
I'm a student, and I don't have much expirience with the building process.
In the last few days i've read something about CMake and others build system generators, but other than that I don't know ...
1
vote
1
answer
71
views
code for a try_run() invocation - where do I place it?
I'm working on a CMake module which, at some point, invokes try_run(). The file I'm compiling is not really part of the project's sources - it's not used anywhere. It's only ever useful for CMake, to ...
19
votes
6
answers
4k
views
Why should makefiles have an "install" target?
Coming from the world of C and C++, most build system have an install target, notably Makefiles (where it is recommended by GNU for example) or CMake. This target copies the runtime files (executables,...
1
vote
1
answer
899
views
Managing a third party library that is used by multiple independent libraries
I am working on configuring the build environment for a C++ project that uses multiple libraries. These libraries are independent of each other, but they all depend on the same 3rd party library (...