Is there a reliable way to add a C++ preprocessor definition on CMake's command line? If there is no cross-platform solution, is there at least a one on Windows?
Specifically, we would like to define the preprocessor symbols BOOST_ALL_NO_LIB
and BOOST_ALL_DYN_LINK
[1] without altering CMakeLists.txt
(because this is part of an automated build for third-party libraries that we don't want to touch).
[1] These preprocessor symbols, together with Boost_USE_STATIC_LIBS
CMake symbol, allow dynamic linking against Boost libraries on Windows.