[clfft] 44/64: fix static build with msvc
Jérôme Kieffer
kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
kieffer-guest pushed a commit to branch develop
in repository clfft.
commit d9e26a23f28df73ac60c74c673562a5eb211c044
Author: Gaëtan Lehmann <gaetan.lehmann at gmail.com>
Date: Wed Mar 25 09:19:53 2015 +0100
fix static build with msvc
fix #74
---
src/CMakeLists.txt | 3 +++
src/include/clFFT.h | 4 +++-
src/statTimer/statisticalTimer.extern.h | 4 +++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 93e8220..d339496 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -247,6 +247,9 @@ install( FILES
DESTINATION
"./include" )
+if( NOT BUILD_SHARED_LIBS )
+ add_definitions( -DBUILD_STATIC )
+endif()
# Recurse into subdirectory and start building files there
if( BUILD_RUNTIME AND IS_DIRECTORY "${PROJECT_SOURCE_DIR}/library" )
diff --git a/src/include/clFFT.h b/src/include/clFFT.h
index 583a76b..fb984ed 100644
--- a/src/include/clFFT.h
+++ b/src/include/clFFT.h
@@ -47,7 +47,9 @@
#define inline __inline
#endif
- #if defined( CLFFT_EXPORTS )
+ #if defined( BUILD_STATIC )
+ #define CLFFTAPI
+ #elif defined( CLFFT_EXPORTS )
#define CLFFTAPI __declspec( dllexport )
#else
#define CLFFTAPI __declspec( dllimport )
diff --git a/src/statTimer/statisticalTimer.extern.h b/src/statTimer/statisticalTimer.extern.h
index 1169baa..6e58b72 100644
--- a/src/statTimer/statisticalTimer.extern.h
+++ b/src/statTimer/statisticalTimer.extern.h
@@ -40,7 +40,9 @@
#define inline __inline
#endif
- #if defined( STATTIMER_EXPORTS )
+ #if defined( BUILD_STATIC )
+ #define STATTIMER_API
+ #elif defined( STATTIMER_EXPORTS )
#define STATTIMER_API __declspec( dllexport )
#else
#define STATTIMER_API __declspec( dllimport )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clfft.git
More information about the debian-science-commits
mailing list