Skip to content

Commit d43fd10

Browse files
committed
let the user build the libraries statically
this is controlled with the standard BUILD_SHARED_LIBS that changes the behavior of add_library() when no type explicitly is used.
1 parent fc692eb commit d43fd10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option( BUILD_PERFORMANCE "Copy the performance scripts that can measure and gra
2323
option( BUILD_SAMPLE "Build the sample programs" OFF )
2424
option( BUILD_CLIENT "Build a command line clBLAS client program with a variety of configurable parameters (dependency on Boost)" OFF )
2525
option( BUILD_KTEST "A command line tool for testing single clBLAS kernel" ON )
26+
option( BUILD_SHARED_LIBS "Build shared libraries" ON )
2627

2728
# By default test-correctness is linked and tested against ACML library.
2829
# However, test-correctness can instead use NETLIB as a reference library

src/library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ if( CMAKE_COMPILER_IS_GNUCC )
307307
DESTINATION lib${SUFFIX_LIB}/pkgconfig )
308308
endif( )
309309

310-
add_library(clBLAS SHARED ${CLBLAS_SOURCES} ${GLOBAL_HEADERS} ${SRC_BLAS_HEADERS} ${SRC_BLAS_GENS_HEADERS})
310+
add_library(clBLAS ${CLBLAS_SOURCES} ${GLOBAL_HEADERS} ${SRC_BLAS_HEADERS} ${SRC_BLAS_GENS_HEADERS})
311311
add_dependencies(clBLAS GENERATE_CLT)
312312
set_target_properties(clBLAS PROPERTIES VERSION ${clBLAS_VERSION})
313313
set_target_properties(clBLAS PROPERTIES SOVERSION ${clBLAS_SOVERSION})

0 commit comments

Comments
 (0)