[EFL][CMake] Move gtest sources to an upper level
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2012 19:19:44 +0000 (19:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2012 19:19:44 +0000 (19:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90602

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-07-06
Reviewed by Chang Shu.

.:

CTest was enabled for all the ports, but used only by EFL. Now
ENABLE_API_TESTS has to be defined, which will also build gtest.

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/gtest/CMakeLists.txt: Added.

Source/WebKit:

Removed gtest since it is now built as a separated component.
This will allow us to share it with WebKit 2 API tests.

* PlatformEfl.cmake:

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

CMakeLists.txt
ChangeLog
Source/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/cmake/OptionsEfl.cmake
Source/cmake/gtest/CMakeLists.txt [new file with mode: 0644]

index 70623e4..90ff03a 100644 (file)
@@ -9,11 +9,6 @@ IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
 ENDIF ()
 
 # -----------------------------------------------------------------------------
-# Enable CTest for the public API unit testing
-# -----------------------------------------------------------------------------
-ENABLE_TESTING()
-
-# -----------------------------------------------------------------------------
 # Default library type
 # -----------------------------------------------------------------------------
 SET(ENABLE_WEBCORE ON)
index 54f5f6a..342a41a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-07-06  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL][CMake] Move gtest sources to an upper level
+        https://bugs.webkit.org/show_bug.cgi?id=90602
+
+        Reviewed by Chang Shu.
+
+        CTest was enabled for all the ports, but used only by EFL. Now
+        ENABLE_API_TESTS has to be defined, which will also build gtest.
+
+        * CMakeLists.txt:
+        * Source/CMakeLists.txt:
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/gtest/CMakeLists.txt: Added.
+
 2012-07-06  Zan Dobersek  <zandobersek@gmail.com>
 
         [Gtk] Add a configuration option for disabling unstable features in releases
index b649977..fb3092a 100644 (file)
@@ -5,6 +5,10 @@ ADD_SUBDIRECTORY(WTF)
 
 ADD_SUBDIRECTORY(JavaScriptCore)
 
+IF (ENABLE_API_TESTS)
+    ADD_SUBDIRECTORY(cmake/gtest)
+ENDIF ()
+
 IF (ENABLE_WEBCORE)
     ADD_SUBDIRECTORY(WebCore)
 ENDIF ()
index 6708cc4..0ff7751 100644 (file)
@@ -1,3 +1,15 @@
+2012-07-06  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL][CMake] Move gtest sources to an upper level
+        https://bugs.webkit.org/show_bug.cgi?id=90602
+
+        Reviewed by Chang Shu.
+
+        Removed gtest since it is now built as a separated component.
+        This will allow us to share it with WebKit 2 API tests.
+
+        * PlatformEfl.cmake:
+
 2012-07-06  Seokju Kwon  <seokju.kwon@samsung.com>
 
         [EFL] Add Web Inspector to WebKit-EFL
index 368383a..e3bd447 100644 (file)
@@ -293,21 +293,7 @@ INSTALL(FILES ${EWebKit_HEADERS}
 INSTALL(FILES ${WebKit_THEME}
         DESTINATION ${DATA_INSTALL_DIR}/themes)
 
-INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest
-                    ${THIRDPARTY_DIR}/gtest/include
-)
-
-SET(GTEST_SOURCES "${THIRDPARTY_DIR}/gtest/src")
-
-ADD_LIBRARY(gtest
-    ${GTEST_SOURCES}/gtest.cc
-    ${GTEST_SOURCES}/gtest-death-test.cc
-    ${GTEST_SOURCES}/gtest_main.cc
-    ${GTEST_SOURCES}/gtest-filepath.cc
-    ${GTEST_SOURCES}/gtest-port.cc
-    ${GTEST_SOURCES}/gtest-test-part.cc
-    ${GTEST_SOURCES}/gtest-typed-test.cc
-)
+INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest/include)
 
 SET(EWKUnitTests_LIBRARIES
     ${JavaScriptCore_LIBRARY_NAME}
index a8909d7..32ea383 100644 (file)
@@ -16,6 +16,12 @@ ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
 SET(WTF_PLATFORM_EFL 1)
 
 # -----------------------------------------------------------------------------
+# Enable CTest for the public API unit testing
+# -----------------------------------------------------------------------------
+ENABLE_TESTING()
+SET(ENABLE_API_TESTS ON)
+
+# -----------------------------------------------------------------------------
 # Determine which font backend will be used
 # -----------------------------------------------------------------------------
 SET(ALL_FONT_BACKENDS freetype pango)
diff --git a/Source/cmake/gtest/CMakeLists.txt b/Source/cmake/gtest/CMakeLists.txt
new file mode 100644 (file)
index 0000000..eb123c6
--- /dev/null
@@ -0,0 +1,22 @@
+# This is an alternative CMakeLists.txt to the experimental one
+# shipped with the original package. It builds only the essential
+# for our tests. The WebKit version of gtest needs access to some
+# headers from WTF and JSC for configuration.
+
+INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest
+    ${THIRDPARTY_DIR}/gtest/include
+    ${JAVASCRIPTCORE_DIR}
+    ${WTF_DIR}
+)
+
+SET(GTEST_DIR "${THIRDPARTY_DIR}/gtest")
+
+ADD_LIBRARY(gtest
+    ${GTEST_DIR}/src/gtest.cc
+    ${GTEST_DIR}/src/gtest-death-test.cc
+    ${GTEST_DIR}/src/gtest-filepath.cc
+    ${GTEST_DIR}/src/gtest_main.cc
+    ${GTEST_DIR}/src/gtest-port.cc
+    ${GTEST_DIR}/src/gtest-test-part.cc
+    ${GTEST_DIR}/src/gtest-typed-test.cc
+)