diff options
author | Vladislav Vaintroub <wlad@sun.com> | 2010-01-19 02:21:48 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@sun.com> | 2010-01-19 02:21:48 +0000 |
commit | 5d61e31d4daa00e38ece79183c8cfebf49ec7b9e (patch) | |
tree | 5af24e94b2d8f2d52d12f2db9881d8193beb7eb3 /CMakeLists.txt | |
parent | 6b596534c024b2380e8a20473d4953d348956c37 (diff) | |
download | mariadb-git-5d61e31d4daa00e38ece79183c8cfebf49ec7b9e.tar.gz |
Fix end-of-line characters in mysql_release.cmake to be unix-conform
make -DBUILD_CONFIG=mysql_release work
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dcc4972fbc0..77cb30a8a40 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,9 +19,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) CMAKE_POLICY(VERSION 2.8) endif() -IF(BUILD_CONFIG) - INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) -ENDIF() SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) @@ -31,7 +28,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) # is given, set CMAKE_BUILD_TYPE = Debug. Otherwise, use Relwithdebinfo. -IF(CMAKE_BUILD_TYPE) +IF(DEFINED CMAKE_BUILD_TYPE) SET(HAVE_CMAKE_BUILD_TYPE TRUE) ENDIF() SET(CUSTOM_C_FLAGS $ENV{CFLAGS}) @@ -42,19 +39,27 @@ ENDIF() OPTION(WITH_DEBUG "Use dbug" OFF) OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF) -IF(NOT HAVE_CMAKE_BUILD_TYPE AND NOT CUSTOM_C_FLAGS) - IF(WITH_DEBUG) - SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Debug build" FORCE) - ELSE() - SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "RelWithDebInfo build" FORCE) +IF(NOT HAVE_CMAKE_BUILD_TYPE) + IF(BUILD_CONFIG OR NOT CUSTOM_C_FLAGS) + IF(WITH_DEBUG) + SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Debug build" FORCE) + ELSE() + SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "RelWithDebInfo build" FORCE) + ENDIF() ENDIF() ENDIF() + IF(WITH_DEBUG_FULL) SET(WITH_DEBUG ON CACHE BOOL "Use DBUG") ENDIF() PROJECT(MySQL) +IF(BUILD_CONFIG) + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) +ENDIF() + IF(CYGWIN) SET(WIN32 0) ENDIF() |