diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-11-17 22:06:24 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-11-17 22:06:24 +0100 |
commit | be93a81172071c412b5c890c06c691ce4c5054ec (patch) | |
tree | cef638a8001217018910f09cae5d30ac37fcced3 /CMakeLists.txt | |
parent | b0185d2a819193621b0e18b62d88b7ce84bead71 (diff) | |
download | mariadb-git-be93a81172071c412b5c890c06c691ce4c5054ec.tar.gz |
Bug#58272: -DBUILD_CONFIG=mysql_release is broken with cmake 2.8.3
The reason for the bug is that :
- we use system checks in cmake/os/mysql_release.cmake
- we include cmake/os/mysql_release.cmake using CMAKE_USER_MAKE_RULES_OVERRIDE
- this (having system checks based on TRY_COMPILE inside file pointed by
CMAKE_USER_MAKE_RULES_OVERRIDE does not work with cmake 2.8.3,
and according to Kitware was never meant to work, it just happened to work by accident
until 2.8.2 release (though, it seems not to work wiith 2.6.0 either)
Related CMake bug discussing the situation:
http://public.kitware.com/Bug/view.php?id=11469
The fix is to use INCLUDE instead of CMAKE_USER_MAKE_RULES_OVERRIDE as suggested
by Kitware. The downside is that compile flags are not in cache, but this is pure cosmetics.
The functionality is the same, flags are used for compiling are correct using INCLUDE.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c7e89974c1..89ae82f2c35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,12 +79,12 @@ ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG) SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE) ENDIF() -IF(BUILD_CONFIG) - SET(CMAKE_USER_MAKE_RULES_OVERRIDE - ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) -ENDIF() PROJECT(MySQL) +IF(BUILD_CONFIG) + INCLUDE( + ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) +ENDIF() # Include the platform-specific file. To allow exceptions, this code # looks for files in order of how specific they are. If there is, for |