Commit c872b100 authored by Sergei Golubchik's avatar Sergei Golubchik

don't install same files twice

CMakeLists.txt - merge mistake, apparently

include/CMakeLists.txt - install from CMAKE_CURRENT_BINARY_DIR.
  Only install from CMAKE_CURRENT_SOURCE_DIR, if it's different
  from CMAKE_CURRENT_BINARY_DIR

mysql-test/CMakeLists.txt - INSTALL_MYSQL_TEST() macro installs
  everything, no need to install mtr separately once again

mysql-test/lib/My/SafeProcess/CMakeLists.txt
  MYSQL_ADD_EXECUTABLE includes INSTALL

sql-bench/CMakeLists.txt
  list files explicitly. don't install garbage, don't process 'foo'
  and 'foo.sh' separately, it's only one file to install, not two.
parent c9db190f
...@@ -460,7 +460,6 @@ INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty ...@@ -460,7 +460,6 @@ INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN) # ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
IF(UNIX) IF(UNIX)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme) INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme)
ENDIF() ENDIF()
......
...@@ -73,14 +73,17 @@ INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development ...@@ -73,14 +73,17 @@ INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development
STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}") STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}") STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development MACRO(INSTALL_PRIVATE DIR)
FILES_MATCHING PATTERN "*.h" INSTALL(DIRECTORY ${DIR}/.
PATTERN CMakeFiles EXCLUDE DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
PATTERN mysql EXCLUDE FILES_MATCHING PATTERN "*.h"
REGEX "\\./(${EXCL_RE}$)" EXCLUDE) PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE
REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
ENDMACRO()
INSTALL_PRIVATE(${CMAKE_CURRENT_BINARY_DIR})
IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
INSTALL_PRIVATE(${CMAKE_CURRENT_SOURCE_DIR})
ENDIF()
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/. DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
FILES_MATCHING PATTERN "*.h"
PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE
REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
...@@ -32,12 +32,6 @@ IF(UNIX) ...@@ -32,12 +32,6 @@ IF(UNIX)
./mysql-test-run.pl mysql-test-run ./mysql-test-run.pl mysql-test-run
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) )
IF(INSTALL_MYSQLTESTDIR)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run
DESTINATION ${INSTALL_MYSQLTESTDIR}
COMPONENT Test)
ENDIF()
ENDIF() ENDIF()
IF(CMAKE_GENERATOR MATCHES "Visual Studio") IF(CMAKE_GENERATOR MATCHES "Visual Studio")
......
...@@ -29,16 +29,6 @@ ELSE() ...@@ -29,16 +29,6 @@ ELSE()
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS}) MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
ENDIF() ENDIF()
INSTALL(TARGETS my_safe_process
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)
IF(WIN32)
INSTALL(TARGETS my_safe_kill
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)
ENDIF()
INSTALL(FILES Base.pm INSTALL(FILES Base.pm
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
) )
...@@ -34,38 +34,44 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/Wisconsin ...@@ -34,38 +34,44 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/Wisconsin
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/limits INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/limits
DESTINATION ${prefix}sql-bench COMPONENT SqlBench) DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
FILE(GLOB all_files ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(all_files README bench-count-distinct.sh bench-init.pl.sh
compare-results.sh copy-db.sh crash-me.sh example.bat
graph-compare-results.sh innotest1.sh innotest1a.sh innotest1b.sh
innotest2.sh innotest2a.sh innotest2b.sh myisam.cnf pwd.bat
run-all-tests.sh server-cfg.sh test-ATIS.sh test-alter-table.sh
test-big-tables.sh test-connect.sh test-create.sh test-insert.sh
test-select.sh test-table-elimination.sh test-transactions.sh
test-wisconsin.sh uname.bat
)
FOREACH(file ${all_files}) FOREACH(file ${all_files})
IF(NOT IS_DIRECTORY ${file} AND NOT ${file} MATCHES "Make|as3ap|/example$" ) GET_FILENAME_COMPONENT(ext ${file} EXT)
GET_FILENAME_COMPONENT(ext ${file} EXT) GET_FILENAME_COMPONENT(name ${file} NAME)
GET_FILENAME_COMPONENT(name ${file} NAME) SET(target ${name})
SET(target ${name}) IF(ext MATCHES ".sh$")
IF(ext MATCHES ".sh$") # Those are perl files actually
# Those are perl files actually STRING(REPLACE ".sh" "" target ${target} )
STRING(REPLACE ".sh" "" target ${target} ) IF(WIN32)
IF(WIN32) IF(NOT ext MATCHES ".pl")
IF(NOT ext MATCHES ".pl") SET(target "${target}.pl")
SET(target "${target}.pl")
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(target "${CMAKE_CURRENT_BINARY_DIR}/${target}") ENDIF()
CONFIGURE_FILE(${file} ${target} COPYONLY) SET(target "${CMAKE_CURRENT_BINARY_DIR}/${target}")
IF (UNIX AND NOT ${name} MATCHES "README") CONFIGURE_FILE(${file} ${target} COPYONLY)
EXECUTE_PROCESS(COMMAND chmod +x ${target}) IF (UNIX AND NOT ${name} MATCHES "README")
ENDIF() EXECUTE_PROCESS(COMMAND chmod +x ${target})
IF (ext MATCHES ".bat") ENDIF()
IF(WIN32) IF (ext MATCHES ".bat")
INSTALL(PROGRAMS ${target} IF(WIN32)
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ENDIF()
ELSEIF(name MATCHES "README")
INSTALL(FILES ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ELSE()
INSTALL(PROGRAMS ${target} INSTALL(PROGRAMS ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench) DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ENDIF() ENDIF()
ELSEIF(name MATCHES "README")
INSTALL(FILES ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ELSE()
INSTALL(PROGRAMS ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment