cmake configurations
* pulseblaster kernel module now building with cmake * each driver has own CMakeLists.txt
This commit is contained in:
parent
acf0d04de2
commit
e73407f64c
@ -3,46 +3,7 @@ project(damaris_backends)
|
||||
|
||||
include(FindPkgConfig)
|
||||
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(SOURCE_FILES
|
||||
|
||||
machines/berta.cpp
|
||||
machines/bg_backend.cpp
|
||||
machines/birgit.cpp
|
||||
machines/deuteron_backend.cpp
|
||||
machines/dummycore.cpp
|
||||
machines/fc1_backend.cpp
|
||||
machines/fc1_digital_backend.cpp
|
||||
machines/fc1_vierkanal_backend.cpp
|
||||
machines/fc1neu_backend.cpp
|
||||
machines/fc2_backend.cpp
|
||||
machines/fc2_backend_AD5791.cpp
|
||||
machines/general.cpp
|
||||
machines/hardware.cpp
|
||||
machines/hardware.h
|
||||
machines/magnexgrad_backend.cpp
|
||||
machines/magnexgrad_backend_dds.cpp
|
||||
machines/Mobile_wo_sync_backend.cpp
|
||||
machines/Mobilecore.cpp
|
||||
machines/NQRcore.cpp
|
||||
machines/pb_radio_processor_g_backend.cpp
|
||||
machines/pb_radio_processor_g_backend.h
|
||||
machines/PFGcore.cpp
|
||||
machines/pulseblaster_only.cpp
|
||||
tests/stefan/result.hpp
|
||||
tests/stefan/tcore.cpp
|
||||
tests/stefan/tcore.h
|
||||
tests/stefan/testmain.cpp
|
||||
tests/stefan/tjob.cpp
|
||||
tests/stefan/tjob.h
|
||||
tests/iterator_insert_test.cpp
|
||||
tests/state_iterate_test.cpp
|
||||
tests/state_read_test.cpp
|
||||
tests/stopwatch_test.cpp
|
||||
tests/xml_result_test.cpp
|
||||
tools/add_endline.cpp
|
||||
tools/restart_core.cpp)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow -Wall -O0 -g -DSPC_DEBUG=0")
|
||||
|
||||
|
||||
find_package(EXPAT REQUIRED)
|
||||
@ -54,6 +15,7 @@ pkg_check_modules (XERCES xerces-c REQUIRED)
|
||||
include_directories (. ${GLIB2_INCLUDE_DIRS} ${XERCES_INCLUDE_DIRS})
|
||||
link_directories (${GLIB2_LIBRARY_DIRS} ${XERCES_LIBRARY_DIRS})
|
||||
|
||||
|
||||
add_subdirectory(core)
|
||||
#add_subdirectory(doc)
|
||||
add_subdirectory(drivers)
|
||||
|
@ -12,6 +12,7 @@ set(core_src_files
|
||||
xml_result.cpp
|
||||
xml_states.cpp
|
||||
)
|
||||
|
||||
find_package(EXPAT REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
@ -23,6 +24,6 @@ link_directories(${XERCES_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS})
|
||||
|
||||
|
||||
# https://cmake.org/Wiki/CMake/Tutorials/Object_Library
|
||||
add_library(core STATIC ${core_src_files})
|
||||
add_library(core ${core_src_files})
|
||||
target_link_libraries(core ${XERCES_LIBRARIES} expat)
|
||||
|
||||
|
@ -1,93 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(FindPkgConfig)
|
||||
|
||||
set(AD5791_src_files
|
||||
DAC-AD5791/AD5791.cpp
|
||||
)
|
||||
|
||||
set(Datel_src_files
|
||||
Datel-PCI416/Datel-PCI416.cpp
|
||||
)
|
||||
|
||||
set(dummy_src_files
|
||||
dummy/dummy.cpp
|
||||
dummy/temperature_dummy.cpp
|
||||
)
|
||||
|
||||
#set(Eurotherm_src_files
|
||||
# Eurotherm-2000Series/control.cpp
|
||||
# Eurotherm-2000Series/Eurotherm-2000Series.cpp
|
||||
# Eurotherm-2000Series/gnuplot_output.cpp
|
||||
# Eurotherm-2000Series/test.cpp
|
||||
#)
|
||||
|
||||
set(PTS_src_files
|
||||
PTS-Synthesizer/PTS.cpp
|
||||
PTS-Synthesizer/PTS_test.cpp
|
||||
)
|
||||
|
||||
set(M2i40xx_src_files
|
||||
Spectrum-M2i40xxSeries/GatedData.cpp
|
||||
Spectrum-M2i40xxSeries/Spectrum-M2i40xxSeries.cpp
|
||||
# Spectrum-M2i40xxSeries/test.cpp
|
||||
)
|
||||
|
||||
set(MI40xx_src_files
|
||||
Spectrum-MI40xxSeries/GatedData.cpp
|
||||
# Spectrum-MI40xxSeries/hw_test_extclock.cpp
|
||||
# Spectrum-MI40xxSeries/hw_test_intclock.cpp
|
||||
Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp
|
||||
# Spectrum-MI40xxSeries/test.cpp
|
||||
)
|
||||
|
||||
set(PB_src_files
|
||||
# SpinCore-PulseBlaster/pulseblaster.c
|
||||
# SpinCore-PulseBlaster/pulseblaster_test.cpp
|
||||
# SpinCore-PulseBlaster/PulseBlasterProgram.cpp
|
||||
SpinCore-PulseBlaster/SpinCore-PulseBlaster.cpp
|
||||
# SpinCore-PulseBlaster/TestCase.cpp
|
||||
)
|
||||
|
||||
set(PB24_src_files
|
||||
SpinCore-PulseBlaster24Bit/SpinCore-PulseBlaster24Bit.cpp
|
||||
# SpinCore-PulseBlaster24Bit/test.cpp
|
||||
)
|
||||
|
||||
set(PBDDS_src_files
|
||||
SpinCore-PulseBlasterDDSIII/SpinCore-PulseBlasterDDSIII.cpp
|
||||
# SpinCore-PulseBlasterDDSIII/test.cpp
|
||||
)
|
||||
|
||||
set(DAC20_src_files
|
||||
Tecmag-DAC20/DAC20.cpp
|
||||
# Tecmag-DAC20/DAC_test.cpp
|
||||
)
|
||||
|
||||
set(tiepie_src_files
|
||||
TiePie-HS3/HS3test.cpp
|
||||
TiePie-HS3/TiePie-HS3.cpp
|
||||
TiePie-HS3/tiepie.cpp
|
||||
)
|
||||
|
||||
|
||||
include_directories(..)
|
||||
# https://cmake.org/Wiki/CMake/Tutorials/Object_Library
|
||||
add_library(AD5791 STATIC ${AD5791_src_files})
|
||||
add_library(tempcont tempcont.cpp)
|
||||
#add_library(Datel STATIC ${Datel_src_files})
|
||||
add_library(dummy STATIC ${dummy_src_files})
|
||||
add_subdirectory(DAC-AD5791)
|
||||
add_subdirectory(dummy)
|
||||
add_subdirectory(Eurotherm-2000Series)
|
||||
add_subdirectory(PTS-Synthesizer)
|
||||
add_subdirectory(Spectrum-M2i40xxSeries)
|
||||
#add_library(Spectrum_M2i40xxSeries STATIC ${M2i40xx_src_files})
|
||||
add_library(Spectrum_MI40xxSeries STATIC ${MI40xx_src_files})
|
||||
add_subdirectory(Spectrum-MI40xxSeries)
|
||||
add_subdirectory(SpinCore-PulseBlaster)
|
||||
add_subdirectory(SpinCore-PulseBlaster24Bit)
|
||||
add_subdirectory(SpinCore-PulseBlasterDDSIII)
|
||||
add_subdirectory(Tecmag-DAC20)
|
||||
add_library(tempcont tempcont.cpp)
|
||||
|
||||
#add_library(PB STATIC ${general_src_files} SpinCore-PulseBlaster/SpinCore-PulseBlaster.cpp)
|
||||
#add_library(PB_PROG STATIC ${general_src_files} SpinCore-PulseBlaster/PulseBlasterProgram.cpp)
|
||||
add_library(PB24 STATIC ${PB24_src_files})
|
||||
add_library(PBDDS STATIC ${PBDDS_src_files})
|
||||
add_library(Tecmag-DAC20 STATIC ${DAC20_src_files})
|
||||
#add_library(tiepie STATIC ${general_src_files} ${tiepie_src_files})
|
||||
|
||||
|
||||
|
2
drivers/DAC-AD5791/CMakeLists.txt
Normal file
2
drivers/DAC-AD5791/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
add_library(AD5791 AD5791.cpp)
|
@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_library(Eurotherm-2000Series Eurotherm-2000Series.cpp)
|
||||
add_library(Eurotherm-2000Series Eurotherm-2000Series.cpp ../tempcont.cpp)
|
@ -1,16 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
set( SPC_DRV drv_spcm_linux_drv_v214b5633.zip)
|
||||
set(SPC_DRV drv_spcm_linux_drv_v214b5633.zip)
|
||||
set(SPC_HEADERS
|
||||
include/spcerr.h
|
||||
include/regs.h
|
||||
include/dlltyp.h
|
||||
include/spcioctl.inc)
|
||||
include/spcioctl.inc
|
||||
include/spcm_drv.h)
|
||||
|
||||
add_custom_command(OUTPUT ${SPC_HEADERS}
|
||||
COMMAND ${CMAKE_COMMAND} -E unzip -u ${SPC_DRV} "*.h" "*.txt" "*.inc" -d include/
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
COMMAND unzip -u ${SPC_DRV} "*.h" "*.txt" "*.inc" -d include/
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Unpacking SPC headers"
|
||||
VERBATIM)
|
||||
|
||||
add_library(Spectrum-M2i40xxSeries STATIC Spectrum-M2i40xxSeries.cpp GatedData.cpp)
|
||||
|
||||
add_library(Spectrum-M2i40xxSeries STATIC Spectrum-M2i40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})
|
||||
|
17
drivers/Spectrum-MI40xxSeries/CMakeLists.txt
Normal file
17
drivers/Spectrum-MI40xxSeries/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
set( SPC_DRV drv_header_v402b6844.zip)
|
||||
set(SPC_HEADERS
|
||||
include/spcerr.h
|
||||
include/regs.h
|
||||
include/dlltyp.h
|
||||
include/spcioctl.inc)
|
||||
|
||||
add_custom_command(OUTPUT ${SPC_HEADERS}
|
||||
COMMAND unzip -u ${SPC_DRV} "*.h" "*.txt" "*.inc" -d include/
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Unpacking SPC headers"
|
||||
VERBATIM)
|
||||
|
||||
add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})
|
||||
|
@ -17,5 +17,5 @@ add_custom_command( OUTPUT ${DRIVER_FILE}
|
||||
add_custom_target ( driver DEPENDS ${DRIVER_FILE} )
|
||||
|
||||
#include_directories(..)
|
||||
add_library(PB STATIC SpinCore-PulseBlaster.cpp)
|
||||
add_library(PB_PROG STATIC PulseBlasterProgram.cpp)
|
||||
add_library(SpinCore-PulseBlaster SpinCore-PulseBlaster.cpp)
|
||||
add_library(PulseBlasterProgram PulseBlasterProgram.cpp)
|
||||
|
3
drivers/SpinCore-PulseBlaster24Bit/CMakeLists.txt
Normal file
3
drivers/SpinCore-PulseBlaster24Bit/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_library(SpinCore-PulseBlaster24Bit SpinCore-PulseBlaster24Bit.cpp)
|
3
drivers/SpinCore-PulseBlasterDDSIII/CMakeLists.txt
Normal file
3
drivers/SpinCore-PulseBlasterDDSIII/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_library(SpinCore-PulseBlasterDDSIII SpinCore-PulseBlasterDDSIII.cpp)
|
3
drivers/Tecmag-DAC20/CMakeLists.txt
Normal file
3
drivers/Tecmag-DAC20/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_library(DAC20 DAC20.cpp)
|
3
drivers/dummy/CMakeLists.txt
Normal file
3
drivers/dummy/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_library(dummy dummy.cpp)
|
@ -4,42 +4,70 @@ include(FindPkgConfig)
|
||||
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(SOURCE_FILES
|
||||
machines/berta.cpp
|
||||
machines/bg_backend.cpp
|
||||
machines/birgit.cpp
|
||||
machines/deuteron_backend.cpp
|
||||
machines/dummycore.cpp
|
||||
machines/fc1_backend.cpp
|
||||
machines/fc1_digital_backend.cpp
|
||||
machines/fc1_vierkanal_backend.cpp
|
||||
machines/fc1neu_backend.cpp
|
||||
machines/fc2_backend.cpp
|
||||
machines/fc2_backend_AD5791.cpp
|
||||
machines/general.cpp
|
||||
machines/hardware.cpp
|
||||
machines/hardware.h
|
||||
machines/magnexgrad_backend.cpp
|
||||
machines/magnexgrad_backend_dds.cpp
|
||||
machines/Mobile_wo_sync_backend.cpp
|
||||
machines/Mobilecore.cpp
|
||||
machines/NQRcore.cpp
|
||||
machines/pb_radio_processor_g_backend.cpp
|
||||
machines/pb_radio_processor_g_backend.h
|
||||
machines/PFGcore.cpp
|
||||
machines/pulseblaster_only.cpp
|
||||
)
|
||||
|
||||
#pkg_check_modules (XERCES xerces-c REQUIRED)
|
||||
#include_directories(.. ${XERCES_INCLUDE_DIRS})
|
||||
#link_directories(${XERCES_LIBRARY_DIRS})
|
||||
|
||||
|
||||
#find_library(PB24 SpinCore-PulseBlaster24Bit PATH ${CMAKE_SOURCE_DIR})
|
||||
link_directories(../drivers/SpinCore-PulseBlaster24Bit
|
||||
../drivers/SpinCore-PulseBlaster
|
||||
../drivers/SpinCore-PulseBlasterDDSIII
|
||||
../drivers)
|
||||
|
||||
set(PB24 SpinCore-PulseBlaster24Bit SpinCore-PulseBlaster PulseBlasterProgram)
|
||||
set(PBDDS SpinCore-PulseBlasterDDSIII SpinCore-PulseBlaster PulseBlasterProgram)
|
||||
|
||||
add_executable(dummycore dummycore.cpp hardware.cpp)
|
||||
target_link_libraries( dummycore pthread ${XERCES_LIBRARIES} core dummy tempcont Eurotherm-2000Series)
|
||||
target_link_libraries(dummycore pthread ${XERCES_LIBRARIES} core dummy tempcont Eurotherm-2000Series)
|
||||
|
||||
add_executable(berta berta.cpp hardware.cpp)
|
||||
target_link_libraries(berta pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS )
|
||||
|
||||
add_executable(birgit birgit.cpp hardware.cpp)
|
||||
target_link_libraries(birgit pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS )
|
||||
|
||||
add_executable(bg_backend bg_backend.cpp hardware.cpp)
|
||||
|
||||
target_link_libraries(bg_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS )
|
||||
|
||||
add_executable(Mobilecore Mobilecore.cpp hardware.cpp)
|
||||
target_link_libraries(Mobilecore pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS )
|
||||
|
||||
add_executable(Mobilecore_wo_sync_backend Mobile_wo_sync_backend.cpp hardware.cpp)
|
||||
target_link_libraries(Mobilecore_wo_sync_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS )
|
||||
|
||||
|
||||
add_executable(deuteron_backend deuteron_backend.cpp hardware.cpp)
|
||||
target_link_libraries(deuteron_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} ${PBDDS} PTS )
|
||||
|
||||
add_executable(PFGcore PFGcore.cpp hardware.cpp)
|
||||
target_link_libraries( PFGcore pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries PB PB24 PB_PROG PTS Tecmag-DAC20 )
|
||||
target_link_libraries( PFGcore pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
|
||||
add_executable(fc1neu_backend fc1neu_backend.cpp hardware.cpp)
|
||||
target_link_libraries( fc1neu_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
# spcm linux driver needs to be installed (see http://spectrum-instrumentation.com/de/downloads/drivers)
|
||||
#include_directories(${CMAKE_SOURCE_DIR}/drivers/Spectrum-M2i40xxSeries/include)
|
||||
#add_executable(fc1_vierkanal_backend fc1_vierkanal_backend.cpp hardware.cpp)
|
||||
#target_link_libraries( fc1_vierkanal_backend pthread ${XERCES_LIBRARIES} core spcm_linux Spectrum-M2i40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
add_executable(fc2_backend fc2_backend.cpp hardware.cpp)
|
||||
target_link_libraries( fc2_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
add_executable(fc2_AD5791_backend fc2_backend_AD5791.cpp hardware.cpp)
|
||||
target_link_libraries( fc2_AD5791_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
add_executable(general general.cpp hardware.cpp)
|
||||
target_link_libraries( general pthread ${XERCES_LIBRARIES} ${GLIB2_LIBRARIES} core Spectrum_MI40xxSeries PB PB24 PB_PROG PTS Tecmag-DAC20 )
|
||||
target_link_libraries( general pthread ${XERCES_LIBRARIES} ${GLIB2_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
|
||||
|
||||
add_executable(magnexgrad_backend magnexgrad_backend.cpp hardware.cpp)
|
||||
target_link_libraries( magnexgrad_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 tempcont Eurotherm-2000Series)
|
||||
|
||||
add_executable(magnexgrad_dds_backend magnexgrad_backend_dds.cpp hardware.cpp)
|
||||
target_link_libraries( magnexgrad_dds_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PBDDS} PTS DAC20 tempcont Eurotherm-2000Series)
|
||||
|
||||
add_executable(pulseblaster_only pulseblaster_only.cpp hardware.cpp)
|
||||
target_link_libraries(pulseblaster_only pthread ${XERCES_LIBRARIES} core ${PB24} PTS dummy DAC20 tempcont Eurotherm-2000Series )
|
Loading…
Reference in New Issue
Block a user