Relative Content

Tag Archive for c++cmake

CMake ExternalProject cache

I’m including SQLite3 with ExternalProject. I’m using Ninja back-end. My problem is that every time I do a clean, SQLite3 has to be rebuilt and it unnecessarily slows down builds. The library has only to be built once for all build types, unless it’s updated to a new version.

CMakeList.txt,,,,target “cpr::cpr” not found

I finished installing influxdb on my Raspberry Pi and now I want to communicate with influxdb via C++, so I did git clone https://github.com/offa/influxdb-cxx
but I keep getting an error that it can’t find the cpr::cpr target.

Can I create a cmake “pseudo target” that will do compile/link options for me?

In my project, I have a mix of dependencies, some with cmake files that I can nicely use target_link_libraries() (e.g. boost_program_options) with, but some don’t (e.g. openssl; I have to compile a custom version for compatibility reasons) and I have to use ExternalProject_Add and for them, and then I need to use a mixture of target_link_libraries(), target_compile_options() and target_link_options(), e.g.:

How can I compile my program to a windows executable

I have a C++ program that uses protobuf and asio, which compiles fine under Linux using g++. I am wondering how I could go about making a new preset which allows me to compile this program into a windows executable.

How can I compile my program to a windows executable

I have a C++ program that uses protobuf and asio, which compiles fine under Linux using g++. I am wondering how I could go about making a new preset which allows me to compile this program into a windows executable.