Bug #65232 Unable to build out-of-source
Submitted: 7 May 2012 20:42 Modified: 14 Oct 2022 16:26
Reporter: David Golub Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version:1.1.0 OS:Any
Assigned to: CPU Architecture:Any

[7 May 2012 20:42] David Golub
Description:
The CMake build scripts for the MySQL C++ Connector do not support using CMake to place intermediate and output files outside the source tree.  Attempting to do so will produce compiler errors because certain header files will not be found.

How to repeat:
Open a command prompt in the root of the source tree and run

mkdir build
cd build
cmake -G "Visual Studio 10 Win64" ..

Then, attempt to build the resulting Visual Studio solution.  There will be compiler errors.

Suggested fix:
The various CMakeLists.txt files need to be have INCLUDE_DIRECTORIES commands added for ${CMAKE_BINARY_DIR}, ${CMAKE_BINARY_DIR}/cppconn, and/or ${CMAKE_BINARY_DIR}/driver/nativeapi so that the CMake-generated header files can be found.
[10 May 2012 17:06] Sveta Smirnova
Thank you for the report.

Verified as described.
[9 Jan 2015 7:45] Hemant Dangi
Make install fail for out of source build.

Committed as revision 1014.
[9 Jan 2015 7:46] Hemant Dangi
Duplicate of bug#73502.

Committed as revision 1014 of version 1.1.6.
[14 Oct 2022 16:26] Luis Silva
Posted by developer:
 
No longer an issue.