Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cmake]

CMake is a cross-platform, open-source build system. It generates native makefiles and project files that can be used from the command line or integrated development environment of your choice.

0
votes
1answer
52 views

CMakeLists and Clang sanitization options for an ncurses program

I would like some feedback on a CMakeLists.txt file I created for compiling my project. I have pasted the CMakeLists as well as my source code below. One thing I would specifically appreciate feedback ...
3
votes
2answers
98 views

cmake for a toy programming language

I have very little experience with cmake, this is really the first time I used it for a project. In the past I used some ...
15
votes
0answers
1k views

CMake Project Template for a General Cross Platform C++14 Project

UPDATE: I am no longer updating this post with the contents of my actual project since they have changed significantly (Unit testing is now done with doctest, code coverage is included, etc.). This ...
6
votes
1answer
6k views

Basic CMake C++ project structure

I started working on a C++ project using Google Test framework for unit testing and header-only CImg library for internal operations. I want to use CMake build system to compile it. ...
2
votes
1answer
733 views

CMake Solution Setup

I am new to CMake and got currently a setup of my Visual Studio solution working via CMake. My goal now is to have a professional CMake setup. Here is my folder structure: ...
1
vote
0answers
82 views

FindQScintilla.cmake

I'm using QScintilla in my project. There's no good FindQScintilla.cmake out there, so I'm writing one myself. However, I don't really know what I'm doing. This ...
2
votes
1answer
114 views

GNU Makefile for google benchmark

I've decided to write a common Makefile for Google benchmark library. You could say I could have taken generated Makefile, but it's not appropriate solution (or maybe I'm wrong?). ...
2
votes
1answer
3k views

Translating a makefile to cmake

My makefile looks like this and I translated it to cmake: ...
2
votes
1answer
2k views

CMakeList to compile and link an executable using Boost

I'm beginner with CMake and C++ compilation but it's seems that unlike Java I need to be very explicit with my CMakeList.txt in order to link src with correct header and libraries in my project. Here ...
19
votes
1answer
269 views

From new Q to compiler in 30 seconds

Reviewing code doesn't necessarily require actually building it, but it's often helpful to do so in order to evaluate fully. I usually create a CMake project and ...
5
votes
1answer
51 views

Initializing static, machine-specific data in C using a compile-time generated header

I'm using some rather old C code (circa 1996, written in K&R style) to do robust geometric computations, available here, for a library I'm trying to write. In order to work properly, this code has ...
3
votes
1answer
138 views

Cmake module that improves upon CheckLibrariesExists

The following module AssertLibraryFunction improves upon CheckLibrariesExists in two respects: It honors the optional argument <...
15
votes
1answer
213 views

Khronos: Primary CMake file

So recently I made a large project of mine open source: Khronos. I will be dissecting parts of it so that I can have it reviewed more easily here and so that the project as a whole will be improved. ...
3
votes
1answer
2k views

CMake module to make executable as small as possible

I wrote this .cmake script when I needed to make smallest possible executables. It makes CMake prefer static libraries, and adds custom command to strip and UPX the end result. I used it only with ...
7
votes
1answer
540 views

CMake build system

I wasn't quite sure where to go with this, and this seemed to be the best place I could think of so I thought why not. I threw together a build system for C++ projects today using CMake and I wanted ...
10
votes
4answers
961 views

Knowledge is power

Resurrecting my C++ saga, I was given this project for my CS2 class: This problem considers several ways to compute \$ x^n \$ for some \$ n \ge 0 \$. Write an iterative function ...