Skip to content

Commit 234ca9f

Browse files
author
Kent Knox
committed
Merge branch 'develop' of https://github.com/clMathLibraries/clFFT into develop
2 parents 0db6e07 + aa92ed9 commit 234ca9f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ option( BUILD_RUNTIME "Build the FFT runtime library" ON )
7070
option( BUILD_CLIENT "Build a command line clFFT client program with a variety of configurable parameters (dependency on Boost)" ON )
7171
option( BUILD_TEST "Build the library testing suite (dependency on google test, Boost, and FFTW)" ON )
7272
option( BUILD_LOADLIBRARIES "Build the optional dynamic load libraries that the FFT runtime will search for" ON )
73+
option( BUILD_SHARED_LIBRARY "Build shared libraries." ON)
7374

7475
# If BOOST_ROOT is defined as an environment value, use that value and cache it so it's visible in the cmake-gui.
7576
# Otherwise, create a sensible default that the user can change

src/library/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ add_definitions( "/DCLFFT_EXPORTS" )
7474
# Include standard OpenCL headers
7575
include_directories( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include ../include )
7676

77-
add_library( clFFT SHARED ${clFFT.Files} )
77+
if(BUILD_SHARED_LIBRARY)
78+
add_library( clFFT SHARED ${clFFT.Files} )
79+
else()
80+
add_library( clFFT STATIC ${clFFT.Files} )
81+
endif()
7882
target_link_libraries( clFFT ${OPENCL_LIBRARIES} )
7983

8084
set_target_properties( clFFT PROPERTIES VERSION ${CLFFT_VERSION} )

src/statTimer/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ add_definitions( "/DSTATTIMER_EXPORTS" )
6363
# Include standard OpenCL headers
6464
include_directories( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include ../include )
6565

66-
add_library( StatTimer SHARED ${StatTimer.Files} )
66+
if(BUILD_SHARED_LIBRARY)
67+
add_library( StatTimer SHARED ${StatTimer.Files} )
68+
else()
69+
add_library( StatTimer STATIC ${StatTimer.Files} )
70+
endif()
6771
set_target_properties( StatTimer PROPERTIES VERSION ${CLFFT_VERSION} )
6872
set_target_properties( StatTimer PROPERTIES SOVERSION ${CLFFT_SOVERSION} )
6973
set_target_properties( StatTimer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )

0 commit comments

Comments
 (0)