On 21.08.2012 17:35, Johan Holmberg wrote:
Hi!I just tried to build my project with CMake + Ninja for the first time. I use Visual Studio 2008 on Windows. Everything went well except when the resource files were compiled (by "rc"). I have a number of "add_definitions()" commands in my CMakeLists, for example: add_definitions( /Za ) These flags (e.g. "/Za") are propagated to "rc", and it gives an error when using Ninja. But when I generate a Visual Studio project with CMake, flags known to "cl" but not to "rc" seem to be filtered out, so even the "rc" invocations work, and my project builds without errors. Is this what I should expect? Or should the Ninja generator also detect those options an filter them out? Perhaps I should move to using variables such as "CMAKE_CXX_FLAGS" instead, and the file property "COMPILE_FLAGS"? But until now I have felt that "add_defintions" was a convenient way to add non -D options too (and the documentation says "This command can be used to add any flags, but it was originally intended to add preprocessor definitions"). /Johan Holmberg
http://public.kitware.com/Bug/view.php?id=13486 This bug is fixed in the next release, our use stage/next. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
