@@ -16,18 +16,27 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wstrict-prototypes -Wall -W
16
16
set (CMAKE_C_FLAGS_RELEASE "-Os" )
17
17
18
18
include (../scorep_plugin_common/FindScorep.cmake)
19
- if (SCOREP_FOUND)
19
+ if ( SCOREP_FOUND )
20
20
include_directories (${SCOREP_INCLUDE_DIRS} )
21
21
link_directories (${SCOREP_LIBRARY_DIRS} )
22
22
SET (CMAKE_INSTALL_PREFIX ${SCOREP_ROOT_PATH} CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
23
23
else ()
24
24
message (SEND_ERROR "Scorep was not found but is required!" )
25
25
endif ()
26
26
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
+
27
36
# find libenopt
28
37
find_path (ENOPT_INC_DIR NAMES enoptC.h defines.h HINTS ${ENOPT_INC} ${ENOPT_DIR} /include DOC "Path to enoptC.h" )
29
38
if ( ENOPT_INC_DIR )
30
- if (ENOPT_STATIC)
39
+ if ( ENOPT_STATIC )
31
40
message ("Using static libenopt" )
32
41
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" )
33
42
set (LIBENOPT_NAME libenopt.a)
@@ -53,21 +62,21 @@ add_library(EnoptTP SHARED EnoptTP.c Shared.c)
53
62
target_link_libraries (EnoptMP pthread ${LIBENOPT_NAME} )
54
63
target_link_libraries (EnoptTP pthread ${LIBENOPT_NAME} )
55
64
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)
57
66
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