[CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 01:19:50 +0000 (01:19 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 01:19:50 +0000 (01:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116899

Reviewed by Laszlo Gombos.

* CMakeLists.txt: Fixed if statement to escape when find command fails.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog

index f52ce74..ac2b087 100644 (file)
@@ -2540,8 +2540,8 @@ set(WebCore_SOURCES
 if (CMAKE_COMPILER_IS_GNUCXX) # Can restrict based on the version.
     string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _CXXFLAGS_VARNAME)
 
-    string(FIND ${_CXXFLAGS_VARNAME} "-O3" _CXXFLAGS_HAS_O3)
-    if (_CXXFLAGS_HAS_O3)
+    string(FIND ${_CXXFLAGS_VARNAME} "-O3" _CXXFLAGS_O3_INDEX)
+    if (_CXXFLAGS_O3_INDEX GREATER -1)
         string(REPLACE "-O3" "-O2" _CXXFLAGS ${${_CXXFLAGS_VARNAME}})
         set_source_files_properties(Modules/websockets/WebSocketDeflater.cpp
                                     PROPERTIES COMPILE_FLAGS "${_CXXFLAGS}")
index 9be239c..bbb95e6 100644 (file)
@@ -1,3 +1,12 @@
+2013-05-29  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
+        https://bugs.webkit.org/show_bug.cgi?id=116899
+
+        Reviewed by Laszlo Gombos.
+
+        * CMakeLists.txt: Fixed if statement to escape when find command fails.
+
 2013-05-28  Oliver Hunt  <oliver@apple.com>
 
         Add more accurate activity state tracking