H-uru / libhsplasma

Cross-platform Plasma data and network library
GNU General Public License v3.0
32 stars 30 forks source link

Don't touch my `CMAKE_` settings! #241

Closed Hoikas closed 1 year ago

Hoikas commented 2 years ago

Many CMAKE_ variables are considered to be user-facing settings. It's OK to set default values for these inside the project, but we have been using them to set values required to compile HSPlasma. This is problematic if someone wants to, for example, use FetchContent to include HSPlasma as a first class citizen of their project (ie as a subproject). Specifically the old set(CMAKE_CXX_STANDARD 14) line would blow away any setting of the default C++ standard. This is not a good UX, so this pull requests removes all CMAKE_ forced settings into target properties as expected in "modern" CMake.

As bonuses, this corrects some unnecessary virality of our 3rd party dependencies and fixes an issue with string_theory not being pulled in by consumers.

Hoikas commented 1 year ago

I'm going to break this PR down into topics to facilitate review. This one is stale, anyhow.