[CMAKE] Supply feature defines to CodeGeneratorTestRunner.
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2012 04:24:57 +0000 (04:24 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2012 04:24:57 +0000 (04:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=96273

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/WebKitFeatures.cmake: Generated FEATURE_DEFINES_WITH_SPACE_SEPARATOR.

Source/WebCore:

* CMakeLists.txt: Extracted FEATURE_DEFINES with space separator to share.
* PlatformBlackBerry.cmake: Ditto.
* UseJSC.cmake: Ditto.
* UseV8.cmake: Ditto.

Tools:

Passed FEATURE_DEFINES_WITH_SPACE_SEPARATOR to CodeGeneratorTestRunner
in order to distinguish compile time options such as ENABLE(TOUCH_EVENTS).

* WebKitTestRunner/CMakeLists.txt:

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

ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebCore/UseJSC.cmake
Source/WebCore/UseV8.cmake
Source/cmake/WebKitFeatures.cmake
Tools/ChangeLog
Tools/WebKitTestRunner/CMakeLists.txt

index d5f6460..d8b96f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-11  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [CMAKE] Supply feature defines to CodeGeneratorTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=96273
+
+        Reviewed by Gyuyoung Kim.
+
+        * Source/cmake/WebKitFeatures.cmake: Generated FEATURE_DEFINES_WITH_SPACE_SEPARATOR.
+
 2012-09-11  Arnaud Renevier  <a.renevier@sisa.samsung.com>
 
         [Gtk] allow building with css-shaders
index e5683b3..d0cea54 100644 (file)
@@ -2814,16 +2814,11 @@ ADD_CUSTOM_COMMAND(
     VERBATIM)
 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLEntityTable.cpp)
 
-
-# Replace ";" with "space" in order to recognize feature definition in css files.
-SET(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "")
-FOREACH(_feature ${FEATURE_DEFINES})
+SET(FEATURE_DEFINES_CSS ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR})
+IF (CMAKE_SYSTEM_NAME MATCHES "QNX")
     # filter out color input since we have our own solution
-    IF (NOT CMAKE_SYSTEM_NAME MATCHES "QNX" OR NOT _feature MATCHES "ENABLE_INPUT_TYPE_COLOR")
-        SET(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR} ${_feature}")
-    ENDIF()
-ENDFOREACH()
-
+    STRING(REPLACE "ENABLE_INPUT_TYPE_COLOR" "" FEATURE_DEFINES_CSS "${FEATURE_DEFINES_CSS}")
+ENDIF()
 
 # Generate CSS property names
 ADD_CUSTOM_COMMAND (
@@ -2832,7 +2827,7 @@ ADD_CUSTOM_COMMAND (
     DEPENDS ${WebCore_CSS_PROPERTY_NAMES}
     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
+    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES_CSS}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
     VERBATIM)
 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp CSSValueKeywords.h)
@@ -2846,7 +2841,7 @@ ADD_CUSTOM_COMMAND (
     DEPENDS ${WebCore_CSS_VALUE_KEYWORDS}
     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
+    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES_CSS}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
     VERBATIM)
 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp CSSValueKeywords.h)
@@ -2858,7 +2853,7 @@ ADD_CUSTOM_COMMAND(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h
     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/make-css-file-arrays.pl
     DEPENDS ${WebCore_USER_AGENT_STYLE_SHEETS} ${WEBCORE_DIR}/bindings/scripts/preprocessor.pm
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/make-css-file-arrays.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${WebCore_USER_AGENT_STYLE_SHEETS}
+    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/make-css-file-arrays.pl --defines "${FEATURE_DEFINES_CSS}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${WebCore_USER_AGENT_STYLE_SHEETS}
     VERBATIM)
 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/StyleResolver.cpp UserAgentStyleSheetsData.cpp UserAgentStyleSheets.h)
index f29814f..a375842 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-11  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [CMAKE] Supply feature defines to CodeGeneratorTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=96273
+
+        Reviewed by Gyuyoung Kim.
+
+        * CMakeLists.txt: Extracted FEATURE_DEFINES with space separator to share.
+        * PlatformBlackBerry.cmake: Ditto.
+        * UseJSC.cmake: Ditto.
+        * UseV8.cmake: Ditto.
+
 2012-09-11  Nico Weber  <thakis@chromium.org>
 
         [chromium/mac] Fix "Class WebCoreTextFieldCell is implemented in both Chromium Framework and /System/Library/Frameworks/WebKit.framework" warning
index e4c97f8..53c2d35 100644 (file)
@@ -314,10 +314,7 @@ INSTALL(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
 # Create DOM C++ code given an IDL input
 # We define a new list of feature defines that is prefixed with LANGUAGE_CPP=1 so as to avoid the
 # warning "missing whitespace after the macro name" when inlining "LANGUAGE_CPP=1 ${FEATURE_DEFINES}".
-SET(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1")
-FOREACH (_feature ${FEATURE_DEFINES})
-    SET(FEATURE_DEFINES_WEBCORE "${FEATURE_DEFINES_WEBCORE} ${_feature}")
-ENDFOREACH ()
+SET(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # FIXME: We need to add the IDLs for SQL storage and Web Workers. See PR #123484.
 SET(WebCore_NO_CPP_IDL_FILES
index 87ca996..3e60a3e 100644 (file)
@@ -304,10 +304,7 @@ FOREACH (_include ${WebCoreTestSupport_IDL_INCLUDES})
     LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
 ENDFOREACH ()
 
-SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
-FOREACH (_feature ${FEATURE_DEFINES})
-    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
-ENDFOREACH ()
+SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # Create JavaScript C++ code given an IDL input
 FOREACH (_idl ${WebCore_IDL_FILES})
index 9862588..01731af 100755 (executable)
@@ -230,10 +230,7 @@ FOREACH (_include ${WebCoreTestSupport_IDL_INCLUDES})
     LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
 ENDFOREACH ()
 
-SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 V8_BINDING=1")
-FOREACH (_feature ${FEATURE_DEFINES})
-    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
-ENDFOREACH ()
+SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 V8_BINDING=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # Generate DebuggerScriptSource.h
 ADD_CUSTOM_COMMAND(
index 58a90d2..e0e6a0a 100644 (file)
@@ -157,6 +157,7 @@ MACRO (WEBKIT_OPTION_END)
 
         IF (${_name})
             LIST(APPEND FEATURE_DEFINES ${_name})
+            SET(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR} ${_name}")
             SET(_MESSAGE "${_MESSAGE} ON")
         ELSE ()
             SET(_MESSAGE "${_MESSAGE} OFF")
index daeebbc..2de565e 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-11  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [CMAKE] Supply feature defines to CodeGeneratorTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=96273
+
+        Reviewed by Gyuyoung Kim.
+
+        Passed FEATURE_DEFINES_WITH_SPACE_SEPARATOR to CodeGeneratorTestRunner
+        in order to distinguish compile time options such as ENABLE(TOUCH_EVENTS).
+
+        * WebKitTestRunner/CMakeLists.txt:
+
 2012-09-11  Dirk Pranke  <dpranke@chromium.org>
 
         [chromium] rename webkit_resources
index e4f4f72..a3ea88d 100644 (file)
@@ -68,7 +68,7 @@ GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
     "${WebKitTestRunnerInjectedBundle_IDL_FILES}"
     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
     "--include=${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
-    ""
+    "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
     ${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner
     )