[cmake-developers] Ninja RC cmcldeps regression

Nils Gladitz nilsgladitz at gmail.com
Fri Oct 10 08:43:02 EDT 2014


On 10/10/2014 01:10 PM, Nils Gladitz wrote:
> Ninja on windows invokes the resource compiler through cmcldeps.
>
> When passing ${CMAKE_BINARY_DIR} as an include directory CMake used to
> (3.0) add the absolute path to the command line; now "-I." is being
> added instead.
>
> The relative path does not seem to work in context of cmcldeps/rc since
> headers in ${CMAKE_BINARY_DIR} aren't found anymore.

This seems to have broken with "cmLocalGenerator: Simplify 
GetIncludeFlags output formatting" (b9aa5041):
   http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=b9aa5041

I used the following test case to reproduce the issue:

   cmake_minimum_required(VERSION 3.0)

   file(WRITE foo.cpp "int main() {}")
   file(WRITE foo.rc "#include <bar.rc>")
   file(WRITE ${CMAKE_BINARY_DIR}/bar.rc "")

   add_executable(foo foo.cpp foo.rc)

   target_include_directories(foo PRIVATE ${CMAKE_BINARY_DIR})


Nils



More information about the cmake-developers mailing list