diff --git a/conda-recepie/conda_build_config.yaml b/conda-recepie/conda_build_config.yaml deleted file mode 100644 index cd5704589..000000000 --- a/conda-recepie/conda_build_config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - 3.10 - -numpy: - - 1.17 diff --git a/conda-recepie/copy_ctbgui.sh b/conda-recepie/copy_ctbgui.sh deleted file mode 100644 index b4f52efce..000000000 --- a/conda-recepie/copy_ctbgui.sh +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package -mkdir $PREFIX/lib -mkdir $PREFIX/bin -mkdir $PREFIX/include - - - -cp build/bin/ctbGui $PREFIX/bin/. -cp build/bin/libctbRootLib.so $PREFIX/lib/. - diff --git a/conda-recepie/copy_gui.sh b/conda-recepie/copy_gui.sh deleted file mode 100755 index a6bce55d8..000000000 --- a/conda-recepie/copy_gui.sh +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package -#Copy the GUI -mkdir -p $PREFIX/bin -cp build/install/bin/slsDetectorGui $PREFIX/bin/. diff --git a/conda-recepie/copy_lib.sh b/conda-recepie/copy_lib.sh deleted file mode 100755 index da40a721a..000000000 --- a/conda-recepie/copy_lib.sh +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -mkdir -p $PREFIX/lib -mkdir -p $PREFIX/bin -mkdir -p $PREFIX/include/sls -# mkdir $PREFIX/include/slsDetectorPackage - -#Shared and static libraries -cp build/install/lib/* $PREFIX/lib/ - -#Binaries -cp build/install/bin/sls_detector_acquire $PREFIX/bin/. -cp build/install/bin/sls_detector_get $PREFIX/bin/. -cp build/install/bin/sls_detector_put $PREFIX/bin/. -cp build/install/bin/sls_detector_help $PREFIX/bin/. -cp build/install/bin/slsReceiver $PREFIX/bin/. -cp build/install/bin/slsMultiReceiver $PREFIX/bin/. - - -cp build/install/include/sls/* $PREFIX/include/sls -cp -rv build/install/share $PREFIX diff --git a/conda-recepie/copy_moench.sh b/conda-recepie/copy_moench.sh deleted file mode 100644 index fc4daea2c..000000000 --- a/conda-recepie/copy_moench.sh +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -#Copy the Moench executables -mkdir -p $PREFIX/bin -cp build/install/bin/moench* $PREFIX/bin/. diff --git a/conda-recepie/meta.yaml b/conda-recepie/meta.yaml deleted file mode 100755 index 617854d85..000000000 --- a/conda-recepie/meta.yaml +++ /dev/null @@ -1,134 +0,0 @@ - -package: - name: sls_detector_software - version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} - -source: - - path: .. - -build: - number: 0 - binary_relocation: True - rpaths: - - lib/ - -requirements: - build: - - {{ compiler('c') }} - - {{compiler('cxx')}} - - cmake - - qwt 6.* - - qt 4.8.* - - zeromq - - xorg-libx11 - - xorg-libice - - xorg-libxext - - xorg-libsm - - xorg-libxau - - xorg-libxrender - - xorg-libxfixes - - {{ cdt('mesa-libgl-devel') }} # [linux] - - {{ cdt('mesa-libegl-devel') }} # [linux] - - {{ cdt('mesa-dri-drivers') }} # [linux] - - {{ cdt('libselinux') }} # [linux] - - {{ cdt('libxdamage') }} # [linux] - - {{ cdt('libxxf86vm') }} # [linux] - - expat - - host: - - libstdcxx-ng - - libgcc-ng - - zeromq - - xorg-libx11 - - xorg-libice - - xorg-libxext - - xorg-libsm - - xorg-libxau - - xorg-libxrender - - xorg-libxfixes - - expat - - run: - - zeromq - - libstdcxx-ng - - libgcc-ng - - -outputs: - - name: slsdetlib - script: copy_lib.sh - - requirements: - build: - - {{ compiler('c') }} - - {{compiler('cxx')}} - - libstdcxx-ng - - libgcc-ng - - zeromq - - host: - - zeromq - - run: - - libstdcxx-ng - - libgcc-ng - - zeromq - - - name: slsdet - - script: build_pylib.sh - - requirements: - build: - - python - - {{ compiler('c') }} - - {{compiler('cxx')}} - - {{ pin_subpackage('slsdetlib', exact=True) }} - - setuptools - - host: - - python - - {{ pin_subpackage('slsdetlib', exact=True) }} - - - run: - - libstdcxx-ng - - libgcc-ng - - python - - numpy - - {{ pin_subpackage('slsdetlib', exact=True) }} - - - test: - imports: - - slsdet - - - name: slsdetgui - script: copy_gui.sh - requirements: - - build: - - {{ compiler('c') }} - - {{compiler('cxx')}} - - {{ pin_subpackage('slsdetlib', exact=True) }} - - qwt 6.* - - run: - - {{ pin_subpackage('slsdetlib', exact=True) }} - - qwt 6.* - - qt 4.8.* - - expat - - - name: moenchzmq - script: copy_moench.sh - requirements: - - build: - - {{ compiler('c') }} - - {{compiler('cxx')}} - - {{ pin_subpackage('slsdetlib', exact=True) }} - - - run: - - {{ pin_subpackage('slsdetlib', exact=True) }} - - expat diff --git a/conda-recepie/run_test.sh b/conda-recepie/run_test.sh deleted file mode 100755 index 24068d625..000000000 --- a/conda-recepie/run_test.sh +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package -ctest -j2 \ No newline at end of file diff --git a/conda-recipes/moenchzmq/build.sh b/conda-recipes/moenchzmq/build.sh new file mode 100755 index 000000000..eec7581c2 --- /dev/null +++ b/conda-recipes/moenchzmq/build.sh @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package + +mkdir build + +cd build +cmake .. \ + -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DSLS_USE_MOENCH=ON\ + -DSLS_USE_TESTS=ON \ + -DSLS_EXT_BUILD=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DSLS_USE_HDF5=OFF\ + +NCORES=$(getconf _NPROCESSORS_ONLN) +echo "Building using: ${NCORES} cores" +cmake --build . -- -j${NCORES} +cmake --build . --target install + +CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 + +#Clean up for the next build +# cd .. +# rm -rf build \ No newline at end of file diff --git a/conda-recipes/moenchzmq/meta.yaml b/conda-recipes/moenchzmq/meta.yaml new file mode 100755 index 000000000..34d2d3984 --- /dev/null +++ b/conda-recipes/moenchzmq/meta.yaml @@ -0,0 +1,36 @@ + +package: + name: moenchzmq + version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} + +source: + - path: ../.. + +build: + number: 0 + binary_relocation: True + rpaths: + - lib/ + +requirements: + build: + - {{ compiler('c') }} + - {{compiler('cxx')}} + - cmake + - libstdcxx-ng + - libgcc-ng + - zeromq + - libtiff + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + + host: + - zeromq + - libtiff + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + + run: + - libstdcxx-ng + - libgcc-ng + - zeromq + - libtiff + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} diff --git a/conda-recepie/build_pylib.sh b/conda-recipes/slsdet/build.sh old mode 100755 new mode 100644 similarity index 73% rename from conda-recepie/build_pylib.sh rename to conda-recipes/slsdet/build.sh index f7cbdc496..e256dd475 --- a/conda-recepie/build_pylib.sh +++ b/conda-recipes/slsdet/build.sh @@ -2,5 +2,7 @@ # Copyright (C) 2021 Contributors to the SLS Detector Package echo "|<-------- starting python build" +echo $PWD cd python -${PYTHON} setup.py install +echo "folder: $PWD" +${PYTHON} setup.py install \ No newline at end of file diff --git a/conda-recipes/slsdet/conda_build_config.yaml b/conda-recipes/slsdet/conda_build_config.yaml new file mode 100644 index 000000000..2a0e4a0f5 --- /dev/null +++ b/conda-recipes/slsdet/conda_build_config.yaml @@ -0,0 +1,2 @@ +python: + - 3.9 diff --git a/conda-recipes/slsdet/meta.yaml b/conda-recipes/slsdet/meta.yaml new file mode 100755 index 000000000..3a0082f09 --- /dev/null +++ b/conda-recipes/slsdet/meta.yaml @@ -0,0 +1,34 @@ + +package: + name: slsdet + version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} + +source: + - path: ../.. + +build: + number: 0 + binary_relocation: True + rpaths: + - lib/ + +requirements: + build: + - python + - {{ compiler('c') }} + - {{compiler('cxx')}} + - cmake + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + - setuptools + + host: + - python + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + + + run: + - libstdcxx-ng + - libgcc-ng + - python + - numpy + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} \ No newline at end of file diff --git a/conda-recipes/slsdetgui/build.sh b/conda-recipes/slsdetgui/build.sh new file mode 100755 index 000000000..49ea31e43 --- /dev/null +++ b/conda-recipes/slsdetgui/build.sh @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package + +mkdir build + +cd build +cmake .. \ + -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DSLS_USE_GUI=ON \ + -DSLS_EXT_BUILD=ON\ + -DCMAKE_BUILD_TYPE=Release \ + -DSLS_USE_HDF5=OFF\ + +NCORES=$(getconf _NPROCESSORS_ONLN) +echo "Building using: ${NCORES} cores" +cmake --build . -- -j${NCORES} +cmake --build . --target install + +CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 + +#Clean up for the next build +# cd .. +# rm -rf build \ No newline at end of file diff --git a/conda-recipes/slsdetgui/meta.yaml b/conda-recipes/slsdetgui/meta.yaml new file mode 100644 index 000000000..6a089a34e --- /dev/null +++ b/conda-recipes/slsdetgui/meta.yaml @@ -0,0 +1,91 @@ +package: + name: slsdetgui + version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} + +source: + - path: ../.. + +build: + number: 0 + binary_relocation: True + rpaths: + - lib/ + +requirements: + build: + - {{ compiler('c') }} + - {{compiler('cxx')}} + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + - cmake + - qwt 6.* + - qt 4.8.* + - zeromq + - xorg-libx11 + - xorg-libice + - xorg-libxext + - xorg-libsm + - xorg-libxau + - xorg-libxrender + - xorg-libxfixes + - {{ cdt('mesa-libgl-devel') }} # [linux] + - {{ cdt('mesa-libegl-devel') }} # [linux] + - {{ cdt('mesa-dri-drivers') }} # [linux] + - {{ cdt('libselinux') }} # [linux] + - {{ cdt('libxdamage') }} # [linux] + - {{ cdt('libxxf86vm') }} # [linux] + - expat + + host: + - libstdcxx-ng + - libgcc-ng + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + - zeromq + - xorg-libx11 + - xorg-libice + - xorg-libxext + - xorg-libsm + - xorg-libxau + - xorg-libxrender + - xorg-libxfixes + - expat + + run: + - zeromq + - libstdcxx-ng + - libgcc-ng + - slsdetlib {{ environ.get('GIT_DESCRIBE_TAG', '') }} + - qwt 6.* + - qt 4.8.* + - expat + + + + # - name: slsdetgui + # script: copy_gui.sh + # requirements: + + # build: + # - {{ compiler('c') }} + # - {{compiler('cxx')}} + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - qwt 6.* + + # run: + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - qwt 6.* + # - qt 4.8.* + # - expat + + # - name: moenchzmq + # script: copy_moench.sh + # requirements: + + # build: + # - {{ compiler('c') }} + # - {{compiler('cxx')}} + # - {{ pin_subpackage('slsdetlib', exact=True) }} + + + # run: + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - expat \ No newline at end of file diff --git a/conda-recepie/build.sh b/conda-recipes/slsdetlib/build.sh similarity index 75% rename from conda-recepie/build.sh rename to conda-recipes/slsdetlib/build.sh index 62b9ca1d9..fdaa34f23 100755 --- a/conda-recepie/build.sh +++ b/conda-recipes/slsdetlib/build.sh @@ -2,17 +2,18 @@ # Copyright (C) 2021 Contributors to the SLS Detector Package mkdir build -mkdir install + cd build cmake .. \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ - -DCMAKE_INSTALL_PREFIX=install \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DSLS_USE_TEXTCLIENT=ON \ -DSLS_USE_RECEIVER=ON \ - -DSLS_USE_GUI=ON \ - -DSLS_USE_MOENCH=ON\ + -DSLS_USE_GUI=OFF \ + -DSLS_USE_MOENCH=OFF\ -DSLS_USE_TESTS=ON \ -DSLS_USE_PYTHON=OFF \ + -DSLS_DEVEL_HEADERS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DSLS_USE_HDF5=OFF\ @@ -22,3 +23,7 @@ cmake --build . -- -j${NCORES} cmake --build . --target install CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 + +#Clean up for the next build +# cd .. +# rm -rf build \ No newline at end of file diff --git a/conda-recipes/slsdetlib/meta.yaml b/conda-recipes/slsdetlib/meta.yaml new file mode 100755 index 000000000..a6907e2cd --- /dev/null +++ b/conda-recipes/slsdetlib/meta.yaml @@ -0,0 +1,90 @@ + +package: + name: slsdetlib + version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} + +source: + - path: ../.. + +build: + number: 0 + binary_relocation: True + rpaths: + - lib/ + +requirements: + build: + - {{ compiler('c') }} + - {{compiler('cxx')}} + - cmake + - libstdcxx-ng + - libgcc-ng + - zeromq + + host: + - zeromq + + run: + - libstdcxx-ng + - libgcc-ng + - zeromq + + +# outputs: +# - name: slsdetlib +# script: build_lib.sh + +# requirements: +# build: +# - {{ compiler('c') }} +# - {{compiler('cxx')}} +# - libstdcxx-ng +# - libgcc-ng +# - zeromq + +# host: +# - zeromq + +# run: +# - libstdcxx-ng +# - libgcc-ng +# - zeromq + + # - name: slsdet + # script: build_py.sh + + # requirements: + # build: + # - python + # - {{ compiler('c') }} + # - {{compiler('cxx')}} + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - setuptools + + # host: + # - python + # - {{ pin_subpackage('slsdetlib', exact=True) }} + + + # run: + # - libstdcxx-ng + # - libgcc-ng + # - python + # - numpy + # - {{ pin_subpackage('slsdetlib', exact=True) }} + + # - name: slsdetgui + # script: build_gui.sh + # requirements: + + # build: + # - {{ compiler('c') }} + # - {{compiler('cxx')}} + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - qwt 6.* + + # run: + # - {{ pin_subpackage('slsdetlib', exact=True) }} + # - qwt 6.* + # - qt 4.8.* + # - expat \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b30a8aa26..d905f6adc 100755 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,7 @@ # Copyright (C) 2021 Contributors to the SLS Detector Package include_directories( ${PROJECT_SOURCE_DIR}/libs/catch + ${SLS_INTERNAL_RAPIDJSON_DIR} include )