Build system cleanups
authorPyry Haulos <phaulos@google.com>
Tue, 3 Feb 2015 18:48:09 +0000 (10:48 -0800)
committerPyry Haulos <phaulos@google.com>
Tue, 3 Feb 2015 18:48:09 +0000 (10:48 -0800)
 * Remove references to OpenCL support

 * Remove OpenCL-specific targets

 * Always enable EGL support in "default" target as EGL code doesn't
have any compile-time dependencies any more.

 * Remove DELIBS_DIR indirection as delibs is now always located under
framework/ directory.

Change-Id: I74e5eae2201c1bbd689fe86d377b603ba193bccc

CMakeLists.txt
targets/default/default.cmake
targets/dynamic_opencl/dynamic_opencl.cmake [deleted file]
targets/osx/osx.cmake
targets/system_opencl/system_opencl.cmake [deleted file]

index 2453628..4df4f6a 100644 (file)
@@ -2,16 +2,13 @@
 
 cmake_minimum_required(VERSION 2.6)
 
-# Paths to dependencies
-set(DELIBS_DIR "framework/delibs" CACHE STRING "Path to delibs (../delibs).")
-
 # dEQP Target.
 set(DEQP_TARGET "default" CACHE STRING "dEQP Target (default, android...)")
 
 project(dEQP-Core-${DEQP_TARGET})
 
-include(${DELIBS_DIR}/cmake/Defs.cmake NO_POLICY_SCOPE)
-include(${DELIBS_DIR}/cmake/CFlags.cmake)
+include(framework/delibs/cmake/Defs.cmake NO_POLICY_SCOPE)
+include(framework/delibs/cmake/CFlags.cmake)
 
 add_definitions(-DDE_ASSERT_FAILURE_CALLBACK)
 
@@ -33,9 +30,6 @@ set(DEQP_VG_LIBRARIES         )                               # VG libraries
 set(DEQP_SUPPORT_EGL           OFF)                    # Is EGL supported
 set(DEQP_EGL_LIBRARIES         )                               # EGL libraries
 
-set(DEQP_SUPPORT_OPENCL                OFF)                    # Is OpenCL supported
-set(DEQP_OPENCL_LIBRARIES      )                               # OpenCL libraries
-
 set(DEQP_PLATFORM_LIBRARIES    )                               # Other platform libraries
 
 set(DEQP_SUPPORT_OPENGL                OFF)                    # Is OpenGL supported on platform
@@ -45,12 +39,12 @@ set(DEQP_PLATFORM_COPY_LIBRARIES    )               # Libraries / binaries that need to be copie
 
 # Delibs include directories
 include_directories(
-       ${DELIBS_DIR}/debase
-       ${DELIBS_DIR}/decpp
-       ${DELIBS_DIR}/depool
-       ${DELIBS_DIR}/dethread
-       ${DELIBS_DIR}/deutil
-       ${DELIBS_DIR}/destream
+       framework/delibs/debase
+       framework/delibs/decpp
+       framework/delibs/depool
+       framework/delibs/dethread
+       framework/delibs/deutil
+       framework/delibs/destream
        )
 
 # Include target-specific definitions
@@ -91,8 +85,6 @@ message(STATUS "DEQP_SUPPORT_VG         = ${DEQP_SUPPORT_VG}")
 message(STATUS "DEQP_VG_LIBRARIES       = ${DEQP_VG_LIBRARIES}")
 message(STATUS "DEQP_SUPPORT_EGL        = ${DEQP_SUPPORT_EGL}")
 message(STATUS "DEQP_EGL_LIBRARIES      = ${DEQP_EGL_LIBRARIES}")
-message(STATUS "DEQP_SUPPORT_OPENCL     = ${DEQP_SUPPORT_OPENCL}")
-message(STATUS "DEQP_OPENCL_LIBRARIES   = ${DEQP_OPENCL_LIBRARIES}")
 message(STATUS "DEQP_SUPPORT_OPENGL     = ${DEQP_SUPPORT_OPENGL}")
 message(STATUS "DEQP_PLATFORM_LIBRARIES = ${DEQP_PLATFORM_LIBRARIES}")
 
@@ -119,10 +111,6 @@ if (DEQP_SUPPORT_EGL)
        add_definitions(-DDEQP_SUPPORT_EGL=1)
 endif ()
 
-if (DEQP_SUPPORT_OPENCL)
-       add_definitions(-DDEQP_SUPPORT_OPENCL=1)
-endif ()
-
 if (DEQP_SUPPORT_OPENGL)
        add_definitions(-DDEQP_SUPPORT_OPENGL=1)
 endif ()
@@ -156,10 +144,6 @@ if (DEQP_SUPPORT_EGL AND NOT DEFINED DEQP_EGL_LIBRARIES)
        add_definitions(-DDEQP_EGL_RUNTIME_LOAD=1)
 endif ()
 
-if (DEQP_SUPPORT_OPENCL AND NOT DEFINED DEQP_OPENCL_LIBRARIES)
-       message(FATAL_ERROR "Run-time loading of OpenCL is not supported (DEQP_OPENCL_LIBRARIES is not set)")
-endif ()
-
 # OpenGL is always loaded on run-time
 if (DEQP_SUPPORT_OPENGL)
        add_definitions(-DDEQP_OPENGL_RUNTIME_LOAD=1)
@@ -171,12 +155,12 @@ if (DE_COMPILER_IS_MSC)
 endif ()
 
 # delibs projects
