Skip to content

Commit 5eaa1b9

Browse files
author
Robert Mijaković
committed
Adds search for the tuning substrate plugin.
1 parent 6002556 commit 5eaa1b9

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

CMakeLists.txt

+28-19
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,27 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wstrict-prototypes -Wall -W
1616
set(CMAKE_C_FLAGS_RELEASE "-Os")
1717

1818
include(../scorep_plugin_common/FindScorep.cmake)
19-
if(SCOREP_FOUND)
19+
if( SCOREP_FOUND )
2020
include_directories(${SCOREP_INCLUDE_DIRS})
2121
link_directories(${SCOREP_LIBRARY_DIRS})
2222
SET(CMAKE_INSTALL_PREFIX ${SCOREP_ROOT_PATH} CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
2323
else()
2424
message(SEND_ERROR "Scorep was not found but is required!")
2525
endif()
2626

27+
include(../scorep_plugin_common/FindTuningSubstrate.cmake)
28+
if( TUNING_SUBSTRATE_FOUND )
29+
include_directories(${TUNING_SUBSTRATE_INCLUDE_DIRS})
30+
link_directories(${TUNING_SUBSTRATE_LIBRARY_DIRS})
31+
SET(CMAKE_INSTALL_PREFIX ${TUNING_SUBSTRATE_ROOT_PATH} CACHE PATCH "Install path prefix, prepended onto install directories." FORCE)
32+
else()
33+
message(SEND_ERROR "Tuning substrate plugin was not found but is required!")
34+
endif()
35+
2736
# find libenopt
2837
find_path(ENOPT_INC_DIR NAMES enoptC.h defines.h HINTS ${ENOPT_INC} ${ENOPT_DIR}/include DOC "Path to enoptC.h")
2938
if( ENOPT_INC_DIR )
30-
if(ENOPT_STATIC)
39+
if( ENOPT_STATIC )
3140
message("Using static libenopt")
3241
message("Linking might fail if you use the static version of libenopt and your library is not compiled with -fPIC. In this case use the cmake flag -DENOPT_STATIC=OFF")
3342
set(LIBENOPT_NAME libenopt.a)
@@ -53,21 +62,21 @@ add_library(EnoptTP SHARED EnoptTP.c Shared.c)
5362
target_link_libraries(EnoptMP pthread ${LIBENOPT_NAME})
5463
target_link_libraries(EnoptTP pthread ${LIBENOPT_NAME})
5564

56-
install(TARGETS EnoptMP EnoptTP LIBRARY DESTINATION ${SCOREP_ROOT_PATH}/lib/plugins)
65+
install(TARGETS EnoptMP EnoptTP LIBRARY DESTINATION ${TUNING_SUBSTRATE_ROOT_PATH}/lib/plugins)
5766

58-
message ("SCOREP_FOUND =${SCOREP_FOUND}")
59-
message ("SCOREP_ROOT_PATH =${SCOREP_ROOT_PATH}")
60-
message ("SCOREP_INCLUDE_DIRS =${SCOREP_INCLUDE_DIRS}")
61-
message ("SCOREP_LIBRARY_DIRS =${SCOREP_LIBRARY_DIRS}")
62-
message ("ENOPT_STATIC =${ENOPT_STATIC}")
63-
message ("ENOPT_DIR =${ENOPT_DIR}")
64-
message ("ENOPT_INC =${ENOPT_INC}")
65-
message ("ENOPT_INC_DIR =${ENOPT_INC_DIR}")
66-
message ("ENOPT_LIB =${ENOPT_LIB}")
67-
message ("ENOPT_LIB_DIR =${ENOPT_LIB_DIR}")
68-
message ("LIBENOPT_NAME =${LIBENOPT_NAME}")
69-
message ("CMAKE_C_FLAGS =${CMAKE_C_FLAGS}")
70-
message ("CMAKE_C_FLAGS_DEBUG =${CMAKE_C_FLAGS_DEBUG}")
71-
message ("CMAKE_C_FLAGS_RELEASE =${CMAKE_C_FLAGS_RELEASE}")
72-
message ("CMAKE_INSTALL_PREFIX =${CMAKE_INSTALL_PREFIX}")
73-
message ("CMAKE_SOURCE_DIR =${CMAKE_SOURCE_DIR}")
67+
message ("SCOREP_FOUND =${SCOREP_FOUND}")
68+
message ("SCOREP_ROOT_PATH =${SCOREP_ROOT_PATH}")
69+
message ("SCOREP_INCLUDE_DIRS =${SCOREP_INCLUDE_DIRS}")
70+
message ("SCOREP_LIBRARY_DIRS =${SCOREP_LIBRARY_DIRS}")
71+
message ("TUNING_SUBSTRATE_FOUND =${TUNING_SUBSTRATE_FOUND}")
72+
message ("TUNING_SUBSTRATE_ROOT_PATH =${TUNING_SUBSTRATE_ROOT_PATH}")
73+
message ("TUNING_SUBSTRATE_INCLUDE_DIRS =${TUNING_SUBSTRATE_INCLUDE_DIRS}")
74+
message ("TUNING_SUBSTRATE_LIBRARY_DIRS =${TUNING_SUBSTRATE_LIBRARY_DIRS}")
75+
message ("ENOPT_STATIC =${ENOPT_STATIC}")
76+
message ("ENOPT_DIR =${ENOPT_DIR}")
77+
message ("ENOPT_INC =${ENOPT_INC}")
78+
message ("ENOPT_INC_DIR =${ENOPT_INC_DIR}")
79+
message ("ENOPT_LIB =${ENOPT_LIB}")
80+
message ("ENOPT_LIB_DIR =${ENOPT_LIB_DIR}")
81+
message ("LIBENOPT_NAME =${LIBENOPT_NAME}")
82+
message ("CMAKE_SOURCE_DIR =${CMAKE_SOURCE_DIR}")

0 commit comments

Comments
 (0)