[clfft] 22/64: fixing previous bad commits that clobbered files
Jérôme Kieffer
kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:33 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 c03a95bff4b08ef14d2fb6988bde702fc9771d1c
Author: bragadeesh <bragadeesh.natarajan at amd>
Date: Fri Feb 27 17:41:42 2015 -0600
fixing previous bad commits that clobbered files
---
.travis.yml | 10 +---------
doc/clFFT.doxy | 2 +-
src/CMakeLists.txt | 22 +++++++++-------------
src/client/CMakeLists.txt | 4 ++++
src/gtest.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++
src/include/sharedLibrary.h | 16 +++++++++++++---
src/library/mainpage.h | 4 +++-
7 files changed, 76 insertions(+), 27 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index afa939e..75a1a44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,18 +5,10 @@ compiler:
before_install:
- sudo apt-get update -qq
- - sudo apt-get install -qq fglrx opencl-headers libboost-program-options-dev libfftw3-dev libgtest-dev
+ - sudo apt-get install -qq fglrx opencl-headers libboost-program-options-dev libfftw3-dev
# Uncomment below to help verify the installs above work
# - ls -la /usr/lib/libboost*
# - ls -la /usr/include/boost
-# - ls -la /usr/src/gtest
-
-install:
- - mkdir -p bin/gTest
- - cd bin/gTest
- - cmake -DCMAKE_BUILD_TYPE=Release /usr/src/gtest
- - make
- - sudo mv libg* /usr/lib
before_script:
- cd ${TRAVIS_BUILD_DIR}
diff --git a/doc/clFFT.doxy b/doc/clFFT.doxy
index c53f27f..f771f04 100644
--- a/doc/clFFT.doxy
+++ b/doc/clFFT.doxy
@@ -52,7 +52,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = ../../bindoc
+OUTPUT_DIRECTORY = ../../bin/clFFT.doxy
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d46c193..93eb4a5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -115,8 +115,9 @@ set( SUFFIX_BIN_DEFAULT "" )
if( BUILD64 )
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE )
message( STATUS "64bit build - FIND_LIBRARY_USE_LIB64_PATHS TRUE" )
-
- set( SUFFIX_LIB_DEFAULT "64" )
+ if( NOT APPLE )
+ set( SUFFIX_LIB_DEFAULT "64" )
+ endif()
else( )
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE )
message( STATUS "32bit build - FIND_LIBRARY_USE_LIB64_PATHS FALSE" )
@@ -155,17 +156,7 @@ find_package( OpenCL )
# This will define FFTW_FOUND
find_package( FFTW )
-if( (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
- message( STATUS "Cmake version 2.8 or greater needed to use GTest" )
-else()
- # This will define GTEST_FOUND
- find_package( GTest )
-
- # Hack to get googletest v1.6 to work with vs2012
- if( MSVC11 )
- add_definitions( "/D_VARIADIC_MAX=10" )
- endif( )
-endif()
+include(gtest.cmake)
# Enable building of the clACML client if both requested and all dependencies are found
if( BUILD_CLIENT AND Boost_FOUND )
@@ -187,6 +178,11 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE )
# message( "C_COMPILER_NAME: " ${C_COMPILER_NAME} )
# message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
+if(APPLE)
+ # avoid warning on newer cmake versions
+ set(CMAKE_MACOSX_RPATH 0)
+endif()
+
# Set common compile and link options
if( MSVC )
# Following options for nMake
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 3b38b95..649d856 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -49,6 +49,10 @@ target_link_libraries( clFFT-client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES}
set_target_properties( clFFT-client PROPERTIES VERSION ${CLFFT_VERSION} )
set_target_properties( clFFT-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
+if( APPLE )
+ # properly deal with RPATH on mac
+ set_target_properties( clFFT-client PROPERTIES INSTALL_RPATH "@loader_path/../lib${SUFFIX_LIB}")
+endif()
# CPack configuration; include the executable into the package
install( TARGETS clFFT-client
diff --git a/src/gtest.cmake b/src/gtest.cmake
new file mode 100644
index 0000000..512183c
--- /dev/null
+++ b/src/gtest.cmake
@@ -0,0 +1,45 @@
+
+option(USE_SYSTEM_GTEST "Use system installed gtest when set to ON, or build gtest locally when set to OFF" OFF)
+
+if(USE_SYSTEM_GTEST)
+ if( (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
+ message( STATUS "Cmake version 2.8 or greater needed to use GTest" )
+ else()
+ # This will define GTEST_FOUND
+ find_package( GTest )
+ endif()
+else()
+# find_package(Threads REQUIRED)
+ include(ExternalProject)
+
+ ExternalProject_Add(
+ gtest-external
+ URL http://googletest.googlecode.com/files/gtest-1.7.0.zip
+ URL_MD5 2d6ec8ccdf5c46b05ba54a9fd1d130d7
+ INSTALL_COMMAND "")
+
+ ExternalProject_Get_Property(gtest-external binary_dir)
+ add_library(gtest IMPORTED STATIC GLOBAL)
+ set_target_properties(gtest PROPERTIES
+ IMPORTED_LOCATION ${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
+ # IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}
+ )
+ add_dependencies(gtest gtest-external)
+
+ add_library(gtest_main IMPORTED STATIC GLOBAL)
+ set_target_properties(gtest_main PROPERTIES
+ IMPORTED_LOCATION ${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
+ # IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}
+ )
+ add_dependencies(gtest_main gtest-external)
+
+ ExternalProject_Get_Property(gtest-external source_dir)
+ set(GTEST_INCLUDE_DIRS ${source_dir}/include)
+ set(GTEST_LIBRARIES gtest gtest_main)
+ set(GTEST_FOUND ON)
+endif()
+
+# Hack to get googletest v1.6 to work with vs2012
+if( MSVC11 )
+ add_definitions( "/D_VARIADIC_MAX=10" )
+endif( )
diff --git a/src/include/sharedLibrary.h b/src/include/sharedLibrary.h
index e5e65de..85a4210 100644
--- a/src/include/sharedLibrary.h
+++ b/src/include/sharedLibrary.h
@@ -29,21 +29,31 @@
#include <dlfcn.h>
#endif
-inline void* LoadSharedLibrary( std::string linuxPrefix, std::string libraryName, bool quiet )
+inline void* LoadSharedLibrary( std::string unixPrefix, std::string libraryName, bool quiet )
{
#if defined( _WIN32 )
libraryName += ".dll";
// HMODULE is actually the load address; function returns NULL if it cannot find the shared library
HMODULE fileHandle = ::LoadLibraryExA( libraryName.c_str( ), NULL, NULL );
-#else
- tstring linuxName = linuxPrefix;
+#elif defined(__linux__)
+ tstring linuxName = unixPrefix;
linuxName += libraryName += ".so";
void* fileHandle = ::dlopen( linuxName.c_str( ), RTLD_NOW );
if( !quiet && !fileHandle )
{
std::cerr << ::dlerror( ) << std::endl;
}
+#elif defined(__APPLE__)
+ tstring appleName = unixPrefix;
+ appleName += libraryName += ".dylib";
+ void* fileHandle = ::dlopen( appleName.c_str( ), RTLD_NOW );
+ if( !quiet && !fileHandle )
+ {
+ std::cerr << ::dlerror( ) << std::endl;
+ }
+#else
+ #error "unsupported platform""
#endif
return fileHandle;
diff --git a/src/library/mainpage.h b/src/library/mainpage.h
index 2f88474..1624d72 100644
--- a/src/library/mainpage.h
+++ b/src/library/mainpage.h
@@ -35,8 +35,10 @@ components as a pair contiguous in memory) formats.
@section InstallFFT Installation of clFFT library
@subsection DownBinaries Downloadable Binaries
+clFFT library pre-compiled packages for recent versions of Microsoft Windows operating systems
+and several flavors of Linux are available.
-The downloadable binary packages are available at
+The downloadable binary packages are freely available at
https://github.com/clMathLibraries/clFFT/releases
Once the appropriate package for the respective OS has finished downloading,
--
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