Skip to content

Commit

Permalink
[cmake] Support BUILD_SHARED_LIBS=On flags
Browse files Browse the repository at this point in the history
This patch fixes #774.
  • Loading branch information
vgvassilev committed Feb 17, 2024
1 parent 24ff43f commit 053d5a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@ jobs:
compiler: clang-16
clang-runtime: '17'

- name: ubu22-clang16-runtime17-shared-libs
os: ubuntu-22.04
compiler: clang-16
extra_cmake_options: '-DBUILD_SHARED_LIBS=On'
clang-runtime: '17'

- name: ubu22-clang16-runtime17-kokkos
os: ubuntu-22.04
compiler: clang-16
Expand Down
3 changes: 2 additions & 1 deletion lib/Differentiator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ set_property(SOURCE Version.cpp APPEND PROPERTY
COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC")

# (Ab)use llvm facilities for adding libraries.
add_llvm_library(cladDifferentiator
llvm_add_library(cladDifferentiator
STATIC
BaseForwardModeVisitor.cpp
CladUtils.cpp
ConstantFolder.cpp
Expand Down
3 changes: 2 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ set(CLAD_PLUGIN_SRC
DerivedFnInfo.cpp
RequiredSymbols.cpp
)
add_llvm_library(cladPlugin ${CLAD_PLUGIN_SRC} )

llvm_add_library(cladPlugin STATIC ${CLAD_PLUGIN_SRC})

if (NOT CLAD_BUILD_STATIC_ONLY)
add_llvm_loadable_module(clad ${CLAD_PLUGIN_SRC} PLUGIN_TOOL clang)
Expand Down

0 comments on commit 053d5a3

Please sign in to comment.