Commit 81542bde authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-4267 : do not copy sql_yacc.cc and sql_yacc.h from unpacked source...

MDEV-4267 : do not copy sql_yacc.cc and sql_yacc.h from unpacked source tarball into build directory, if usable bison is installed on the build machine.

This is done in order to avoid possibly stale bison output files in the build directory.
parent 2ede76c1
......@@ -185,9 +185,12 @@ INSTALL_DEBUG_TARGET(mysqld
PDB_DESTINATION ${INSTALL_SBINDIR}/debug
RENAME mysqld-debug)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/bison.cmake)
# Handle out-of-source build from source package with possibly broken
# bison. Copy bison output to from source to build directory, if not already
# there
IF (NOT BISON_USABLE)
IF (NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.cc)
IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc)
......@@ -198,9 +201,8 @@ IF (NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
ENDIF()
ENDIF()
ENDIF()
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/bison.cmake)
RUN_BISON(
${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.yy
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
......
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