Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for likwid #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ ENDIF()
DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(polydeal)

FIND_LIBRARY(LIKWID likwid HINTS $ENV{LIKWID_LIB})

IF(LIKWID)
MESSAGE("Configuration with LIKWID")
ELSE()
MESSAGE("Configuration without LIKWID")
ENDIF()

# Enable testing and descent into tests/ subdirectory:
ENABLE_TESTING()
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
Expand Down
14 changes: 12 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@ FOREACH(_build_type ${_d2_build_types})
# Add suffix for debug
set(testname ${exename}${_p})
message("-- Configuring executable ${testname} (${testsourcefile})")

add_executable( ${testname} ${testsourcefile} )

# Make sure YourLib is linked to each app
target_link_libraries(${testname} ${_lib})
string(FIND ${testname} "likwid" REQUIRES_LIKWID)
if(REQUIRES_LIKWID)
if(LIKWID)
message("-- Configuring executable ${testname} (${testsourcefile}) with LIKWID")
TARGET_COMPILE_DEFINITIONS(${testname} PUBLIC LIKWID_PERFMON)
TARGET_INCLUDE_DIRECTORIES(${testname} PUBLIC $ENV{LIKWID_INCLUDE})
TARGET_LINK_LIBRARIES(${testname} ${LIKWID})
endif()
endif()

DEAL_II_SETUP_TARGET(${testname} ${_BUILD_TYPE})
INSTALL(TARGETS ${testname})
set(testname ${testname}${_p})
Expand Down
Loading
Loading