diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-08-05 18:38:24 +0200 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-08-05 18:38:24 +0200 |
commit | b94d86215d3f785962cfe2398a2b4ad9b68c028e (patch) | |
tree | 8dc636cff7f3260d888a8f68dca1932af9afc67c /sql-bench | |
parent | f2f65eef739ce44b6ac419790ebe7beb45e86f1d (diff) | |
download | mariadb-git-b94d86215d3f785962cfe2398a2b4ad9b68c028e.tar.gz |
Build cleanups
- Simplify sql-bench installation,
do not try to resolve names : this leads to probem
if builddir is symlink located on different filesystem.
(reported by alik)
- Make WITHOUT_XXX (disabling plugin) work for DEFAULT
plugins. Prior to the patch is behaved just like
MANDATORY.
- LINK_LIBRARIES in MYSQL_ADD_PLUGIN had no effect for
statically linked plugins.
- Fix constant rebuild of initdb target on Windows.
Diffstat (limited to 'sql-bench')
-rw-r--r-- | sql-bench/CMakeLists.txt | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/sql-bench/CMakeLists.txt b/sql-bench/CMakeLists.txt index be0aeca70b0..95f69fd2a8e 100644 --- a/sql-bench/CMakeLists.txt +++ b/sql-bench/CMakeLists.txt @@ -14,12 +14,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Install sql-bench files -FILE(GLOB all_files -${CMAKE_SOURCE_DIR}/sql-bench/* -${CMAKE_SOURCE_DIR}/sql-bench/Data/ATIS/* -${CMAKE_SOURCE_DIR}/sql-bench/Data/Wisconsin/* -${CMAKE_SOURCE_DIR}/sql-bench/limits/* -) IF(NOT INSTALL_SQLBENCHDIR) RETURN() @@ -31,30 +25,39 @@ ELSE() SET(prefix ${INSTALL_SQLBENCHDIR}/) ENDIF() -GET_FILENAME_COMPONENT(basedir ${CMAKE_SOURCE_DIR} ABSOLUTE) +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/ATIS + DESTINATION ${prefix}sql-bench/Data) + +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/Wisconsin + DESTINATION ${prefix}sql-bench/Data) + +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/limits + DESTINATION ${prefix}sql-bench) + +FILE(GLOB all_files ${CMAKE_CURRENT_SOURCE_DIR}/*) + FOREACH(file ${all_files}) IF(NOT IS_DIRECTORY ${file} AND NOT ${file} MATCHES "Make|as3ap|/example$" ) - FILE(RELATIVE_PATH relpath ${basedir} ${file}) - SET(target_relpath ${relpath}) GET_FILENAME_COMPONENT(ext ${file} EXT) - GET_FILENAME_COMPONENT(dir ${relpath} PATH) + GET_FILENAME_COMPONENT(name ${file} NAME) + SET(target ${name}) IF(ext MATCHES ".sh$") # Those are perl files actually - STRING(REPLACE ".sh" "" target_relpath ${target_relpath} ) + STRING(REPLACE ".sh" "" target ${target} ) IF(WIN32) IF(NOT ext MATCHES ".pl") - SET(target_relpath "${target_relpath}.pl") + SET(target "${target}.pl") ENDIF() ENDIF() ENDIF() - SET(target "${CMAKE_BINARY_DIR}/${target_relpath}") + SET(target "${CMAKE_CURRENT_BINARY_DIR}/${target}") CONFIGURE_FILE(${file} ${target} COPYONLY) IF (ext MATCHES ".bat") IF(WIN32) - INSTALL(FILES ${target} DESTINATION ${prefix}${dir}) + INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench) ENDIF() ELSE() - INSTALL(FILES ${target} DESTINATION ${prefix}${dir}) + INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench) ENDIF() ENDIF() ENDFOREACH() |