mpusz / mp-units

The quantities and units library for C++
https://mpusz.github.io/mp-units/
MIT License
997 stars 79 forks source link

[Feature Request] Allow passing of CMake flag to disable example build #519

Closed aentinger closed 7 months ago

aentinger commented 7 months ago

So far I've not been able to find one, or I've overlooked it :bow: .

aentinger commented 7 months ago

Note: This is a concern when installing mp-units system-wide via

git clone https://github.com/mpusz/mp-units && cd mp-units && \
mkdir build && cd build && \
cmake -DMP_UNITS_AS_SYSTEM_HEADERS=ON -DMP_UNITS_BUILD_LA=OFF .. && \
make -j8 && \
sudo make install

and especially painful if run on a not-powerful embedded target, i.e. here.

mpusz commented 7 months ago

Please see:

I hope it helps :-)

aentinger commented 7 months ago

Thank you, but yes/no. I don't really care about Conan at this point in time. I'll just have to maintain a patch for the required CMakeLists.txt files myself.

mpusz commented 7 months ago

Just use 'src' subdirectory.

aentinger commented 7 months ago

This is a working solution :+1: (It has its drawbacks, since I can't specify mp-units as a ROS dependency for ament_cmake which has further implications, but at least I can build w/o examples on my embedded target. Good enough for now.)