mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-03 09:18:10 +02:00
refactoring directory structure and rename to .hpp
This commit is contained in:
@@ -2,25 +2,28 @@
|
||||
|
||||
set(MATTERHORN_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MatterhornApp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/SPICommunication.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HelperFunctions.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/communication/SPICommunication.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/HelperFunctions.cpp
|
||||
)
|
||||
|
||||
set(MATTERHORN_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/communication
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/defs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../slsSupportLib/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../slsDetectorServer_cpp/include
|
||||
)
|
||||
|
||||
if(SLS_USE_SIMULATOR)
|
||||
list(APPEND MATTERHORN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/VirtualMatterhornServer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/include/VirtualMatterhornServerImpl.cpp)
|
||||
list(APPEND MATTERHORN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/VirtualMatterhornServer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/VirtualMatterhornServerImpl.cpp)
|
||||
|
||||
set(MATTERHORN_SERVER_HEADER "VirtualMatterhornServer.h")
|
||||
set(MATTERHORN_SERVER_HEADER "VirtualMatterhornServer.hpp")
|
||||
|
||||
add_executable(matterhornDetectorServer_virtual ${MATTERHORN_SOURCES})
|
||||
|
||||
target_compile_definitions(matterhornDetectorServer_virtual PRIVATE
|
||||
MATTERHORN_SERVER_HEADER=<VirtualMatterhornServer.h>
|
||||
MATTERHORN_SERVER_HEADER=<VirtualMatterhornServer.hpp>
|
||||
MATTERHORN_SERVER_CLASS=VirtualMatterhornServer
|
||||
)
|
||||
|
||||
@@ -46,7 +49,7 @@ if(SLS_USE_SIMULATOR)
|
||||
endif() # maybe better to have a else if build with simulators on one always uses the virtual server in MatterhornApp
|
||||
|
||||
if(SLS_USE_MATTERHORN)
|
||||
list(APPEND MATTERHORN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/MatterhornServer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/include/MatterhornServerImpl.cpp)
|
||||
list(APPEND MATTERHORN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/MatterhornServer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/MatterhornServerImpl.cpp)
|
||||
|
||||
if(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_TOOLCHAIN_FILE STREQUAL "")
|
||||
set(CROSS_COMPILE TRUE)
|
||||
@@ -68,7 +71,7 @@ if(SLS_USE_MATTERHORN)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(matterhornDetectorServer PRIVATE
|
||||
MATTERHORN_SERVER_HEADER=<MatterhornServer.h>
|
||||
MATTERHORN_SERVER_HEADER=<MatterhornServer.hpp>
|
||||
MATTERHORN_SERVER_CLASS=MatterhornServer
|
||||
)
|
||||
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
#pragma once
|
||||
#include "DetectorServer.h"
|
||||
#include "TCPInterface.h"
|
||||
#include "DetectorServer.hpp"
|
||||
#include "TCPInterface.hpp"
|
||||
#include "fmt/format.h"
|
||||
#include "helpers/Helpers.hpp"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/network_utils.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
#include "ArmBusCommunication.hpp"
|
||||
#include "DetectorServerImpl.hpp"
|
||||
#include "HelperFunctions.hpp"
|
||||
#include "MatterhornDefs.hpp"
|
||||
#include "MemoryModel.hpp"
|
||||
#include "RegisterDefs.hpp"
|
||||
#include "SPICommunication.h"
|
||||
#include "communication/SPICommunication.hpp"
|
||||
#include "defs/MatterhornDefs.hpp"
|
||||
#include "defs/RegisterDefs.hpp"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "utils/HelperFunctions.hpp"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "CommandLineOptions.h"
|
||||
#include "CommandLineOptions.hpp"
|
||||
#include MATTERHORN_SERVER_HEADER
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "MatterhornServer.h"
|
||||
#include "MatterhornServer.hpp"
|
||||
|
||||
namespace sls {
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "BaseMatterhornServer.h"
|
||||
#include "BaseMatterhornServer.hpp"
|
||||
#include "MatterhornServerImpl.hpp"
|
||||
#include "TCPInterface.h"
|
||||
#include "TCPInterface.hpp"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "VirtualMatterhornServer.h"
|
||||
#include "VirtualMatterhornServer.hpp"
|
||||
#include "helpers/Defs.hpp"
|
||||
#include "helpers/Helpers.hpp"
|
||||
#include "sls/ToString.h"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
#include "BaseMatterhornServer.h"
|
||||
#include "BaseMatterhornServer.hpp"
|
||||
#include "VirtualMatterhornServerImpl.hpp"
|
||||
|
||||
namespace sls {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "SPICommunication.h"
|
||||
#include "SPICommunication.hpp"
|
||||
#include <algorithm>
|
||||
#include <fcntl.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#include "MatterhornDefs.hpp"
|
||||
#include "MemoryModel.hpp"
|
||||
#include "SPIRegisterDefs.hpp"
|
||||
#include "SPIRegisterHelperStructs.hpp"
|
||||
#include "defs/MatterhornDefs.hpp"
|
||||
#include "defs/SPIRegisterDefs.hpp"
|
||||
#include "fmt/format.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
target_sources(tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-HelperFunctions.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../src/HelperFunctions.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../src/utils/HelperFunctions.cpp
|
||||
)
|
||||
|
||||
target_include_directories(tests
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>")
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../src/utils>")
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "DetectorServerImpl.hpp"
|
||||
#include "TCPInterface.h"
|
||||
#include "TCPInterface.hpp"
|
||||
#include "helpers/Helpers.hpp"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/network_utils.h"
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "CommandLineOptions.h"
|
||||
#include "CommandLineOptions.hpp"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "TCPInterface.h"
|
||||
#include "TCPInterface.hpp"
|
||||
|
||||
#include "fmt/format.h"
|
||||
#include "sls/logger.h"
|
||||
|
||||
Reference in New Issue
Block a user