Title: [147992] trunk
- Revision
- 147992
- Author
- [email protected]
- Date
- 2013-04-09 00:20:01 -0700 (Tue, 09 Apr 2013)
Log Message
Do not set CMAKE_BUILD_TYPE if it is not defined
https://bugs.webkit.org/show_bug.cgi?id=114243
Reviewed by Geoffrey Garen.
Setting the CMAKE_BUILD_TYPE causes some problem with Visual Studio.
Adopt the current usage of the variable to better CMake style.
* CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/OptionsEfl.cmake:
Modified Paths
Diff
Modified: trunk/CMakeLists.txt (147991 => 147992)
--- trunk/CMakeLists.txt 2013-04-09 07:12:31 UTC (rev 147991)
+++ trunk/CMakeLists.txt 2013-04-09 07:20:01 UTC (rev 147992)
@@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 2.8.3)
project(WebKit)
-# Set a default build type if and only if user did not define one as command
-# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags
-# from default build type would overwrite user-defined ones.
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
- set(CMAKE_BUILD_TYPE Release)
-endif ()
-string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
-
# -----------------------------------------------------------------------------
# Default library type
# -----------------------------------------------------------------------------
Modified: trunk/ChangeLog (147991 => 147992)
--- trunk/ChangeLog 2013-04-09 07:12:31 UTC (rev 147991)
+++ trunk/ChangeLog 2013-04-09 07:20:01 UTC (rev 147992)
@@ -1,3 +1,17 @@
+2013-04-09 Patrick Gansterer <[email protected]>
+
+ Do not set CMAKE_BUILD_TYPE if it is not defined
+ https://bugs.webkit.org/show_bug.cgi?id=114243
+
+ Reviewed by Geoffrey Garen.
+
+ Setting the CMAKE_BUILD_TYPE causes some problem with Visual Studio.
+ Adopt the current usage of the variable to better CMake style.
+
+ * CMakeLists.txt:
+ * Source/cmake/OptionsCommon.cmake:
+ * Source/cmake/OptionsEfl.cmake:
+
2013-03-31 Martin Robinson <[email protected]>
Bug 110293 uses read -d which is a non-portable bashism
Modified: trunk/Source/cmake/OptionsCommon.cmake (147991 => 147992)
--- trunk/Source/cmake/OptionsCommon.cmake 2013-04-09 07:12:31 UTC (rev 147991)
+++ trunk/Source/cmake/OptionsCommon.cmake 2013-04-09 07:20:01 UTC (rev 147992)
@@ -25,10 +25,10 @@
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR)
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "(i[3-6]86|x86)" AND "${CMAKE_BUILD_TYPE}" STREQUAL "debug")
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "(i[3-6]86|x86)")
# To avoid out of memory when building with debug option in 32bit system.
# See https://bugs.webkit.org/show_bug.cgi?id=77327
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS}")
+ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
endif ()
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
Modified: trunk/Source/cmake/OptionsEfl.cmake (147991 => 147992)
--- trunk/Source/cmake/OptionsEfl.cmake 2013-04-09 07:12:31 UTC (rev 147991)
+++ trunk/Source/cmake/OptionsEfl.cmake 2013-04-09 07:20:01 UTC (rev 147992)
@@ -9,7 +9,7 @@
set(ENABLE_WEBKIT2 ON)
endif ()
-if (${CMAKE_BUILD_TYPE} STREQUAL "debug" AND NOT SHARED_CORE)
+if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND NOT SHARED_CORE)
message(FATAL_ERROR "Turn on the SHARED_CORE flag to make a debug build - e.g.\n build-webkit --efl --debug --cmakeargs=\"-DSHARED_CORE=ON\".\n")
endif ()
@@ -245,10 +245,10 @@
set(CPACK_SOURCE_GENERATOR TBZ2)
# Optimize binary size for release builds by removing dead sections on unix/gcc
-if (CMAKE_BUILD_TYPE STREQUAL release AND CMAKE_COMPILER_IS_GNUCC AND UNIX AND NOT APPLE)
- set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections ${CMAKE_C_FLAGS}")
- set(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections ${CMAKE_CXX_FLAGS}")
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--gc-sections ${CMAKE_SHARED_LINKER_FLAGS}")
+if (CMAKE_COMPILER_IS_GNUCC AND UNIX AND NOT APPLE)
+ set(CMAKE_C_FLAGS_RELEASE "-ffunction-sections -fdata-sections ${CMAKE_C_FLAGS_RELEASE}")
+ set(CMAKE_CXX_FLAGS_RELEASE "-ffunction-sections -fdata-sections ${CMAKE_CXX_FLAGS_RELEASE}")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,--gc-sections ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
endif ()
if (ENABLE_WEBGL)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes