Bug #81541 'rapid' (xplugin) gunit tests are not built in out-of-source compilation
Submitted: 23 May 2016 10:50 Modified: 25 May 2016 7:51
Reporter: Yura Sorokin (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.7.12 OS:Any
Assigned to: CPU Architecture:Any

[23 May 2016 10:50] Yura Sorokin
Description:
'rapid' (xplugin) gunit tests are not built when 'cmake' is run from a non-source directory.

How to repeat:
git clone https://github.com/mysql/mysql-server.git
mkdir mysql-build
cd mysql-build
cmake \
 ../mysql-server \
 -DCMAKE_BUILD_TYPE=Debug \
 -DMYSQL_MAINTAINER_MODE=ON \
 -DBUILD_CONFIG=mysql_release \
 -DFEATURE_SET=community \
 -DENABLE_DTRACE=OFF \
 -DWITH_SSL=system \
 -DWITH_ZLIB=system \
 -DENABLE_DOWNLOADS=1 \
 -DDOWNLOAD_BOOST=1 \
 -DWITH_BOOST=../deps

After that 'unittest' directory is not created in 'mysql-build/rapid'
ls -l rapid

Suggested fix:
The problem seems to be introduced in commit d50cf7d
"Bug#22865257 WITH_RAPID BUILD FAILURE IF RAPID DIRECTORY IS REMOVED" (https://github.com/mysql/mysql-server/commit/d50cf7d6f755e550de33117e6246289a08c73d82)

In out-of-source compilations the following condition in the main 'CMakeLists.txt' is wrong
*********************************************
IF(WITH_RAPID AND EXISTS rapid/unittest/gunit)
  ADD_SUBDIRECTORY(rapid/unittest/gunit)
ENDIF()
*********************************************

The correct on would be
*********************************************
IF(WITH_RAPID AND EXISTS ${CMAKE_SOURCE_DIR}/rapid/unittest/gunit)
  ADD_SUBDIRECTORY(rapid/unittest/gunit)
ENDIF()
*********************************************
[23 May 2016 12:51] MySQL Verification Team
Hello Yura,

Thank you for the report and feedback!

Thanks,
Umesh
[25 May 2016 7:51] Tor Didriksen
Already fixed by the patch for: 
Bug#22842273 LOTS OF NEW VISUAL STUDIO COMPILER WARNINGS FROM WL#8338
Fixed in 5.7.13