boostorg / yap

A C++14-and-later expression template library
https://boostorg.github.io/yap
Boost Software License 1.0
108 stars 28 forks source link

Dependent compilation of tests, examples ... etc #100

Closed greole closed 4 years ago

greole commented 4 years ago

Turn of build of optional yap parts (tests, examples, ...) see #99.

greole commented 4 years ago

Ok this took me a while to make it work. The tests, example and benchmark can be turned off setting

 -DYAP_BUILD_TEST=OFF
 -DYAP_BUILD_EXAMPLE=OFF
 -DYAP_BUILD_PERF=OFF

In the process I found several issues that I needed to resolve to make the build process more robust. This includes

In addition to the last point, CMake can also detect optional compile features using the write_compiler_detection_header function which could set-DBOOST_NO_CONSTEXPR_IF and clean up the main CMakeLists.txt a bit more. But I guess this should be a separate PR.

tzlaine commented 4 years ago

Ha! I just asked for a PR for this in the ticket you opened, and here it is already ready. LGTM.