Hello, I have looked around and seen a few issues discussing this, but have not seen any solutions.
It seems related to this: https://gitlab.kitware.com/cmake/cmake/issues/17450 <https://gitlab.kitware.com/cmake/cmake/issues/17450> In the sense that absolute paths are desired. 1. Previously, we were generating a file called `${CMAKE_CURRENT_BINARY_DIR}/nanogui_resources.h` and performing `include_directories(${CMAKE_CURRENT_BINARY_DIR})`. This **works correctly**. 2. The setup was changed to generate the file `${CMAKE_CURRENT_BINARY_DIR}/nanogui/resources.h`. That is, the introduction of a new folder `nanogui`. With the same `include_directories(${CMAKE_CURRENT_BINARY_DIR})`, there is now a failure being unable to find `<nanogui/resources.h>`. Strangely, building with `ninja || ninja` (just building again after first failure) will succeed. I was reading this discussion: https://public.kitware.com/pipermail/cmake-developers/2013-March/018398.html <https://public.kitware.com/pipermail/cmake-developers/2013-March/018398.html> and the underlying cause seems to be the that Ninja wants relative paths. Why is creating this sub-directory causing this issue? Is there a way to keep generating ${CMAKE_CURRENT_BINARY_DIR}/nanogui and be able to include it with Ninja? I tried forcing a add_definitions(-I${CMAKE_CURRENT_BINARY_DIR}) just for shiggles, but that resulted in the same scenario. So it seems like I need a way to force a verbatim include path “after” the Ninja generator makes things relative? Reverting to the old version is not ideal, since it creates installation problems (the reason the subdirectory nanogui was created). Thank you for any advice! -Stephen P.S. This is with CMake 3.11.1 and ninja 1.8.2 if it matters.
-- 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: https://cmake.org/mailman/listinfo/cmake