X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=CMakeLists.txt;h=7c55f765740d27d08ab1ca961a23338755977aff;hp=dc59753ef3ec470deda54961c545a21998242d6d;hb=8956eb531059e5f3012db55bede18b44638fa23a;hpb=570163bfc3c84b6b553610c888c1f75657ed6ca9 diff --git a/CMakeLists.txt b/CMakeLists.txt index dc59753..7c55f76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,24 @@ cmake_minimum_required (VERSION 2.8) + +# Use clang on MacOSX. gcc doesn't support __thread key, and Apple has +# abandoned it for clang. This must be done before the project is defined. +if (APPLE) + set (CMAKE_C_COMPILER "clang") + set (CMAKE_CXX_COMPILER "clang++") +endif () + + project (apitrace-tests) find_path (APITRACE_SOURCE_DIR NAMES cmake/FindDirectX.cmake PATHS .. ../.. DOC "apitrace source tree" NO_DEFAULT_PATH) if (NOT EXISTS ${APITRACE_SOURCE_DIR}) - message (SEND_ERROR "Please specify path to apitrace source tree via APITRACE_SOURCE_DIR") + message (WARNING "Please specify path to apitrace source tree via APITRACE_SOURCE_DIR") endif () find_program (APITRACE_EXECUTABLE NAMES apitrace PATHS ${APITRACE_SOURCE_DIR} DOC "apitrace executable") if (NOT EXISTS ${APITRACE_EXECUTABLE}) - message (SEND_ERROR "Please specify path to apitrace executable via APITRACE_EXECUTABLE") + message (WARNING "Please specify path to apitrace executable via APITRACE_EXECUTABLE") endif () include (FindPkgConfig) @@ -32,7 +41,7 @@ find_package (GLEW) if (WIN32) find_package (DirectX) -else () +elseif (PKG_CONFIG_FOUND) pkg_check_modules (EGL egl) pkg_check_modules (GLESV1 glesv1_cm) pkg_check_modules (GLESV2 glesv2) @@ -81,3 +90,18 @@ enable_testing() add_subdirectory (apps) add_subdirectory (traces) +# FIXME: The tests in the cli directory are intended to be high-level +# tests of the apitrace command-line interface which would ideally be +# portable across all platforms. However, these tests all rely on +# doing image comparisons and the current implementation of the +# "apitrace dump-images" command relies on direct invocation of the +# glretrace command. +# +# Someday, we should have more unified commands for replaying traces, +# dumping images, etc. At that point these cli tests should be usable +# with all targets so that we can drop the "if (OPENGL_FOUND)" +# condition here. +if (OPENGL_FOUND) + add_subdirectory (cli) + add_subdirectory (trim_stress) +endif ()