What happens when
CMAKE_MODULE_PATH has more than one module with identical file names but different contents?
A naive google search for “CMAKE_MODULE_PATH duplicates” doesn’t show any helpful results… The documentation doesn’t help either.
I am trying to find the reason for inconsistent OpenGL include dirs in VTK with the Emscripten toolchain and noticed that the toolchain inserts
FindOpenGL.cmake to the module path here.
But at the same time VTK provides its own
VTK/CMake/patches/99/FindOpenGL.cmake. So does this mean VTK’s module overrides the one from Emscripten? It looks like it.
At first sight, this seems a valid behavior to me but is causing a lot of compiler errors as reported in VTK