Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
ref #3 modified CMakeLists.txt to find PAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
lanice committed Jun 25, 2013
1 parent fd02c7d commit aa12476
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR})


set(CMAKE_BUILD_TYPE Release)

project(bencho C CXX)

find_library(PAPI NAMES papi)

if ((NOT ${PAPI}) AND (${CMAKE_BUILD_TYPE} MATCHES "RELEASE.*"))
if ((PAPI-NOTFOUND) AND (${CMAKE_BUILD_TYPE} MATCHES "RELEASE.*"))
MESSAGE(FATAL_ERROR "cannot set up release build without PAPI!")
endif ()

Expand Down Expand Up @@ -54,10 +56,8 @@ src/resultFileHelper.cpp)

set(bencho_CXX_FLAGS "-std=c++0x")

if (${PAPI})
set(bencho_CXX_FLAGS "${bencho_CXX_FLAGS} -D USE_PAPI_TRACE" CACHE_STRING "bencho
compile flags")
add_definitions(USE_PAPI_TRACE)
if (NOT PAPI-NOTFOUND)
add_definitions(-DUSE_PAPI_TRACE)
target_link_libraries(bencho ${PAPI})
endif()

Expand Down

0 comments on commit aa12476

Please sign in to comment.