diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-10-25 01:12:16 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-10-25 01:12:16 +0200 |
commit | 08115a80e5c5c150ff39813e61f57619a323fa53 (patch) | |
tree | 57726587f4c4ae7b6a2b249cf184c0ca1a62b4c8 /CMakeLists.txt | |
parent | acf27225b5e971bb201b457b4704515f716ca7d2 (diff) | |
download | mariadb-git-08115a80e5c5c150ff39813e61f57619a323fa53.tar.gz |
Fix debug build on Windows.
Checking for WITH_DEBUG does not work, as described in CMake MySQL wiki
http://forge.mysql.com/wiki/CMake#Debug-only_options
Excluding directory completely for certain build types works for Makefiles only, but not for Visual Studio and not for Xcode.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ac632770229..5fd951584e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,10 +285,12 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") ENDIF() ADD_SUBDIRECTORY(include) -IF(WITH_DEBUG) - ADD_SUBDIRECTORY(dbug) +IF(CMAKE_GENERATOR MATCHES "Makefiles" AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") + SET(DBUG_LIBRARY) +ELSE() SET(DBUG_LIBRARY dbug) -ENDIF(WITH_DEBUG) + ADD_SUBDIRECTORY(dbug) +ENDIF() ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(regex) |