[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 70623e418bc27ff2401ff2bedd6f8be07119b90e..90ff03ab78add92e685a43c5e6238652e13e3ada 100644 (file)
@@ -8,11 +8,6 @@ IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
     SET(CMAKE_BUILD_TYPE Release)
 ENDIF ()
 
-# -----------------------------------------------------------------------------
-# Enable CTest for the public API unit testing
-# -----------------------------------------------------------------------------
-ENABLE_TESTING()
-
 # -----------------------------------------------------------------------------
 # Default library type
 # -----------------------------------------------------------------------------
index 54f5f6a9a7e262a2920217a18838f94180b10199..342a41adad7945dbb2b9b716a6a2514a4dd68926 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 b649977f829694125781d81f1ea505d92fc37dd9..fb3092aafb26efc031539ece5edbe0af50454f93 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 6708cc45bad044f3e54f7f26fe5867334993ab81..0ff775115d378994fadb02da4757dada42d57d94 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 368383a3eb5c344ce5047c220a37cf15667500ef..e3bd447ef11a1f2d0fbbe7d50b32bc216d48150d 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 a8909d76a8a2d75c547f01e69f1117b980106f46..32ea38363b5a8c1a8c90f07e141a62019ea6cea6 100644 (file)
@@ -15,6 +15,12 @@ ADD_DEFINITIONS(-DBUILDING_EFL__=1)
 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
 # -----------------------------------------------------------------------------
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
+)