• zexi yuan's avatar
    [Bugfix] three bugs related to using DGL as a subdirectory(third_party) of another project. (#3379) · 18863069
    zexi yuan authored
    * [Bugfix] fix a compile error for Debug-BuildType on Windows Platform
    
    When using CMakeLists.txt to build the "Debug" BuildType on the Windows Platform, it has three compile errors (C4716) in the file "dgl\src\runtime\shared_mem.cc":
    
    'dgl::runtime::SharedMemory::CreateNew': must return a value
    'dgl::runtime::SharedMemory::Open': must return a value
    'dgl::runtime::SharedMemory::Exist': must return a value
    
    * [Bugfix] cmake error "cannot find load file" when DGL as a sub_directory on Linux
    
    When using DGL as a subdirectory in a CMake Project, the "CMAKE_SOURCE_DIR" here will return the parent cmake scope dir, which is not a expected dir.
    Maybe it is better to use "CMAKE_CURRENT_SOURCE_DIR" to set "GKLIB_PATH".
    
    * [Bugfix] cmd cmake error when DGL as a subdirectory
    
    When DGL as a subdirectory of another project, the WORKING_DIRECTORY of "add_custom_command" will be incorrect at the line 255 of "CMakeLists.txt", such that making a cmake "setlocal" error.
    18863069
shared_mem.cc 3.28 KB