Thread: CMake
View Single Post
Old 09-18-2017, 02:11 PM   #38
Human being with feelings
l0calh05t's Avatar
Join Date: Nov 2008
Location: Darmstadt, Germany
Posts: 673

Originally Posted by olilarkin View Post
Could you elaborate? Not sure I agree such a bad thing. There is a constant conflict where I want to try and minimise set up for beginners as well as making it flexible for people who know what they're doing . /mt /md matching amongst different libraries was a constant source of problems for me when I was starting out. It's also really annoying if you give someone a plug-in and they don't have the visual studio runtime for your vs version
Silently replacing the user's setting (in CMAKE_*_FLAGS_*) by something different will break other projects that want to build your library as a subproject. Even if used as a library, the user will be forced to use the same settings, or edit the CMakeLists.txt of your library. This is absolutely a bad thing.

At the same time, I do agree that having "sane" defaults for beginners/ease of use does make sense. The best way I have found so far, is to set the CMAKE_*_FLAGS_*_INIT variables in a CMAKE_USER_MAKE_RULES_OVERRIDE script. This allows the user to set the flags without them being overwritten, and won't break use as a subdirectory.

I just added this to my fork.
Raw data for raw nerves | 1.05946309...
My Blog | My free VST plugins | WDL-OL CMake fork
l0calh05t is offline   Reply With Quote