Commit 08e1a5b7 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Small fixes in CMake:

 create data dir correctly in initial_database target on Windows
 handle case where INSTALL_MYSQLTESTDIR is empty (e.g someone does not want
 to install tests)
parent b9e063ca
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF(INSTALL_MYSQLTESTDIR)
INSTALL( INSTALL(
DIRECTORY . DIRECTORY .
DESTINATION ${INSTALL_MYSQLTESTDIR} DESTINATION ${INSTALL_MYSQLTESTDIR}
...@@ -28,6 +29,7 @@ INSTALL( ...@@ -28,6 +29,7 @@ INSTALL(
PATTERN "*.am" EXCLUDE PATTERN "*.am" EXCLUDE
PATTERN "*.in" EXCLUDE PATTERN "*.in" EXCLUDE
) )
ENDIF()
...@@ -48,9 +50,11 @@ IF(UNIX) ...@@ -48,9 +50,11 @@ 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 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run ${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run
DESTINATION ${INSTALL_MYSQLTESTDIR}) DESTINATION ${INSTALL_MYSQLTESTDIR})
ENDIF()
ENDIF() ENDIF()
IF(CMAKE_GENERATOR MATCHES "Visual Studio") IF(CMAKE_GENERATOR MATCHES "Visual Studio")
......
...@@ -271,8 +271,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE) ...@@ -271,8 +271,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_initial_db.cmake ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_initial_db.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data
COMMAND ${CMAKE_COMMAND} -E touch initdb.dep COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS mysqld DEPENDS mysqld
) )
ADD_CUSTOM_TARGET(initial_database ADD_CUSTOM_TARGET(initial_database
......
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