...
 
Commits (34)
# image : docker-registry.esrf.fr/bcu/lima-ci-debian8:latest
#before_script :
stages:
- build
- test
- package
- deploy
build-python2 :
stage: build
script:
- update-alternatives --set python /usr/bin/python2.7
- ./install.sh --git tests python
- ls -l
artifacts:
paths:
- build/
tags:
- lima
build-python3 :
build-conda:
stage: build
script:
- update-alternatives --set python /usr/bin/python3.4
- ./install.sh --git tests python
- ls -l
- conda build ./conda --prefix-length=80 --output-folder=dist/ --python=2.7 --channel=http://bcu-ci.esrf.fr/stable
artifacts:
paths:
- build/
- dist/
tags:
- lima
test-python2 :
stage: test
dependencies:
- build-python2
script:
- update-alternatives --set python /usr/bin/python2.7
- cd build/
- ctest --timeout 10 --output-on-failure
tags:
- lima
- conda
test-python3 :
stage: test
deploy:
stage: deploy
environment:
name: production
url: http://bcu-ci.esrf.fr/stable
dependencies:
- build-python3
- build-conda
script:
- update-alternatives --set python /usr/bin/python3.4
- cd build/
- ctest --timeout 10 --output-on-failure
- mv -f dist/linux-64/* /conda/linux-64/
- conda index /conda/linux-64/
tags:
- lima
- conda
when: manual
......@@ -39,6 +39,11 @@ include(LimaTools)
find_package(Threads REQUIRED)
if(MSVC AND MSVC_VERSION GREATER 1500)
# Compiler specific (parallel build)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
if(UNIX)
#--------------------------------------------------------------------------------
......@@ -143,10 +148,14 @@ if(LIMA_ENABLE_PYTHON)
# python site-packages folder
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())"
OUTPUT_VARIABLE _PYTHON_SITE_PACKAGES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE _PYTHON_SITE_PACKAGES_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
message(FATAL_ERROR "No python found, please install or disable LIMA_ENABLE_PYTHON")
endif()
set(PYTHON_SITE_PACKAGES_DIR ${_PYTHON_SITE_PACKAGES_DIR} CACHE PATH "where should python modules be installed?")
find_package(SIP)
if(${SIP_FOUND})
include(SIPMacros)
......@@ -154,16 +163,12 @@ if(LIMA_ENABLE_PYTHON)
message(FATAL_ERROR "python SIP not installed, please install or disable LIMA_ENABLE_PYTHON")
endif()
set(PYTHON_SITE_PACKAGES_DIR ${_PYTHON_SITE_PACKAGES_DIR} CACHE PATH "where should python modules be installed?")
if(WIN32)
set(NUMPY_INCLUDE_DIR "${_PYTHON_SITE_PACKAGES_DIR}/numpy/core/include" CACHE PATH "Path to NumPy include folder")
set(NUMPY_LIB_DIR "${_PYTHON_SITE_PACKAGES_DIR}/numpy/core/lib" CACHE PATH "Path to NumPy lib folder")
include_directories(${NUMPY_INCLUDE_DIR})
link_directories(${NUMPY_LIB_DIR})
endif()
if(!${SIP_FOUND})
message(FATAL_ERROR "sip executable not found, cannot build python extensions")
find_package(NumPy)
if(${NUMPY_FOUND})
include_directories(${NUMPY_INCLUDE_DIRS})
link_directories(${NUMPY_LIBRARIES})
else()
message(FATAL_ERROR "NumPy not found, cannot build python extensions")
endif()
if(WIN32)
set(SIP_TAGS WIN32_PLATFORM)
......@@ -282,115 +287,63 @@ endif()
set(saving_libs)
set(saving_includes)
if(LIMA_ENABLE_EDFGZ)
if(WIN32)
if (${CMAKE_GENERATOR} MATCHES "Win64$")
set(ZLIB_ARCH "win64")
else()
set(ZLIB_ARCH "win32")
endif()
set(LIB_ZLIB_INCLUDE_DIR "C:/Program Files/zlib-windows/${ZLIB_ARCH}/include" CACHE PATH "Path to zlib includes")
set(LIB_ZLIB_DIR "C:/Program Files/zlib-windows/${ZLIB_ARCH}/lib" CACHE PATH "Path to zlib libs")
link_directories(${LIB_ZLIB_DIR})
find_library(LIB_ZLIB zlibstatic ${LIB_ZLIB_DIR})
add_definitions(-DZLIB_WINAPI)
else()
find_library(LIB_ZLIB z)
endif()
find_path(LIB_ZLIB_INCLUDE_DIR zlib.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZLIB DEFAULT_MSG LIB_ZLIB LIB_ZLIB_INCLUDE_DIR)
find_package(ZLIB)
if(${ZLIB_FOUND})
add_definitions(-DWITH_Z_COMPRESSION)
set(saving_libs ${saving_libs} ${LIB_ZLIB})
set(saving_includes ${saving_includes} ${LIB_ZLIB_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${ZLIB_LIBRARIES})
set(saving_includes ${saving_includes} ${ZLIB_INCLUDE_DIRS})
else()
message(FATAL_ERROR "ZLIB library not found, please install or disable LIMA_ENABLE_EDFGZ")
endif()
endif()
if(LIMA_ENABLE_EDFLZ4)
# look for a lz4 1.7 where lz4frame.h was added
find_path(LIB_LZ4_INCLUDE_DIR lz4frame.h)
find_library(LIB_LZ4 NAMES lz4)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LZ4 DEFAULT_MSG LIB_LZ4 LIB_LZ4_INCLUDE_DIR)
if (LZ4_FOUND)
find_package(LZ4)
if (${LZ4_FOUND})
add_definitions(-DWITH_LZ4_COMPRESSION)
set(saving_libs ${saving_libs} ${LIB_LZ4})
set(saving_includes ${saving_includes} ${LIB_LZ4_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${LZ4_LIBRARIES})
set(saving_includes ${saving_includes} ${LZ4_INCLUDE_DIRS})
else()
message(FATAL_ERROR "LZ4 library: required version = 1.7.x, please update or switch off LIMA_ENABLE_EDFLZ4")
message(FATAL_ERROR "LZ4 library: required version = 1.8.2, please update or switch off LIMA_ENABLE_EDFLZ4")
endif()
endif()
if(LIMA_ENABLE_CBF)
find_path(LIB_CBF_INCLUDE_DIR cbf/cbf.h)
find_library(LIB_CBF cbf)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CBF DEFAULT_MSG LIB_CBF LIB_CBF_INCLUDE_DIR)
find_package(CBF)
if (${CBF_FOUND})
add_definitions(-DWITH_CBF_SAVING)
add_definitions(-DPROTOTYPES)
set(ct_srcs ${ct_srcs} control/src/CtSaving_Cbf.cpp)
set(saving_libs ${saving_libs} ${LIB_CBF} crypto)
set(saving_includes ${saving_includes} ${LIB_CBF_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${CBF_LIBRARIES} crypto)
set(saving_includes ${saving_includes} ${CBF_INCLUDE_DIRS})
else()
message(FATAL_ERROR "CBF library not found, please install or disable LIMA_ENABLE_CBF")
endif()
endif()
if(LIMA_ENABLE_FITS)
find_path(LIB_FITS_INCLUDE_DIR CCfits/CCfits.h)
find_library(LIB_CFITSIO cfitsio)
find_library(LIB_CCFITS CCfits)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FITS DEFAULT_MSG LIB_CCFITS LIB_FITS_INCLUDE_DIR)
if(${FITS_FOUND})
find_package(CCFits)
if(${CCFITS_FOUND})
add_definitions(-DWITH_FITS_SAVING)
set(ct_srcs ${ct_srcs} control/src/CtSaving_Fits.cpp)
set(saving_libs ${saving_libs} ${LIB_CFITSIO} ${LIB_CCFITS})
set(saving_includes ${saving_includes} ${LIB_FITS_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${CFITSIO_LIBRARY} ${CCFITS_LIBRARY})
set(saving_includes ${saving_includes} ${CFITSIO_INCLUDE_DIR})
else()
message(FATAL_ERROR "CFITSIO and/or CCFITS library not found, please install or disable LIMA_ENABLE_FITS")
endif()
endif()
if(LIMA_ENABLE_HDF5)
if(WIN32)
if (${CMAKE_GENERATOR} MATCHES "2008")
set(HDF5_VERSION "1.8.13")
elseif (${CMAKE_GENERATOR} MATCHES "2015|2017")
set(HDF5_VERSION "1.8.20")
else()
message(FATAL_ERROR "Unsupported VS version for HDF5 saving format, only vs2008 or vs2015 are supported respectively for hdf5 1.8.13 and 1.8.16")
endif()
set(LIB_HDF5_INCLUDE_DIR "C:/Program Files/HDF_Group/HDF5/${HDF5_VERSION}/include" CACHE PATH "Path to HDF5 includes")
set(LIB_HDF5_DIR "C:/Program Files/HDF_Group/HDF5/${HDF5_VERSION}/lib" CACHE PATH "Path to HDF5 libs")
link_directories(${LIB_HDF5_DIR})
# we use static libs libhdf5.lib and libhdf5_cpp.lib
find_library(LIB_HDF5_CPP libhdf5_cpp ${LIB_HDF5_DIR})
find_library(LIB_HDF5 libhdf5 ${LIB_HDF5_DIR})
find_library(LIB_HDF5_HL libhdf5_hl ${LIB_HDF5_DIR})
find_library(LIB_ZLIB libzlib ${LIB_HDF5_DIR})
find_library(LIB_SZIP libszip ${LIB_HDF5_DIR})
else()
set(LIB_HDF5_INCLUDE_DIR "/usr/local/hdf5/include" CACHE PATH "Path to HDF5 directories")
set(LIB_HDF5_DIR "/usr/local/hdf5/lib")
find_library(LIB_HDF5_CPP hdf5_cpp ${LIB_HDF5_DIR})
find_library(LIB_HDF5 hdf5 ${LIB_HDF5_DIR})
find_library(LIB_HDF5_HL hdf5_hl ${LIB_HDF5_DIR})
find_path(LIB_HDF5_INCLUDE_DIR H5Cpp.h)
link_directories(${LIB_HDF5_DIR})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HDF5 DEFAULT_MSG LIB_HDF5 LIB_HDF5_INCLUDE_DIR)
#set (HDF5_USE_STATIC_LIBRARIES ON)
find_package(HDF5 COMPONENTS CXX HL)
if(${HDF5_FOUND})
add_definitions(-DWITH_HDF5_SAVING)
set(ct_srcs ${ct_srcs} control/src/CtSaving_Hdf5.cpp)
set(saving_libs ${saving_libs} ${LIB_HDF5} ${LIB_HDF5_CPP} ${LIB_HDF5_HL} ${LIB_SZIP} ${LIB_ZLIB})
set(saving_includes ${saving_includes} ${LIB_HDF5_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
set(saving_includes ${saving_includes} ${HDF5_INCLUDE_DIRS})
set(saving_definitions ${saving_definitions} ${HDF5_DEFINITIONS})
else()
message(FATAL_ERROR "hdf5_cpp library not found, please install or disable LIMA_ENABLE_HDF5")
message(FATAL_ERROR "HDF5 library not found, please install or disable LIMA_ENABLE_HDF5")
endif()
if(LIMA_ENABLE_HDF5_BS)
......@@ -425,15 +378,12 @@ if(LIMA_ENABLE_NXS)
endif()
if(LIMA_ENABLE_TIFF)
find_path(LIB_TIFF_INCLUDE_DIR tiffio.h)
find_library(LIB_TIFF tiff)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TIFF DEFAULT_MSG LIB_TIFF LIB_TIFF_INCLUDE_DIR)
find_package(TIFF)
if(${TIFF_FOUND})
add_definitions(-DWITH_TIFF_SAVING)
set(ct_srcs ${ct_srcs} control/src/CtSaving_Tiff.cpp)
set(saving_libs ${saving_libs} tiff)
set(saving_includes ${saving_includes} ${LIB_TIFF_INCLUDE_DIR})
set(saving_libs ${saving_libs} ${TIFF_LIBRARIES})
set(saving_includes ${saving_includes} ${TIFF_INCLUDE_DIRS})
else()
message(FATAL_ERROR "TIFF library not found, please install or disable LIMA_ENABLE_TIFF")
endif()
......@@ -469,6 +419,9 @@ endif()
# add all include paths coming from saving format options
target_include_directories(limacore PRIVATE ${extra_includes} ${saving_includes})
# add compiler definitions required by saving libraries
target_compile_definitions(limacore PRIVATE ${saving_definitions})
if(THREADS_HAVE_PTHREAD_ARG)
target_compile_options(PUBLIC limacore "-pthread")
endif()
......@@ -492,12 +445,14 @@ if(WIN32)
endif()
if(WIN32)
install(TARGETS limacore
DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION include)
else()
include(GNUInstallDirs)
install(TARGETS limacore
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
......
Subproject commit e148a266a6689e9e1e5545a842e2f6ac6cc443c3
Subproject commit b965a55dd46fd232f0f9c66e3b1e408c8677dd7c
Subproject commit 019824712a193bf67dac59f54551d8414f794f4c
Subproject commit 05fa3370c45bee7c164b16b104d43b13d6eb6e21
Subproject commit 61ddfec995ab3ac369e12d2f20f78912d3b09502
Subproject commit 20d7f4a75ac5b65daf51af314fa18e7432d8af3b
Subproject commit 448222e1f64eb92292407cf7ea5d5d7f79933abf
Subproject commit 085e3a547e77490b7490dbf6168bec5754efd71f
Subproject commit 491b097a012c29168e3a097f937c42ddd398f88e
Subproject commit 861cbc2cbd575a9b23e95b5352ed7474920e4f86
Subproject commit 7d5e257a0f1e706a3b11619877c9ec50381d15ca
Subproject commit 9da796236f7ce98add5dd5e28cab016c3076e6ac
Subproject commit 0a26b61f31d41c60a6b45385279f889f7791d2d4
Subproject commit 7688e5cae953891f4f91c5ca17801fd73dd69bdf
Subproject commit dda475da96948630f05bf41d3dcb4c694fbcb869
Subproject commit ce22fdafa85cbebf9da81815e6f68b52a015a25b
......@@ -36,16 +36,8 @@ target_link_libraries(lima${NAME} limacore)
if(WIN32)
target_compile_definitions(lima${NAME} PRIVATE LIBSIMULATOR_EXPORTS)
endif()
if(WIN32)
set_target_properties(lima${NAME} PROPERTIES PREFIX "lib")
endif()
if(WIN32)
install(TARGETS lima${NAME}
DESTINATION lib)
else()
install(TARGETS lima${NAME}
LIBRARY DESTINATION lib)
endif()
limatools_set_install_libdir(lima${NAME})
if (LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
......
Subproject commit 89f71186c51652daff86a08a0363b58a8818733d
Subproject commit 1752063b4dc51c930c06437c30fe98907d32917b
find_path(CBF_INCLUDE_DIRS cbflib/cbf.h)
find_library(CBF_LIBRARIES cbf)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CBF
DEFAULT_MSG
CBF_LIBRARIES
CBF_INCLUDE_DIRS)
# -- Check for CFITSIO and CCFITS library --
#
# Uses path overrides: CFITSIOINC_PATH and CFITSIOLIB_PATH
#
# Defines:
#
# CFITSIO_FOUND - system has the CFITSIO library
# CFITSIO_INCLUDE_DIR - the CFITSIO include directory
# CFITSIO_LIBRARY - The library needed to use CFITSIO
#
# CCFITS_FOUND
# CCFITS_INCLUDE_DIR
# CCFITS_LIBRARY
#
# Hints for non-standard locations:
#
# CFITSIO_ROOT_DIR (used for finding cfitsio only)
# CCFITS_ROOT_DIR (used for finding CCfits only)
# BASE_DIR (used for both, and other dependencies as well)
#
# These directories can be the --prefix=<dir> directory or the
# individual source directories for cfitsio or ccfits.
#
# Copyright 2012 Jacek Becla, Daniel Liwei Wang
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include(FindPackageHandleStandardArgs)
# Look for includes and libraries
find_path(CFITSIO_INCLUDE_DIR
NAMES fitsio.h
HINTS ${CFITSIO_ROOT_DIR} ${BASE_DIR}
PATH_SUFFIXES include include/cfitsio
)
find_library(CFITSIO_LIBRARY cfitsio
HINTS ${CFITSIO_ROOT_DIR} ${BASE_DIR}
PATH_SUFFIXES lib)
find_package_handle_standard_args(CFITSIO DEFAULT_MSG
CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
if(NOT CFITSIO_FOUND)
message("Can't find CCfits. You can specify a non-standard (e.g., from source) installation using CFITSIO_ROOT_DIR")
endif(NOT CFITSIO_FOUND)
find_path(CCFITS_INCLUDE_DIR CCfits/CCfits
HINTS ${CCFITS_ROOT_DIR} ${BASE_DIR}
PATH_SUFFIXES include)
find_library(CCFITS_LIBRARY CCfits
HINTS ${CCFITS_ROOT_DIR} ${BASE_DIR}
PATH_SUFFIXES lib)
find_package_handle_standard_args(CCFITS DEFAULT_MSG
CCFITS_INCLUDE_DIR CCFITS_LIBRARY)
if(NOT CCFITS_FOUND)
message("Can't find CCfits. You can specify a non-standard (e.g., from source) installation using CCFITS_ROOT_DIR")
endif(NOT CCFITS_FOUND)
#find_package_handle_standard_args(LIBSZ DEFAULT_MSG SZ_LIB)
mark_as_advanced(CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR
CCFITS_LIBRARY CCFITS_INCLUDE_DIR)
find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
find_library(LZ4_LIBRARIES NAMES lz4)
# We require LZ4_compress_default() which was added in v1.8.2
if (LZ4_LIBRARIES)
include(CheckCSourceRuns)
set(CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${LZ4_LIBRARY})
check_c_source_runs("
#include <lz4.h>
int main() {
int good = (LZ4_VERSION_MAJOR > 1) ||
((LZ4_VERSION_MAJOR == 1) && (LZ4_VERSION_MINOR >= 8) && (LZ4_VERSION_RELEASE >= 2));
return !good;
}" LZ4_GOOD_VERSION)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LZ4
DEFAULT_MSG
LZ4_LIBRARIES
LZ4_INCLUDE_DIRS
LZ4_GOOD_VERSION)
mark_as_advanced(LZ4_INCLUDE_DIRS LZ4_LIBRARIES)
# -- Check for the presence of NumPy --
#
# The following variables are set when NumPy is found:
#
# NUMPY_FOUND = Set to true, if all components of NUMPY have been found.
# NUMPY_INCLUDE_DIRS = Include path for the header files of NUMPY
# NUMPY_LIBRARIES = Link these to use NUMPY
# NUMPY_LFLAGS = Linker flags (optional)
#
# Copyright (c) 2013, Lars Baehren <lbaehren@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
if (NOT NUMPY_ROOT_DIR)
set (NUMPY_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
endif (NOT NUMPY_ROOT_DIR)
if (NOT PYTHONINTERP_FOUND)
find_package(PythonInterp)
endif (NOT PYTHONINTERP_FOUND)
##
## Check for the header files
message(STATUS "#### NUMPY ${PYTHON_EXECUTABLE}" )
## Use Python to determine the include directory
execute_process (
COMMAND ${PYTHON_EXECUTABLE} -c import\ numpy\;\ print\(numpy.get_include\(\)\);
ERROR_VARIABLE NUMPY_FIND_ERROR
RESULT_VARIABLE NUMPY_FIND_RESULT
OUTPUT_VARIABLE NUMPY_FIND_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
## process the output from the execution of the command
if (NOT NUMPY_FIND_RESULT)
set (NUMPY_INCLUDE_DIRS ${NUMPY_FIND_OUTPUT})
endif (NOT NUMPY_FIND_RESULT)
##
## Check for the library
if (PYTHON_SITE_PACKAGES_DIR)
find_library (NUMPY_NPYMATH_LIBRARY npymath
HINTS ${PYTHON_SITE_PACKAGES_DIR}/numpy/core
PATH_SUFFIXES lib
)
if (NUMPY_NPYMATH_LIBRARY)
list (APPEND NUMPY_LIBRARIES ${NUMPY_NPYMATH_LIBRARY})
endif (NUMPY_NPYMATH_LIBRARY)
endif (PYTHON_SITE_PACKAGES_DIR)
##
## Get API version of NumPy from 'numpy/numpyconfig.h'
if (PYTHON_EXECUTABLE)
execute_process (
COMMAND ${PYTHON_EXECUTABLE} -c import\ numpy\;\ print\(numpy.__version__\);
ERROR_VARIABLE NUMPY_API_VERSION_ERROR
RESULT_VARIABLE NUMPY_API_VERSION_RESULT
OUTPUT_VARIABLE NUMPY_API_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else ()
## Backup procedure: extract version number directly from the header file
if (NUMPY_INCLUDE_DIRS)
find_file (HAVE_NUMPYCONFIG_H numpy/numpyconfig.h
HINTS ${NUMPY_INCLUDE_DIRS}
)
endif (NUMPY_INCLUDE_DIRS)
endif ()
## Dissect full version number into major, minor and patch version
if (NUMPY_API_VERSION)
string (REGEX REPLACE "\\." ";" _tmp ${NUMPY_API_VERSION})
list (GET _tmp 0 NUMPY_API_VERSION_MAJOR)
list (GET _tmp 1 NUMPY_API_VERSION_MINOR)
list (GET _tmp 2 NUMPY_API_VERSION_PATCH)
endif (NUMPY_API_VERSION)
##
## Actions taken when all components have been found
find_package_handle_standard_args (NUMPY DEFAULT_MSG NUMPY_INCLUDE_DIRS)
if (NUMPY_FOUND)
if (NOT NUMPY_FIND_QUIETLY)
message (STATUS "Found components for NumPy")
message (STATUS "NUMPY_ROOT_DIR = ${NUMPY_ROOT_DIR}")
message (STATUS "NUMPY_INCLUDE_DIRS = ${NUMPY_INCLUDE_DIRS}")
message (STATUS "NUMPY_LIBRARIES = ${NUMPY_LIBRARIES}")
message (STATUS "NUMPY_API_VERSION = ${NUMPY_API_VERSION}")
endif (NOT NUMPY_FIND_QUIETLY)
else (NUMPY_FOUND)
if (NUMPY_FIND_REQUIRED)
message (FATAL_ERROR "Could not find NUMPY!")
endif (NUMPY_FIND_REQUIRED)
endif (NUMPY_FOUND)
##
## Mark advanced variables
mark_as_advanced (
NUMPY_ROOT_DIR
NUMPY_INCLUDE_DIRS
NUMPY_LIBRARIES
)
......@@ -112,9 +112,12 @@ endfunction()
function(limatools_set_install_libdir lib_name)
if(WIN32)
set_target_properties(${lib_name} PROPERTIES PREFIX "lib")
install(TARGETS ${lib_name} DESTINATION lib)
install(TARGETS ${lib_name}
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
else()
include(GNUInstallDirs)
install(TARGETS ${lib_name} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS ${lib_name}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endfunction()
......@@ -500,16 +500,17 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
return DebProxy();
}
} // namespace lima
/*------------------------------------------------------------------
* debug macros
*------------------------------------------------------------------*/
#define DEB_GLOBAL_NAMESPC(mod, name_space) \
inline DebParams& getDebParams() \
inline lima::DebParams& getDebParams() \
{ \
static DebParams *deb_params = NULL; \
EXEC_ONCE(deb_params = new DebParams(mod, NULL, \
static lima::DebParams *deb_params = NULL; \
EXEC_ONCE(deb_params = new lima::DebParams(lima::mod, NULL, \
name_space)); \
return *deb_params; \
}
......@@ -517,12 +518,11 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
#define DEB_GLOBAL(mod) \
DEB_GLOBAL_NAMESPC(mod, NULL)
#define DEB_CLASS_NAMESPC(mod, class_name, name_space) \
private: \
static DebParams& getDebParams() \
#define DEB_STRUCT_NAMESPC(mod, struct_name, name_space) \
static lima::DebParams& getDebParams() \
{ \
static DebParams *deb_params = NULL; \
EXEC_ONCE(deb_params = new DebParams(mod, class_name, \
static lima::DebParams *deb_params = NULL; \
EXEC_ONCE(deb_params = new lima::DebParams(lima::mod, struct_name, \
name_space)); \
return *deb_params; \
} \
......@@ -532,7 +532,7 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
m_deb_obj_name = obj_name; \
} \
\
ConstStr getDebObjName() const \
lima::ConstStr getDebObjName() const \
{ \
if (m_deb_obj_name.empty()) \
return NULL; \
......@@ -541,31 +541,35 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
\
std::string m_deb_obj_name
#define DEB_CLASS_NAMESPC(mod, class_name, name_space) \
private: \
DEB_STRUCT_NAMESPC(mod, class_name, name_space)
#define DEB_CLASS(mod, class_name) \
DEB_CLASS_NAMESPC(mod, class_name, NULL)
#ifndef NO_LIMA_DEBUG
#define DEB_GLOBAL_FUNCT() \
DebObj deb(getDebParams(), false, __FUNCTION__, \
lima::DebObj deb(getDebParams(), false, __FUNCTION__, \
NULL, __FILE__, __LINE__)
#define DEB_CONSTRUCTOR() \
DEB_MEMBER_FUNCT()
#define DEB_DESTRUCTOR() \
DebObj deb(getDebParams(), true, __FUNCTION__, \
lima::DebObj deb(getDebParams(), true, __FUNCTION__, \
getDebObjName(), __FILE__, __LINE__)
#define DEB_MEMBER_FUNCT() \
DebObj deb(getDebParams(), false, __FUNCTION__, \
lima::DebObj deb(getDebParams(), false, __FUNCTION__, \
getDebObjName(), __FILE__, __LINE__)
#define DEB_PTR() \
(&deb)
#define DEB_FROM_PTR(deb_ptr) \
DebObj& deb = *(deb_ptr)
lima::DebObj& deb = *(deb_ptr)
#define DEB_STATIC_FUNCT() \
DEB_GLOBAL_FUNCT()
......@@ -576,13 +580,13 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
#define DEB_MSG(type) deb.write(type, __FILE__, __LINE__)
#define DEB_FATAL() DEB_MSG(DebTypeFatal)
#define DEB_ERROR() DEB_MSG(DebTypeError)
#define DEB_WARNING() DEB_MSG(DebTypeWarning)
#define DEB_TRACE() DEB_MSG(DebTypeTrace)
#define DEB_PARAM() DEB_MSG(DebTypeParam)
#define DEB_RETURN() DEB_MSG(DebTypeReturn)
#define DEB_ALWAYS() DEB_MSG(DebTypeAlways)
#define DEB_FATAL() DEB_MSG(lima::DebTypeFatal)
#define DEB_ERROR() DEB_MSG(lima::DebTypeError)
#define DEB_WARNING() DEB_MSG(lima::DebTypeWarning)
#define DEB_TRACE() DEB_MSG(lima::DebTypeTrace)
#define DEB_PARAM() DEB_MSG(lima::DebTypeParam)
#define DEB_RETURN() DEB_MSG(lima::DebTypeReturn)
#define DEB_ALWAYS() DEB_MSG(lima::DebTypeAlways)
#define DEB_HEX(x) DebHex(x)
......@@ -608,13 +612,13 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
#else //NO_LIMA_DEBUG
#define DEB_GLOBAL_FUNCT() DebSink deb
#define DEB_CONSTRUCTOR() DebSink deb
#define DEB_DESTRUCTOR() DebSink deb
#define DEB_MEMBER_FUNCT() DebSink deb
#define DEB_GLOBAL_FUNCT() lima::DebSink deb
#define DEB_CONSTRUCTOR() lima::DebSink deb
#define DEB_DESTRUCTOR() lima::DebSink deb
#define DEB_MEMBER_FUNCT() lima::DebSink deb
#define DEB_PTR() NULL
#define DEB_FROM_PTR(deb_ptr) DebSink deb
#define DEB_FROM_PTR(deb_ptr) lima::DebSink deb
#define DEB_STATIC_FUNCT() DEB_GLOBAL_FUNCT()
#define DEB_SET_OBJ_NAME(n)
......@@ -640,6 +644,5 @@ inline DebProxy DebObj::write(DebType type, ConstStr file_name, int line_nr)
#define DEB_CHECK_ANY(type) 0
#endif //NO_LIMA_DEBUG
} // namespace lima
#endif // DEBUG_H
./install.bat --install-prefix=%LIBRARY_PREFIX% --install-python-prefix=%SP_DIR% --find-root-path=%PREFIX% --build-type=Release hdf5 hdf5-bs edfgz edflz4 tiff python pytango-server pco
#!/bin/bash
python -V
./install.sh --install-prefix=$PREFIX --install-python-prefix=$SP_DIR --find-root-path=$PREFIX hdf5 hdf5-bs edfgz edflz4 cbf tiff python pytango-server basler pilatus v4l2 espia maxipix frelon andor andor3 prosilica
# Conda requires the library to be installed in /lib not /lib64 regardeless of the HFS standard.
mv -f $PREFIX/lib64/* $PREFIX/lib
rmdir $PREFIX/lib64
blas_impl:
- mkl # [x86_64]
c_compiler:
- vs2017 # [win]
cxx_compiler:
- vs2017 # [win]
python:
- 3.6
# 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]
{% set version = "1.8.0" %}
{% set REL_SP_DIR = 'lib/python2.7/site-packages' %} # [linux and py27]
{% set REL_SP_DIR = 'lib/python3.6/site-packages' %} # [linux and py36]
{% set REL_SP_DIR = 'Lib/site-packages' %} # [win]
{% set REL_BIN_DIR = 'bin' %} # [linux]
{% set REL_BIN_DIR = 'Library/bin' %} # [win]
{% set REL_SHLIB_DIR = 'lib' %} # [linux]
{% set REL_SHLIB_DIR = 'Library/bin' %} # [win]
{% set PYMOD_EXT = '.so' %} # [linux]
{% set PYMOD_EXT = '.pyd' %} # [win]
package:
name: lima
version: {{ version }}
source:
git_url: https://gitlab.esrf.fr/limagroup/lima.git
git_branch: andor_status_patch
build:
number: 1
requirements:
build:
- git
- {{ compiler('cxx') }}
- python {{ python }} #Python is used by CMake configure stage
- numpy
- sip 4.18* #For the SIP generator
- cmake
host:
- gsl 2.2*
# I/O formats
- zlib
- lz4-c 1.8.2
- hdf5 1.10*
- libtiff
- cbflib # [linux]
#- cfitsio
# Cameras SDKs
- pylon5-sdk # [linux]
- libv4l # [linux]
- espia # [linux]
- andor2-sdk # [linux]
- andor3-sdk # [linux]
- pvapi-sdk # [linux]
- pco # [win]
outputs:
- name: lima-core
requirements:
run:
- python
- sip 4.18*
- numpy
- gsl 2.2*
# I/O formats
- zlib
- lz4-c 1.8.2
- hdf5 1.10*
- libtiff
- cbflib # [linux]
#- cfitsio
files:
- {{ REL_SHLIB_DIR }}/liblimacore{{ SHLIB_EXT }}
- {{ REL_SHLIB_DIR }}/liblimacore{{ SHLIB_EXT }}*
- {{ REL_SHLIB_DIR }}/libprocesslib{{ SHLIB_EXT }}
- {{ REL_SHLIB_DIR }}/libprocesslib{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limacore{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/processlib{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/__init__.py
- {{ REL_SP_DIR }}/Lima/Core
- name: lima-tango-server
requirements:
run:
- python
- pytango
files:
- {{ REL_BIN_DIR }}/LimaCCDs
- {{ REL_SP_DIR }}/Lima/Server/__init__.py
- {{ REL_SP_DIR }}/Lima/Server/LimaCCDs.py
- {{ REL_SP_DIR }}/Lima/Server/LimaViewer.py
- {{ REL_SP_DIR }}/Lima/Server/AttrHelper.py
- {{ REL_SP_DIR }}/Lima/Server/EnvHelper.py
- {{ REL_SP_DIR }}/Lima/Server/camera/__init__.py
- {{ REL_SP_DIR }}/Lima/Server/plugins/
- name: lima-simulator
requirements:
run:
- python
- lima-core
files:
- {{ REL_SHLIB_DIR }}/liblimasimulator{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limasimulator{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Simulator/
# test:
# requires:
# - cmake
# source_files:
# - cmake-build/*
# commands:
# - cd cmake-build
# - ctest --timeout 10 --output-on-failure
# imports:
# - Lima.Simulator
- name: lima-simulator-server
requirements:
run:
- lima-tango-server
- lima-simulator
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Simulator.py
#
# Basler
- name: lima-camera-basler # [linux]
requirements:
run:
- python
- lima-core
- pylon5-sdk
files:
- {{ REL_SHLIB_DIR }}/liblimabasler{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limabasler{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Basler/
# test:
- name: lima-camera-basler-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-basler
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Basler.py
#
# Pilatus
- name: lima-camera-pilatus # [linux]
requirements:
run:
- python
- lima-core
- cbflib
files:
- {{ REL_SHLIB_DIR }}/liblimapilatus{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limapilatus{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Pilatus/
# test:
- name: lima-camera-pilatus-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-pilatus
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Pilatus.py
#
# Video4Linux
- name: lima-camera-v4l2 # [linux]
requirements:
run:
- python
- lima-core
- libv4l2
files:
- {{ REL_SHLIB_DIR }}/liblimav4l2{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limav4l2{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/V4l2/
# test:
- name: lima-camera-v4l2-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-v4l2
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/V4l2.py
#
# Espia
- name: lima-camera-espia # [linux]
requirements:
run:
- python
- lima-core
- espia
files:
- {{ REL_SHLIB_DIR }}/liblimaespia{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limaespia{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Espia/
#
# Frelon
- name: lima-camera-frelon # [linux]
requirements:
run:
- python
- lima-core
- lima-camera-espia
files:
- {{ REL_SHLIB_DIR }}/liblimafrelon{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limafrelon{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Frelon/
# test:
- name: lima-camera-frelon-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-frelon
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Frelon.py
#
# Maxipix
- name: lima-camera-maxipix # [linux]
requirements:
run:
- python
- lima-core
- lima-camera-espia
files:
- {{ REL_SHLIB_DIR }}/liblimamaxipix{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limamaxipix{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Maxipix/
# test:
- name: lima-camera-maxipix-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-maxipix
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Maxipix.py
#
# Andor
- name: lima-camera-andor2 # [linux]
requirements:
run:
- python
- lima-core
- andor2-sdk
files:
- {{ REL_SHLIB_DIR }}/liblimaandor{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limaandor{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Andor/
# test:
- name: lima-camera-andor2-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-andor2
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Andor.py
#
# Andor3
- name: lima-camera-andor3 # [linux]
requirements:
run:
- python
- lima-core
- andor3-sdk
files:
- {{ REL_SHLIB_DIR }}/liblimaandor3{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limaandor3{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Andor3/
# test:
- name: lima-camera-andor3-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-andor3
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Andor3.py
#
# Prosilica
- name: lima-camera-prosilica # [linux]
requirements:
run:
- python
- lima-core
- pvapi-sdk
files:
- {{ REL_SHLIB_DIR }}/liblimaprosilica{{ SHLIB_EXT }}*
- {{ REL_SP_DIR }}/limaprosilica{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Prosilica/
# test:
- name: lima-camera-prosilica-server # [linux]
requirements:
run:
- lima-tango-server
- lima-camera-prosilica
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Prosilica.py
#
# PCO
- name: lima-camera-pco # [win]
requirements:
run:
- python
- lima-core
- pco
files:
- {{ REL_SHLIB_DIR }}/liblimapco{{ SHLIB_EXT }}
- {{ REL_SP_DIR }}/limapco{{ PYMOD_EXT }}
- {{ REL_SP_DIR }}/Lima/Pco/
# test:
- name: lima-camera-pco-server # [win]
requirements:
run:
- lima-tango-server
- lima-camera-pco
files:
- {{ REL_SP_DIR }}/Lima/Server/camera/Pco.py
about:
home: https://github.com/esrf-bliss/Lima
license: GPL
license_file: COPYING
summary: a library for the unified control of 2D detectors
......@@ -83,10 +83,19 @@ static const int LZ4_HEADER_SIZE = 19;
static const int LZ4_FOOTER_SIZE = 4;
static const LZ4F_preferences_t lz4_preferences = {
{ LZ4F_max256KB, LZ4F_blockLinked, LZ4F_noContentChecksum, LZ4F_frame, 0, { 0, 0 } },
0, /* compression level */
1, /* autoflush */
{ 0, 0, 0, 0 }, /* reserved, must be set to 0 */
{
LZ4F_max256KB, /* blockSizeID */
LZ4F_blockLinked, /* blockMode */
LZ4F_noContentChecksum, /* contentChecksumFlag */
LZ4F_frame, /* frameType */
0, /* contentSize */
0, /* dictID */
LZ4F_noBlockChecksum /* blockChecksumFlag */
},
0, /* compressionLevel */
1, /* autoFlush */
0, /* favorDecSpeed */
{ 0, 0, 0 }, /* reserved, must be set to 0 */
};
class FileLz4Compression: public SinkTaskBase
......
......@@ -22,7 +22,7 @@
#ifndef CTSAVING_CBF_H
#define CTSAVING_CBF_H
#include <cbf/cbf.h>
#include <cbflib/cbf.h>
#include "lima/CtSaving.h"
......
......@@ -38,7 +38,7 @@ Saving format dependencies
- CBF_, a library for accessing Crystallographic Binary Files (CBF files) and Image-supporting CIF (imgCIF) files ;
- HDF5_, a data model, library, and file format for storing and managing data ;
- CCfits_, CFITSIO_, a library for reading and writing data files in FITS (Flexible Image Transport System) data format ;
- LZ4_ = 1.7.x, a lossless compression algorithm ;
- LZ4_ >= 1.8.2, a lossless compression algorithm ;
- libconfig_, a libraryfor processing structured configuration files. For Windows, you can download the ESRF binary package `libconfig-windows`_ and install it under ``C:\Program Files``.
PyTango_ server dependencies
......
......@@ -328,6 +328,8 @@ class CMakeOptions:
def get_install_options(self):
opts = ['--build .', '--target install']
if OS_TYPE == 'Windows':
opts += ['--config %s' % self.cfg.get('build-type')]
return self.get_cmd_line_from_options(opts)
@staticmethod
......
Subproject commit f56b83502ddab7e70874a4665b76e0fed0019446
Subproject commit 32eed661e5fede17e0dcea612dbe0f6de09a8f54