[clfft] 07/109: First attempt at changing install suffixes based upon cmake cache variables
Jérôme Kieffer
kieffer-guest at moszumanska.debian.org
Wed May 20 07:29:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
kieffer-guest pushed a commit to branch debian
in repository clfft.
commit b37940112f2b05a88d9df16437a88908e89a228d
Author: Kent Knox <kent.knox at amd>
Date: Sun Aug 25 23:54:14 2013 -0500
First attempt at changing install suffixes based upon cmake cache variables
---
src/CMakeLists.txt | 17 ++++++++++++++---
src/client/CMakeLists.txt | 25 ++++++-------------------
src/library/CMakeLists.txt | 21 ++++++---------------
src/scripts/perf/CMakeLists.txt | 8 +-------
src/statTimer/CMakeLists.txt | 21 ++++++---------------
src/tests/CMakeLists.txt | 18 ++++--------------
6 files changed, 37 insertions(+), 73 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 549590e..30e341d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -80,8 +80,9 @@ else()
endif()
if( MSVC_IDE )
- set( BUILD64 ${CMAKE_CL_64} )
set_property( GLOBAL PROPERTY USE_FOLDERS TRUE )
+
+ set( BUILD64 ${CMAKE_CL_64} )
else()
option( BUILD64 "Build a 64-bit product" ON )
@@ -93,15 +94,25 @@ else()
endif()
endif()
+# These variables are meant to contain string which should be appended to the installation paths
+# of library and executable binaries, respectively. They are meant to be user configurable/overridable.
+set( SUFFIX_LIB_DEFAULT "" )
+set( SUFFIX_BIN_DEFAULT "" )
+
# Modify the global find property to help us find libraries like Boost in the correct paths for 64-bit
# Essentially, find_library calls will look for /lib64 instead of /lib; works for windows and linux
if( BUILD64 )
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE )
message( STATUS "64bit build - FIND_LIBRARY_USE_LIB64_PATHS TRUE" )
-else()
+
+ set( SUFFIX_LIB_DEFAULT "64" )
+else( )
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE )
message( STATUS "32bit build - FIND_LIBRARY_USE_LIB64_PATHS FALSE" )
-endif()
+endif( )
+
+set( SUFFIX_LIB ${SUFFIX_LIB_DEFAULT} CACHE STRING "String to append to 'lib' install path" )
+set( SUFFIX_BIN ${SUFFIX_BIN_DEFAULT} CACHE STRING "String to append to 'bin' install path" )
# Client is built only if boost is found; on windows, we need vs10 or higher
# Find Boost on the system, and configure the type of boost build we want
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index d9609cc..99a89d3 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -48,22 +48,9 @@ target_link_libraries( Client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES} ${DL_
set_target_properties( Client PROPERTIES VERSION ${CLFFT_VERSION} )
set_target_properties( Client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
-if( BUILD64 )
- # CPack configuration; include the executable into the package
- install( TARGETS Client
- RUNTIME DESTINATION bin64
- LIBRARY DESTINATION lib64
- ARCHIVE DESTINATION lib64/import
- )
-
-else()
- # CPack configuration; include the executable into the package
- install( TARGETS Client
- RUNTIME DESTINATION bin32
- LIBRARY DESTINATION lib32
- ARCHIVE DESTINATION lib32/import
- )
-endif()
-
-# configure_file( "${PROJECT_SOURCE_DIR}/client/CMakeLists.pack"
- # "${PROJECT_BINARY_DIR}/samples/CMakeLists.txt" COPYONLY )
+# CPack configuration; include the executable into the package
+install( TARGETS Client
+ RUNTIME DESTINATION bin${SUFFIX_BIN}
+ LIBRARY DESTINATION lib${SUFFIX_LIB}
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+ )
diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt
index ea7637b..2bd83c6 100644
--- a/src/library/CMakeLists.txt
+++ b/src/library/CMakeLists.txt
@@ -85,18 +85,9 @@ if( UNIX )
# set_target_properties( clFFT PROPERTIES COMPILE_FLAGS "-frtti" )
endif( )
-if( BUILD64 )
- # CPack configuration; include the executable into the package
- install( TARGETS clFFT
- RUNTIME DESTINATION bin64
- LIBRARY DESTINATION lib64
- ARCHIVE DESTINATION lib64/import
- )
-else()
- # CPack configuration; include the executable into the package
- install( TARGETS clFFT
- RUNTIME DESTINATION bin32
- LIBRARY DESTINATION lib32
- ARCHIVE DESTINATION lib32/import
- )
-endif()
+# CPack configuration; include the executable into the package
+install( TARGETS clFFT
+ RUNTIME DESTINATION bin${SUFFIX_BIN}
+ LIBRARY DESTINATION lib${SUFFIX_LIB}
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+ )
diff --git a/src/scripts/perf/CMakeLists.txt b/src/scripts/perf/CMakeLists.txt
index 95add5a..3733789 100644
--- a/src/scripts/perf/CMakeLists.txt
+++ b/src/scripts/perf/CMakeLists.txt
@@ -21,10 +21,4 @@ set(GRAPHING_SCRIPTS measurePerformance.py
performanceUtility.py
)
-if( BUILD64 )
- set( BIN_DIR bin64 )
-else()
- set( BIN_DIR bin32 )
-endif()
-
-install( FILES ${GRAPHING_SCRIPTS} DESTINATION ${BIN_DIR} )
\ No newline at end of file
+install( FILES ${GRAPHING_SCRIPTS} DESTINATION bin${SUFFIX_BIN} )
\ No newline at end of file
diff --git a/src/statTimer/CMakeLists.txt b/src/statTimer/CMakeLists.txt
index 0b5d75f..c2d55bb 100644
--- a/src/statTimer/CMakeLists.txt
+++ b/src/statTimer/CMakeLists.txt
@@ -73,18 +73,9 @@ if( UNIX )
target_link_libraries( StatTimer -lrt )
endif( )
-if( BUILD64 )
- # CPack configuration; include the executable into the package
- install( TARGETS StatTimer
- RUNTIME DESTINATION bin64
- LIBRARY DESTINATION lib64
- ARCHIVE DESTINATION lib64/import
- )
-else()
- # CPack configuration; include the executable into the package
- install( TARGETS StatTimer
- RUNTIME DESTINATION bin32
- LIBRARY DESTINATION lib32
- ARCHIVE DESTINATION lib32/import
- )
-endif()
+# CPack configuration; include the executable into the package
+install( TARGETS StatTimer
+ RUNTIME DESTINATION bin${SUFFIX_BIN}
+ LIBRARY DESTINATION lib${SUFFIX_LIB}
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+ )
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 87510ef..29e9bf8 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -49,16 +49,6 @@ set( clFFT.Test.Headers
set( clFFT.Test.Files ${clFFT.Test.Source} ${clFFT.Test.Headers} )
-
-
-if( BUILD64 )
- set( BIN_DIR bin64 )
- set( LIB_DIR lib64 )
-else()
- set( BIN_DIR bin32 )
- set( LIB_DIR lib32 )
-endif()
-
set( LD_PTHREAD "" )
if( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}" )
@@ -103,7 +93,7 @@ set_target_properties( Test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINAR
# CPack configuration; include the executable into the package
install( TARGETS Test
- RUNTIME DESTINATION ${BIN_DIR}
- LIBRARY DESTINATION ${LIB_DIR}
- ARCHIVE DESTINATION ${LIB_DIR}/import
- )
+ RUNTIME DESTINATION bin${SUFFIX_BIN}
+ LIBRARY DESTINATION lib${SUFFIX_LIB}
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+ )
--
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