Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: add option for building shared libraries #2361

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ set(MIOPEN_ENABLE_AI_KERNEL_TUNING On CACHE BOOL "Enable AI heuristic for kernel
set(MIOPEN_ENABLE_SQLITE On CACHE BOOL "")
# Use SQLITE for compiled kernels, when turned off this will use raw files
set(MIOPEN_ENABLE_SQLITE_KERN_CACHE On CACHE BOOL "")

# By default build shared libraries
option(BUILD_SHARED_LIBS "Create shared libraries" ON)

if(MIOPEN_ENABLE_SQLITE)
# MIOpen now depends on SQLite as well
find_package(PkgConfig)
Expand Down Expand Up @@ -147,11 +151,10 @@ option(MIOPEN_DISABLE_USERDB "Disable user database access" ${MIOPEN_EMBED_BUILD

# MIOPEN_USE_HIP_KERNELS is a Workaround for COMgr issues
if(MIOPEN_EMBED_BUILD)
option(BUILD_SHARED_LIBS "Build as a shared library" Off)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build as a shared library" FORCE)
option(MIOPEN_USE_HIP_KERNELS "Use HIP kernels." Off)
option(MIOPEN_BUILD_DRIVER "Build MIOpenDriver" Off)
else()
option(BUILD_SHARED_LIBS "Build as a shared library" ON)
option(MIOPEN_USE_HIP_KERNELS "Use HIP kernels." On)
option(MIOPEN_BUILD_DRIVER "Build MIOpenDriver" On)
endif()
Expand Down