[clfft] 51/64: define CLFFT_STATIC in clFFT.version.h

Jérôme Kieffer kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:37 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 61b15279e2482e083a168dcc60a86fa0cd88da28
Author: Gaëtan Lehmann <gaetan.lehmann at gmail.com>
Date:   Thu Mar 26 20:55:56 2015 +0100

    define CLFFT_STATIC in clFFT.version.h
---
 src/CMakeLists.txt                      | 7 +++----
 src/include/clFFT.h                     | 2 +-
 src/include/clFFT.version.h.in          | 2 ++
 src/statTimer/statisticalTimer.extern.h | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d92bbab..d74cdcb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -237,6 +237,9 @@ message( STATUS "CMAKE_CXX_COMPILER release flags: " ${CMAKE_CXX_FLAGS_RELEASE}
 message( STATUS "CMAKE_CXX_COMPILER relwithdebinfo flags: " ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} )
 message( STATUS "CMAKE_EXE_LINKER link flags: " ${CMAKE_EXE_LINKER_FLAGS} )
 
+if(NOT BUILD_SHARED_LIBS)
+  set(CLFFT_STATIC ON)
+endif()
 # configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
 configure_file( "${PROJECT_SOURCE_DIR}/include/clFFT.version.h.in" "${PROJECT_BINARY_DIR}/include/clFFT.version.h" )
 install( FILES
@@ -247,10 +250,6 @@ install( FILES
 		DESTINATION
 			"./include" )
 
-if( NOT BUILD_SHARED_LIBS )
-  add_definitions( -DCLFFT_BUILD_STATIC )
-endif()
-
 # Recurse into subdirectory and start building files there
 if( BUILD_RUNTIME AND IS_DIRECTORY "${PROJECT_SOURCE_DIR}/library" )
 	add_subdirectory( library )
diff --git a/src/include/clFFT.h b/src/include/clFFT.h
index ed1da70..95ded9f 100644
--- a/src/include/clFFT.h
+++ b/src/include/clFFT.h
@@ -47,7 +47,7 @@
 		#define inline __inline
 	#endif
 
-    #if defined( CLFFT_BUILD_STATIC )
+    #if defined( CLFFT_STATIC )
         #define CLFFTAPI
     #elif defined( CLFFT_EXPORTS )
         #define CLFFTAPI __declspec( dllexport )
diff --git a/src/include/clFFT.version.h.in b/src/include/clFFT.version.h.in
index 343cd7e..686f03e 100644
--- a/src/include/clFFT.version.h.in
+++ b/src/include/clFFT.version.h.in
@@ -20,3 +20,5 @@
 #define clfftVersionMajor @CLFFT_VERSION_MAJOR@
 #define clfftVersionMinor @CLFFT_VERSION_MINOR@
 #define clfftVersionPatch @CLFFT_VERSION_PATCH@
+
+#cmakedefine CLFFT_STATIC
diff --git a/src/statTimer/statisticalTimer.extern.h b/src/statTimer/statisticalTimer.extern.h
index f1db5b9..84999d6 100644
--- a/src/statTimer/statisticalTimer.extern.h
+++ b/src/statTimer/statisticalTimer.extern.h
@@ -40,7 +40,7 @@
 		#define inline __inline
 	#endif
 
-    #if defined( CLFFT_BUILD_STATIC )
+    #if defined( CLFFT_STATIC )
         #define STATTIMER_API
     #elif defined( STATTIMER_EXPORTS )
         #define STATTIMER_API __declspec( dllexport )

-- 
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