AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

CMAKE_SOURCE_DIR --> CMAKE_CURRENT_SOURCE_DIR ?

Open RonRahaman opened this issue 4 years ago • 1 comments

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.

RonRahaman avatar May 24 '21 17:05 RonRahaman

Are you planning to consider this?

stgeke avatar Apr 25 '22 05:04 stgeke

Is there any reason why this issue was never addressed?

stgeke avatar Nov 24 '22 16:11 stgeke

Thanks for pinging, definitely happy to make this change.

mattmartineau avatar Nov 24 '22 17:11 mattmartineau