diff --git a/CMakeLists.txt b/CMakeLists.txt index 66181306..e7b524e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ include(ROCMSetupVersion) include(ROCMInstallSymlinks) include(ROCMCreatePackage) -rocm_setup_version(VERSION 1.1.5) +rocm_setup_version(VERSION 1.1.6) #Where to find FindOpenCL.cmake and other files which help locate external files and libraries list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) diff --git a/miopengemm/CMakeLists.txt b/miopengemm/CMakeLists.txt index b1cef17a..c6968715 100644 --- a/miopengemm/CMakeLists.txt +++ b/miopengemm/CMakeLists.txt @@ -14,7 +14,28 @@ file(GLOB_RECURSE source_files src/*.cpp) add_library(miopengemm ${source_files}) -target_link_libraries(miopengemm ${OPENCL_LIBRARIES} ${OpenBLAS_LIB} ${CLBLAST_LIB} ${ISAAC_LIB}) +target_link_libraries(miopengemm PUBLIC ${OPENCL_LIBRARIES} ${OpenBLAS_LIB} ${CLBLAST_LIB} ${ISAAC_LIB}) + +if(NOT WIN32 AND NOT APPLE) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lib.def " + + MIOPENGEMM_1 + { + global: + miopengemm*; + *MIOpenGEMM*; + extern \"C++\" { + MIOpenGEMM::*; + }; + local: + *; + }; + ") + + target_link_libraries(miopengemm PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/lib.def") + target_link_libraries(miopengemm PRIVATE "-Wl,--exclude-libs,ALL") + set_target_properties(miopengemm PROPERTIES VISIBILITY_INLINES_HIDDEN 1) +endif() target_include_directories (miopengemm PUBLIC $) target_include_directories (miopengemm SYSTEM PUBLIC @@ -29,6 +50,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") target_include_directories (miopengemm PUBLIC ${OPENCL_INCLUDE_DIRS}/Headers) endif() + + + rocm_install_targets( TARGETS miopengemm INCLUDE