CMAKE_SOURCE_DIR --> CMAKE_CURRENT_SOURCE_DIR ?
Hi all, I'm using AMGX as a CMake subproject. My parent project uses add_subdirectory to include AMGX. However, I'm running into some issues because the references to CMAKE_SOURCE_DIR in AMGX's CMakeLists.txt now point to the parent project's directory, not the AMGX subproject's directory.
For example, my first error fatal error ("fatal error: rapidjson/document.h: No such file or directory") likely came from this. If so, I imagine I would get other errors related to CMAKE_SOURCE_DIR, too.
https://github.com/NVIDIA/AMGX/blob/77f91a94c05edbf58349bad447bbface7207c2b4/CMakeLists.txt#L142
I think this could be solved by using CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR throughout AMGX's CMakeLists.txt.
Are you planning to consider this?
Is there any reason why this issue was never addressed?
Thanks for pinging, definitely happy to make this change.