Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #42 from ROCmSoftwarePlatform/reduce-symbols
Browse files Browse the repository at this point in the history
Hide symbols
  • Loading branch information
Daniel Lowell authored Jul 18, 2019
2 parents 9547fb9 + c0014b1 commit 6275a87
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
26 changes: 25 additions & 1 deletion miopengemm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/dev_include>)
target_include_directories (miopengemm SYSTEM PUBLIC
Expand All @@ -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
Expand Down

0 comments on commit 6275a87

Please sign in to comment.