diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-03-03 12:43:30 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-03-03 12:43:30 +0100 |
commit | eb101253189e8466a596e61e6dba33ea6d84085b (patch) | |
tree | 55b016c4a89d03b8c090a235c89b17da8766e2be /sql | |
parent | aca943f0b122e56aa19fb2f73583de3078d9d458 (diff) | |
download | mariadb-git-eb101253189e8466a596e61e6dba33ea6d84085b.tar.gz |
Fix a problem reported by Alik:
when cmake is used for building in a symlinked directory,
and confguration is later adjusted with "cmake-gui ." After it,
GenServerSource fails with "no rule for <filename>". The reason
for the error is that cmake-gui resolves "." as realpath and rules
are generated accordingly, while "cmake" used symlinked path
The fix uses ${CMAKE_CURRENT_BINARY_DIR} instead of
${CMAKE_BINARY_DIR}/sql for generated files.
This causes CMake to use relative file names so
relative file names when generating make rules.
Using relative filenames avoids the problem of
refering to the same directory using 2 different paths.
Besides, using ${CMAKE_CURRENT_BINARY_DIR} is
a commonly used style when working with generated
files.
Diffstat (limited to 'sql')
-rwxr-xr-x | sql/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 8399b0c7219..596717d02c2 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -24,10 +24,10 @@ ${CMAKE_BINARY_DIR}/sql ) SET(GEN_SOURCES -${CMAKE_BINARY_DIR}/sql/sql_yacc.h -${CMAKE_BINARY_DIR}/sql/sql_yacc.cc -${CMAKE_BINARY_DIR}/sql/sql_builtin.cc -${CMAKE_BINARY_DIR}/sql/lex_hash.h +${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h +${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc +${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc +${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ) SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1) |