-add_subdirectory(${DELIBS_DIR}/debase          debase)
-add_subdirectory(${DELIBS_DIR}/depool          depool)
-add_subdirectory(${DELIBS_DIR}/dethread                dethread)
-add_subdirectory(${DELIBS_DIR}/destream                destream)
-add_subdirectory(${DELIBS_DIR}/deutil          deutil)
-add_subdirectory(${DELIBS_DIR}/decpp           decpp)
+add_subdirectory(framework/delibs/debase)
+add_subdirectory(framework/delibs/depool)
+add_subdirectory(framework/delibs/dethread)
+add_subdirectory(framework/delibs/destream)
+add_subdirectory(framework/delibs/deutil)
+add_subdirectory(framework/delibs/decpp)
 
 # ExecServer
 add_subdirectory(execserver)
@@ -186,12 +170,6 @@ if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/executor)
        add_subdirectory(executor)
 endif ()
 
-if (DEQP_SUPPORT_OPENCL)
-       # We need to support all older CL1.x versions
-       add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_0_APIS)
-       add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
-endif ()
-
 # Test framework include directories
 include_directories(
        framework/common
index 02a1475..f08389c 100644 (file)
@@ -3,10 +3,11 @@ message("*** Default target")
 
 set(DEQP_TARGET_NAME   "Default")
 
-# OpenGL (ES) tests do not require any libraries or headers
+# OpenGL (ES) & EGL tests do not require any libraries or headers
 set(DEQP_SUPPORT_GLES2 ON)
 set(DEQP_SUPPORT_GLES3 ON)
 set(DEQP_SUPPORT_OPENGL        ON)
+set(DEQP_SUPPORT_EGL   ON)
 
 # For static linking
 find_library(GLES2_LIBRARY             NAMES libGLESv2 GLESv2)
@@ -18,6 +19,7 @@ find_path(EGL_INCLUDE_PATH            EGL/egl.h)
 
 if (GLES2_LIBRARY AND GLES2_INCLUDE_PATH)
        set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+       include_directories(${GLES2_INCLUDE_PATH})
 endif ()
 
 if (GLES2_LIBRARY AND GLES3_INCLUDE_PATH)
@@ -26,24 +28,10 @@ if (GLES2_LIBRARY AND GLES3_INCLUDE_PATH)
 endif ()
 
 if (EGL_LIBRARY AND EGL_INCLUDE_PATH)
-       set(DEQP_SUPPORT_EGL            ON)
-       set(DEQP_EGL_LIBRARIES          ${EGL_LIBRARY})
+       set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
        include_directories(${EGL_INCLUDE_PATH})
 endif ()
 
-# OpenCL support?
-find_library(OPENCL_LIBRARY            NAMES libOpenCL OpenCL)
-find_path(OPENCL_INCLUDE_PATH  CL/cl.h OpenCL/cl.h)
-
-message("OPENCL_LIBRARY = ${OPENCL_LIBRARY}")
-message("OPENCL_INCLUDE_PATH = ${OPENCL_INCLUDE_PATH}")
-
-if (OPENCL_LIBRARY AND OPENCL_INCLUDE_PATH)
-       set(DEQP_SUPPORT_OPENCL         ON)
-       set(DEQP_OPENCL_LIBRARIES       ${OPENCL_LIBRARY})
-       include_directories(${OPENCL_INCLUDE_PATH})
-endif ()
-
 # X11 / GLX?
 if (DE_OS_IS_UNIX)
        find_package(X11)
diff --git a/targets/dynamic_opencl/dynamic_opencl.cmake b/targets/dynamic_opencl/dynamic_opencl.cmake
deleted file mode 100644 (file)
index 4a57246..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Dynamic OpenCL
-
-set(DEQP_TARGET_NAME "OpenCL (run-time linking)")
-
-set(DEQP_SUPPORT_OPENGL                ON)
-set(DEQP_SUPPORT_OPENCL                ON)
-
-# Headers
-include_directories(framework/opencl/inc)
-
-# Library
-add_subdirectory(wrappers/opencl_dynamic)
-set(DEQP_OPENCL_LIBRARIES OpenCL)
index afadd89..c11650e 100644 (file)
@@ -3,20 +3,7 @@
 set(DEQP_TARGET_NAME   "OS X")
 
 set(DEQP_SUPPORT_OPENGL        ON)
-set(DEQP_SUPPORT_OPENCL        ON)
 
 find_package(OpenGL REQUIRED)
 set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES})
 include_directories(${OPENGL_INCLUDE_DIRS})
-
-find_path(OPENCL_INC NAMES CL/cl.h OpenCL/cl.h)
-if (NOT OPENCL_INC)
-       message(FATAL_ERROR "Can't find OpenCL headers")
-endif ()
-include_directories(${OPENCL_INC})
-
-find_library(OPENCL_LIB NAMES OpenCL libOpenCL)
-set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIB})
-
-# Apple versions of cl headers do not respect CL_USE_DEPRECATED_OPENCL_1_X_APIs
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
diff --git a/targets/system_opencl/system_opencl.cmake b/targets/system_opencl/system_opencl.cmake
deleted file mode 100644 (file)
index ee35e30..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# System OpenCL
-
-set(DEQP_TARGET_NAME "System OpenCL")
-
-set(DEQP_SUPPORT_GLES2         OFF)
-set(DEQP_SUPPORT_GLES1         OFF)
-set(DEQP_SUPPORT_OPENVG                OFF)
-set(DEQP_SUPPORT_EGL           OFF)
-set(DEQP_SUPPORT_OPENCL                ON)
-
-# Headers
-find_path(OPENCL_INC NAMES CL/cl.h OpenCL/cl.h)
-if (NOT OPENCL_INC)
-       message(FATAL_ERROR "Can't find OpenCL headers")
-endif ()
-include_directories(${OPENCL_INC})
-
-# Libraries
-find_library(OPENCL_LIB NAMES OpenCL libOpenCL)
-set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIB})