...
 
Commits (8)
......@@ -4,9 +4,6 @@ stages:
.build-conda: &build-conda
stage: build
script:
- git submodule update --init --recursive third-party/bitshuffle
- conda build ./conda --prefix-length=80 --output-folder=dist/ --channel=http://bcu-ci.esrf.fr/stable
artifacts:
paths:
- dist/
......@@ -15,11 +12,19 @@ stages:
build-linux:
<<: *build-conda
script:
- git submodule update --init --recursive third-party/bitshuffle
- conda build ./conda/debug --prefix-length=80 --output-folder=dist/ --channel=http://bcu-ci.esrf.fr/stable
- conda build ./conda/release --prefix-length=80 --output-folder=dist/ --channel=http://bcu-ci.esrf.fr/stable
tags:
- linux
build-win:
<<: *build-conda
script:
- git submodule update --init --recursive third-party/bitshuffle
- call conda build ./conda/debug --prefix-length=80 --output-folder=dist/ --channel=http://bcu-ci.esrf.fr/stable
- call conda build ./conda/release --prefix-length=80 --output-folder=dist/ --channel=http://bcu-ci.esrf.fr/stable
tags:
- win
......
......@@ -268,8 +268,10 @@ if(LIMA_ENABLE_SPS_IMAGE)
target_include_directories(limacore PRIVATE "${CMAKE_SOURCE_DIR}/third-party/Sps/Include")
endif()
# Set LIMA_NO_DEBUG if the build type is not debug
target_compile_definitions(limacore PUBLIC $<$<NOT:$<CONFIG:DEBUG>>:LIMA_NO_DEBUG>)
# Set LIMA_NO_DEBUG if LIMA_ENABLE_DEBUG is set
if(NOT LIMA_ENABLE_DEBUG)
target_compile_definitions(limacore PUBLIC LIMA_NO_DEBUG)
endif()
# add all include paths coming from saving format options
target_include_directories(limacore PRIVATE ${extra_includes} ${saving_includes})
......
......@@ -46,6 +46,11 @@ endif()
#--------------------------------------------------------------------------------
option(LIMA_ENABLE_TESTS "compile test directories ?" OFF)
#--------------------------------------------------------------------------------
# Compile with trace (debug information)
#--------------------------------------------------------------------------------
option(LIMA_ENABLE_DEBUG "compile with trace ?" ON)
#--------------------------------------------------------------------------------
# libconfig
#--------------------------------------------------------------------------------
......@@ -116,7 +121,9 @@ endif()
# Python Tango server
IF(DEFINED ENV{LIMA_ENABLE_PYTANGO_SERVER})
set(LIMA_ENABLE_PYTANGO_SERVER "$ENV{LIMA_ENABLE_PYTANGO_SEVER}" CACHE BOOL "install python tango server?" FORCE)
# to investigate why if LIMA_ENABLE_PYTANGO_SERVER is not defined comes here ???
message("... LIMA_ENABLE_PYTANGO_SERVER: [$ENV{LIMA_ENABLE_PYTANGO_SEVER}]")
#set(LIMA_ENABLE_PYTANGO_SERVER "$ENV{LIMA_ENABLE_PYTANGO_SEVER}" CACHE BOOL "install python tango server?" FORCE)
else()
option(LIMA_ENABLE_PYTANGO_SERVER "install python tango server?" OFF)
endif()
......@@ -16,6 +16,7 @@ find_dependency(Threads)
#find_dependency(HDF5)
set(@PROJECT_NAME_UPPER@_ENABLE_NUMA "@LIMA_ENABLE_NUMA@")
set(@PROJECT_NAME_UPPER@_ENABLE_DEBUG "@LIMA_ENABLE_DEBUG@")
set(@PROJECT_NAME_UPPER@_SIP_DISABLE_FEATURES "@SIP_DISABLE_FEATURES@")
set_and_check(@PROJECT_NAME_UPPER@_SIP_INCLUDE_DIRS "@PACKAGE_SIP_INSTALL_DIR@")
......
......@@ -166,20 +166,21 @@ void lima::data2Image(Data &aData,VideoImage &anImage)
{
if(!aData.empty())
{
VideoMode new_mode;
switch(aData.type)
{
case Data::UINT8:
case Data::INT8:
anImage.mode = Y8;break;
new_mode = Y8;break;
case Data::UINT16:
case Data::INT16:
anImage.mode = Y16;break;
new_mode = Y16;break;
case Data::UINT32:
case Data::INT32:
anImage.mode = Y32;break;
new_mode = Y32;break;
case Data::UINT64:
case Data::INT64:
anImage.mode = Y64;break;
new_mode = Y64;break;
case Data::FLOAT:
case Data::DOUBLE:
default:
......@@ -187,6 +188,7 @@ void lima::data2Image(Data &aData,VideoImage &anImage)
}
anImage.alloc(aData.size());
memcpy(anImage.buffer,aData.data(),aData.size());
anImage.mode = new_mode;
anImage.width = aData.dimensions[0];
anImage.height = aData.dimensions[1];
anImage.frameNumber = aData.frameNumber;
......
#!/bin/bash
#./install.sh --install-prefix=$PREFIX --install-python-prefix=$SP_DIR --find-root-path=$PREFIX hdf5 hdf5-bs edfgz edflz4 cbf tiff numa python pytango-server basler pilatus v4l2 espia maxipix frelon andor andor3 prosilica
cmake -Bbuild -H. -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DLIMA_ENABLE_NUMA=1 -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_SITE_PACKAGES_DIR=$SP_DIR -DCMAKE_FIND_ROOT_PATH=$PREFIX -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
cmake --build build --target install
cmake -Bbuild -H. -G "%CMAKE_GENERATOR%" -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DPYTHON_SITE_PACKAGES_DIR=%SP_DIR% -DCMAKE_FIND_ROOT_PATH=%LIBRARY_PREFIX%
cmake -Bbuild -H. -G "%CMAKE_GENERATOR%" -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_DEBUG=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DPYTHON_SITE_PACKAGES_DIR=%SP_DIR% -DCMAKE_FIND_ROOT_PATH=%LIBRARY_PREFIX%
IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
cmake --build build --config Release --target install
......
#!/bin/bash
cmake -Bbuild -H. -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_DEBUG=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DLIMA_ENABLE_CBF=1 -DLIMA_ENABLE_NUMA=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_SITE_PACKAGES_DIR=$SP_DIR -DCMAKE_FIND_ROOT_PATH=$PREFIX -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
cmake --build build --target install
# Strip the 'v' from the version tag
{% if GIT_DESCRIBE_TAG is defined %}
{% set version = GIT_DESCRIBE_TAG[1:] %}
{% else %}
{% set version = "0.0.0" %}
{% endif %}
package:
name: lima-core
version: {{ version }}
source:
path: ../..
build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
features:
- debug
requirements:
host:
- python {{ python }}
- numpy
- sip 4.19.8 #For the SIP module
- processlib
- libconfig 1.7*
# I/O formats
- zlib
- lz4-c 1.8.2
- hdf5 1.10*
- libtiff
- cbflib # [linux]
- libnuma # [linux]
build:
- git
- cmake
- {{ compiler('cxx') }}
run:
- python
- numpy
- sip >=4.19.4, <=4.19.8 # For compatibility with pyqt 5.9.2
- {{ pin_compatible('processlib', max_pin='x.x') }}
- libconfig 1.7*
# I/O formats
- zlib
- lz4-c 1.8.2
- hdf5 1.10*
- libtiff
- cbflib # [linux]
- libnuma # [linux]
test:
requires:
- cmake
- python {{ python }}
imports:
- Lima.Core
#commands:
# - cd build
# - ctest --timeout 10 --output-on-failure
about:
home: https://github.com/esrf-bliss/Lima
license: GPL
license_file: COPYING
summary: a library for the unified control of 2D detectors
cmake -Bbuild -H. -G "%CMAKE_GENERATOR%" -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_DEBUG=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DPYTHON_SITE_PACKAGES_DIR=%SP_DIR% -DCMAKE_FIND_ROOT_PATH=%LIBRARY_PREFIX%
IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
cmake --build build --config Release --target install
IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
#!/bin/bash
cmake -Bbuild -H. -DLIMA_BUILD_SUBMODULES=0 -DLIMA_ENABLE_PYTHON=1 -DLIMA_ENABLE_TESTS=1 -DLIMA_ENABLE_DEBUG=1 -DLIMA_ENABLE_CONFIG=1 -DLIMA_ENABLE_TIFF=1 -DLIMA_ENABLE_HDF5=1 -DLIMA_ENABLE_HDF5_BS=1 -DLIMA_ENABLE_EDFGZ=1 -DLIMA_ENABLE_EDFLZ4=1 -DLIMA_ENABLE_CBF=1 -DLIMA_ENABLE_NUMA=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_SITE_PACKAGES_DIR=$SP_DIR -DCMAKE_FIND_ROOT_PATH=$PREFIX -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
cmake --build build --target install
blas_impl:
- mkl # [x86_64]
c_compiler:
- vs2017 # [win]
cxx_compiler:
- vs2017 # [win]
python:
- 2.7 # [linux]
- 3.6
- 3.7
# This differs from target_platform in that it determines what subdir the compiler
# will target, not what subdir the compiler package will be itself.
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
# code on win-64 miniconda.
cross_compiler_target_platform:
- win-64 # [win]
target_platform:
- win-64 # [win]
vc:
- 14
zip_keys:
- # [win]
- vc # [win]
- c_compiler # [win]
- cxx_compiler # [win]
# Strip the 'v' from the version tag
{% set version = GIT_DESCRIBE_TAG[1:] %}
{% if GIT_DESCRIBE_TAG is defined %}
{% set version = GIT_DESCRIBE_TAG[1:] %}
{% else %}
{% set version = "0.0.0" %}
{% endif %}
package:
name: lima-core
version: {{ version }}
source:
path: ..
path: ../..
build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
......
......@@ -94,7 +94,7 @@ bool SoftOpBinning::addTo(TaskMgr &aMgr,int stage)
SoftOpBpm::SoftOpBpm() :
SoftOpBaseClass()
{
#ifndef WITHOUT_GSL
#ifndef PROCESSLIB_WITHOUT_GSL
m_manager = new Tasks::BpmManager(DEFAULT_HISTORY_SIZE);
m_task = new Tasks::BpmTask(*m_manager);
#else
......@@ -106,7 +106,7 @@ SoftOpBpm::SoftOpBpm() :
SoftOpBpm::~SoftOpBpm()
{
#ifndef WITHOUT_GSL
#ifndef PROCESSLIB_WITHOUT_GSL
m_task->unref();
m_manager->unref();
#endif
......@@ -115,7 +115,7 @@ SoftOpBpm::~SoftOpBpm()
bool SoftOpBpm::addTo(TaskMgr &aMgr,int stage)
{
#ifndef WITHOUT_GSL
#ifndef PROCESSLIB_WITHOUT_GSL
aMgr.addSinkTask(stage,m_task);
return true;
#endif
......@@ -124,7 +124,7 @@ bool SoftOpBpm::addTo(TaskMgr &aMgr,int stage)
void SoftOpBpm::prepare()
{
#ifndef WITHOUT_GSL
#ifndef PROCESSLIB_WITHOUT_GSL
m_manager->resetHistory();
#endif
}
......