Commit 51236fd4 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Port to Conda / GCC 7.2:

* slsDetectorPackage: add dependency on NUMA, do not compile GUI
* Fix RegEx buffer bug in getIrqList
* Fix #13
parent ce2ffd6d
......@@ -23,13 +23,15 @@
############################################################################
set(NAME slsdetector)
find_package(Numa REQUIRED)
set(SLS_DETECTOR_DIR slsDetectorPackage)
set(SLS_DETECTOR_SW ${SLS_DETECTOR_DIR}/slsDetectorSoftware)
set(SLS_DETECTOR_RECV ${SLS_DETECTOR_DIR}/slsReceiverSoftware)
option (USE_TEXTCLIENT "Text Client" ON)
option (USE_RECEIVER "Receiver" ON)
option (USE_GUI "GUI" ON)
option (USE_GUI "GUI" OFF)
add_subdirectory(${SLS_DETECTOR_DIR})
......@@ -53,11 +55,15 @@ target_include_directories(lima${NAME} PUBLIC
${SLS_DETECTOR_SW}/slsDetectorServer
${SLS_DETECTOR_SW}/slsDetectorAnalysis
${SLS_DETECTOR_SW}/slsReceiverInterface
${SLS_DETECTOR_RECV}/include)
${SLS_DETECTOR_RECV}/include
${NUMA_INCLUDE_DIR})
message("NUMA_LIBRARY=" ${NUMA_LIBRARY})
target_link_libraries(lima${NAME}
limacore
slsDetectorShared slsReceiverShared zmq numa)
slsDetectorShared slsReceiverShared zmq
${NUMA_LIBRARY})
limatools_set_library_soversion(lima${NAME} VERSION)
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)
......
# Module for locating libnuma
#
# Read-only variables:
# NUMA_FOUND
# Indicates that the library has been found.
#
# NUMA_INCLUDE_DIR
# Points to the libnuma include directory.
#
# NUMA_LIBRARY_DIR
# Points to the directory that contains the libraries.
# The content of this variable can be passed to link_directories.
#
# NUMA_LIBRARY
# Points to the libnuma that can be passed to target_link_libararies.
#
# Copyright (c) 2015 Steve Borho
include(FindPackageHandleStandardArgs)
find_path(NUMA_ROOT_DIR
NAMES include/numa.h
PATHS ENV NUMA_ROOT
DOC "NUMA root directory")
find_path(NUMA_INCLUDE_DIR
NAMES numa.h
HINTS ${NUMA_ROOT_DIR}
PATH_SUFFIXES include
DOC "NUMA include directory")
find_library(NUMA_LIBRARY
NAMES numa
HINTS ${NUMA_ROOT_DIR}
DOC "NUMA library")
if (NUMA_LIBRARY)
get_filename_component(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH)
endif()
mark_as_advanced(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY)
find_package_handle_standard_args(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY)
Subproject commit 56b6740a2d681690f5243ba893f4e169aa840562
Subproject commit 66d5db3476ecca170e0cddee1503b8d515af607f
......@@ -275,7 +275,6 @@ void CPUAffinity::applyWithTaskset(pid_t task, bool incl_threads) const
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR3(*this, task, incl_threads);
uint64_t mask = getMask();
SystemCmd taskset("taskset");
const char *all_tasks_opt = incl_threads ? "-a " : "";
taskset.args() << all_tasks_opt << "-p " << *this << " " << task;
......@@ -428,9 +427,10 @@ IntList IrqMgr::getIrqList()
while (proc_ints) {
char buffer[1024];
proc_ints.getline(buffer, sizeof(buffer));
DEB_TRACE() << DEB_VAR1(string(buffer));
string s = buffer;
DEB_TRACE() << DEB_VAR1(s);
RegEx::FullNameMatchType match;
if (!int_re.matchName(buffer, match))
if (!int_re.matchName(s, match))
continue;
int irq;
istringstream(match["irq"]) >> irq;
......@@ -700,7 +700,7 @@ bool NetDevRxQueueMgr::applyWithFile(const string& fname, CPUAffinity a)
aff_file << os.str();
if (aff_file)
aff_file.close();
bool file_ok = aff_file;
bool file_ok(aff_file);
DEB_RETURN() << DEB_VAR1(file_ok);
return file_ok;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment