From dd6a50538020e5a0b1bd54e6a9b0f9dfe63e4f8f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 21 Apr 2018 17:37:17 +0100 Subject: [PATCH] CMake: update and simplify VTune integration --- CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78e4f5e170..77b9913253 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ if(APPLE) endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - option(VTUNE "Enable Intel VTune integration for JIT symbols." OFF) + option(ENABLE_VTUNE "Enable Intel VTune integration for JIT code." OFF) if(NOT ANDROID) option(ENABLE_EVDEV "Enables the evdev controller backend" ON) @@ -342,14 +342,8 @@ if(GDBSTUB) add_definitions(-DUSE_GDBSTUB) endif() -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() +if(ENABLE_VTUNE) + set(VTUNE_DIR "/opt/intel/vtune_amplifier") add_definitions(-DUSE_VTUNE) include_directories("${VTUNE_DIR}/include") set(VTUNE_LIBRARIES