Setting /MT or /MD is pretty important, and is a transitive requirement. See: https://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.80).aspx
The standard mechanism of using target_compile_options isn't quite appropriate because it will simply append the flags used by each library and use the last one with no complaint if there is a mismatch. Example: A uses /MT, B uses /MD, C Depends on both. This will result in errors when compiling, but will configure just fine. I would like to make it so that if there is a mismatch between linked targets, cmake will either fail or issue a warning. https://cmake.org/cmake/help/v3.5/manual/cmake-buildsystem.7.html#compatible-interface-properties This seems to be meant to be used for exactly this type of thing, but because there is no specific property for specifying MSVC_RUNTIME, that system cannot be used in this case. Any thoughts on how to address this?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake