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)