Add COMGR_DYN_DLL to device/rocm/CMakeLists.txt

Now rocm/rocdevice.cpp also includes comgrctx.hpp, and we don't want to statically link against comgr when buidling shared libs.

Change-Id: Ic330bd860559b3e07b776c951afe6126b0f43f7d
This commit is contained in:
Jason Tang
2020-10-08 11:02:06 -04:00
parent a00981128a
commit b38317cb3c
+5 -3
Vedi File
@@ -40,9 +40,11 @@ if (BUILD_HMM)
endif()
if(USE_COMGR_LIBRARY)
target_compile_definitions(oclrocm
PRIVATE USE_COMGR_LIBRARY)
if(${BUILD_SHARED_LIBS})
target_compile_definitions(oclrocm PRIVATE USE_COMGR_LIBRARY COMGR_DYN_DLL)
else()
target_compile_definitions(oclrocm PRIVATE USE_COMGR_LIBRARY)
endif()
endif()
set_target_properties(oclrocm PROPERTIES POSITION_INDEPENDENT_CODE ON)