JitRegister: fix VTune integration

This commit is contained in:
Tillmann Karras
2015-02-12 01:36:29 +01:00
parent 0e0a196a1c
commit 0ec48e0ec9
5 changed files with 48 additions and 11 deletions

View File

@ -2,6 +2,7 @@
# General setup
#
cmake_minimum_required(VERSION 2.8.8)
project(dolphin-emu)
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
option(TRY_X11 "Enables X11 Support" ON)
@ -20,6 +21,9 @@ option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
option(FASTLOG "Enable all logs" OFF)
option(OPROFILING "Enable profiling" OFF)
option(GDBSTUB "Enable gdb stub for remote debugging." OFF)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
option(VTUNE "Enable Intel VTune integration for JIT symbols." OFF)
endif()
if(APPLE)
option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
@ -45,7 +49,6 @@ if (APPLE)
endif()
endif()
endif()
project(dolphin-emu)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
set(DOLPHIN_IS_STABLE FALSE)
# Libraries to link
@ -335,6 +338,20 @@ if(GDBSTUB)
add_definitions(-DUSE_GDBSTUB)
endif(GDBSTUB)
if(VTUNE)
if(EXISTS "$ENV{VTUNE_AMPLIFIER_XE_2015_DIR}")
set(VTUNE_DIR "$ENV{VTUNE_AMPLIFIER_XE_2015_DIR}")
elseif(EXISTS "$ENV{VTUNE_AMPLIFIER_XE_2013_DIR}")
set(VTUNE_DIR "$ENV{VTUNE_AMPLIFIER_XE_2013_DIR}")
else()
message(ERROR "Could find neither VTUNE_AMPLIFIER_XE_2015_DIR nor VTUNE_AMPLIFIER_XE_2013_DIR.")
endif()
add_definitions(-DUSE_VTUNE)
include_directories("${VTUNE_DIR}/include")
list(APPEND LIBS "${VTUNE_DIR}/lib64/libjitprofiling.a")
list(APPEND LIBS "${VTUNE_DIR}/lib64/libittnotify.a")
endif(VTUNE)
if(ANDROID)
message("Building for Android")
add_definitions(-DANDROID)