Issues with using Ninja build
I have been able to compile OpenMoonRay via Makefile
I am also trying to build it via Ninja
However, I am getting the following configuration error when running cmake with the Ninja generator
-- Configuring done (2.2s)
CMake Error:
Running
'/usr/bin/ninja' '-C' '/home/nyue/projects/OpenMoonRay/head/build' '-t' 'recompact'
failed with:
ninja: error: build.ninja:17682: multiple rules generate moonray/moonray/dso/camera/BakeCamera/BakeCamera.json [-w dupbuild=err]
Hi @nyue
I did also run into this one, I think it is the aliasing of the DSO plugins. Each DSO has a proxy version but their build alias are the same name for some targets, so I think there needs to be a _proxy suffix for the target name to make Ninja happy with it. Most do have the rename via set_target_properties but I think there's a few that clash still that Ninja has issues with. Regular makefiles don't seem to run into this issue though.
https://github.com/dreamworksanimation/cmake_modules/blob/main/cmake/MoonrayDso.cmake
I did start to address this but it hasn't been a focus yet as I think there are other things that need addressing for a successful Ninja build that I was running into after fixing this one.