Commit 874e0f9b authored by James Clark's avatar James Clark

Build with cmake

parent 0e3f279f
......@@ -16,6 +16,8 @@ BayesWave
BayesWaveCleanFrame
BayesWavePost
BayesWaveToLALPSD
src/version.h
src/bayeswave.pc
# autotools stuff
.libs/
......@@ -31,7 +33,9 @@ configure
libtool
Makefile
Makefile.in
bayeswave.spec
# docs stuff
doc/_build
doc/index.rst
......@@ -4,7 +4,7 @@ variables:
NIGHTLY: $CI_REGISTRY_IMAGE:nightly
TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
BUILD_DIR: test-install
BUILD_TARGET: ${CI_PROJECT_DIR}/${BUILD_DIR}
BUILD_TARGET: $CI_PROJECT_DIR/$BUILD_DIR
TEST_OUTPUT: test-output
stages:
......@@ -16,59 +16,61 @@ stages:
build-env:
stage: build
script:
- mkdir -p ${BUILD_TARGET}
- sed "s|INSTALL_DIR|${BUILD_DIR}|g" ${CI_PROJECT_DIR}/etc/bayeswave-user-env.sh > ${BUILD_TARGET}/bayeswave-user-env.sh
- mkdir -p $BUILD_TARGET
- sed "s|INSTALL_DIR|$BUILD_DIR|g" $CI_PROJECT_DIR/etc/bayeswave-user-env.sh > $BUILD_TARGET/bayeswave-user-env.sh
artifacts:
paths:
- ${BUILD_DIR}
- $BUILD_DIR
build-bayeswave:
stage: build
image: ligo/software:stretch
image: ligo/software:el7
script:
- pushd ${CI_PROJECT_DIR}/src
- autoreconf --verbose --force --install --make
- ./configure --prefix ${BUILD_TARGET} CFLAGS="-Wno-format-truncation -g -O3"
- make
- make install
- pushd $CI_PROJECT_DIR
- mkdir -p build
- cmake3 . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=true -DCMAKE_INSTALL_PREFIX=$BUILD_DIR
- cmake3 --build . -- VERBOSE=1
- cmake3 --build . --target install
- popd
artifacts:
paths:
- ${BUILD_DIR}
- $BUILD_DIR
build-BayesWaveUtils:
stage: build
image: ligo/software:stretch
image: ligo/software:el7
script:
- pushd BayesWaveUtils
- python setup.py install --prefix ${BUILD_TARGET}
- python setup.py install --prefix $BUILD_TARGET
- popd
artifacts:
paths:
- ${BUILD_DIR}
- $BUILD_DIR
# FIXME: including the full commandline here is illustrative. We have a test
# script in the repository that does the same thing.
test:BayesWave:
stage: test
image: ligo/software:stretch
image: ligo/software:el7
script:
- source ${BUILD_DIR}/bayeswave-user-env.sh
- source $BUILD_DIR/bayeswave-user-env.sh
- cat $BUILD_DIR/bayeswave-user-env.sh
- ls -R $BUILD_DIR
- BayesWave --help
- "BayesWave --ifo H1 --H1-flow 32 \
--H1-cache LALSimAdLIGO --H1-channel LALSimAdLIGO \
--trigtime 900000000.00 --srate 512 --seglen 4 --PSDstart 900000000 \
--PSDlength 1024 --NCmin 2 --NCmax 2 --dataseed 1234 \
--Niter 500 --outputDir ${TEST_OUTPUT}"
--Niter 500 --outputDir $TEST_OUTPUT"
dependencies:
- build-env
- build-bayeswave
test:BayesWavePost:
stage: test
image: ligo/software:stretch
image: ligo/software:el7
script:
- source ${BUILD_DIR}/bayeswave-user-env.sh
- source $BUILD_DIR/bayeswave-user-env.sh
- BayesWavePost --help
dependencies:
- build-env
......@@ -76,15 +78,24 @@ test:BayesWavePost:
test:bayeswave_pipe:
stage: test
image: ligo/software:stretch
image: ligo/software:el7
script:
- ls ${BUILD_DIR}
- source ${BUILD_DIR}/bayeswave-user-env.sh
- ls $BUILD_DIR
- source $BUILD_DIR/bayeswave-user-env.sh
- bayeswave_pipe --help
dependencies:
- build-env
- build-BayesWaveUtils
test:docker:
stage: test
image: docker:latest
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- docker build --pull -t $CI_REGISTRY_IMAGE:latest --file Dockerfile .
- docker run $CI_REGISTRY_IMAGE:latest /test-bayeswave.sh
# FIXME: Add a proper test stage for the docker images
docker:latest:
......@@ -97,7 +108,6 @@ docker:latest:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- docker build --pull -t $CI_REGISTRY_IMAGE:latest --file Dockerfile .
- docker run -u $(id -u):$(id -g) $CI_REGISTRY_IMAGE:latest "/opt/lscsoft/bayeswave/test/test-bayeswave.sh"
- docker push $CI_REGISTRY_IMAGE:latest
......@@ -111,7 +121,6 @@ docker:tags:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --file Dockerfile .
- docker run -u $(id -u):$(id -g) $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG "/opt/lscsoft/bayeswave/test/test-bayeswave.sh"
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
docs:
......@@ -124,7 +133,7 @@ docs:
- apt-get -yqq update
- apt-get -yqq install curl
- curl --location --output pandoc.deb https://github.com/jgm/pandoc/releases/download/2.7.2/pandoc-2.7.2-1-amd64.deb
- dpkg --install pandoc.deb || { apt-get -y -f install; dpkg --install pandoc.deb; }
- dpkg --install pandoc.deb || apt-get -y -f install; dpkg --install pandoc.deb;
# install python dependencies
- python3 -m pip install -r doc/requirements.txt
script:
......
#
# CMake packaging for BayesWave
# Copyright 2019 James Alexander Clark <james.clark@ligo.org>
# Based on CMake packaging for libframe & Frv by Duncan MacLeod <duncan.macleod@ligo.org>
#
# -- package info -----------
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
project(
bayeswave
LANGUAGES C
VERSION 1.0.3
DESCRIPTION "LIGO/VIRGO burst analysis algorithm"
HOMEPAGE_URL "https://git.ligo.org/lscsoft/bayeswave"
)
include(GNUInstallDirs)
include(CheckFunctionExists)
find_package(PkgConfig)
find_package(Git)
# -- build components -------
# C library | enable/disable with -DENABLE_C={yes,no} (default yes)
add_subdirectory(src)
#add_subdirectory(doc)
# -- packaging components ---
set(SPEC_IN "${CMAKE_CURRENT_SOURCE_DIR}/bayeswave.spec.in")
set(SPEC "${CMAKE_CURRENT_SOURCE_DIR}/bayeswave.spec")
configure_file(${SPEC_IN} ${SPEC} @ONLY)
# -- build tarball ----------
#
# to build a source tarball:
#
# mkdir dist
# pushd dist
# cmake ..
# cmake --build . --target package_source
#
set(CPACK_PACKAGE_MAJOR ${${PROJECT_NAME}_MAJOR_VERSION})
set(CPACK_PACKAGE_MINOR ${${PROJECT_NAME}_MINOR_VERSION})
set(CPACK_PACKAGE_PATCH ${${PROJECT_NAME}_PATCH_VERSION})
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_MAJOR}.${CPACK_PACKAGE_MINOR}.${CPACK_PACKAGE_PATCH}")
set(CPACK_SOURCE_GENERATOR TXZ)
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${${PROJECT_NAME}_VERSION})
set(CPACK_SOURCE_IGNORE_FILES
"/.*~$/"
".*~$"
"\\\\.svn/"
"\\\\.git"
"build/"
"CMakeFiles/"
"CMakeCache.txt"
"_CPack_Packages/"
"\\\\.cmake"
"Makefile"
"\\\\.deps/"
"autom4te.cache/"
"\\\\.tar\\\\.xz"
)
include(CPack)
FROM containers.ligo.org/lscsoft/lalsuite/lalsuite-v6.53:stretch
FROM containers.ligo.org/lscsoft/lalsuite/lalsuite-v6.53:el7
ARG version
RUN echo "Building bayeswave"
MAINTAINER James Alexander Clark <james.clark@ligo.org>
# Dependencies
RUN apt-get update && apt-get install --assume-yes \
build-essential \
pkg-config \
python-pip \
RUN yum upgrade -y && \
yum install -y gcc \
cmake3 \
gcc-c++ \
help2man \
rpm-build \
which \
git \
python-ligo-lw
python-ligo-lw && \
yum clean all && \
rm -rf /var/cache/yum
RUN python -m pip install --upgrade setuptools
# RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
# python get-pip.py && \
# rm get-pip.py
# Copy and build BayesWave
WORKDIR /
# This seems very hacky but will get us git verion info in the configure.ac:
COPY .git /
COPY install.sh /
COPY src /src
copy etc/bayeswave-user-env.sh /etc/bayeswave-user-env.sh
COPY BayesWaveUtils /BayesWaveUtils
RUN sh install.sh /opt/lscsoft/bayeswave
COPY test /opt/lscsoft/bayeswave/test
RUN rm -rf .git install.sh /src /BayesWaveUtils /etc/bayeswave-user-env.sh
RUN mkdir -p /cvmfs /hdfs /hadoop /etc/condor
# BayesWave env
ENV PATH /opt/lscsoft/bayeswave/bin:${PATH}
ENV LD_LIBRARY_PATH /opt/lscsoft/bayeswave/lib:${LD_LIBRARY_PATH}
ENV PYTHONPATH /opt/lscsoft/bayeswave/lib/python2.7/site-packages:${PYTHONPATH}
WORKDIR /tmp
RUN mkdir /tmp/bayeswave
COPY bayeswave.spec.in /tmp/bayeswave
COPY .git /tmp/bayeswave
COPY CMakeLists.txt /tmp/bayeswave
COPY src /tmp/bayeswave/src
COPY etc/bayeswave-user-env.sh /tmp/bayeswave/etc/bayeswave-user-env.sh
COPY README.md /tmp
COPY BayesWaveUtils /tmp/bayeswave/BayesWaveUtils
ADD test/test-bayeswave.sh /
# Python Utils
RUN cd /tmp/bayeswave/BayesWaveUtils && \
python /tmp/bayeswave/BayesWaveUtils/setup.py install
RUN mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
RUN echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
RUN mkdir dist && \
pushd dist && \
cmake3 /tmp/bayeswave && \
cmake3 --build . --target package_source && \
mv bayeswave-*.tar.xz /root/rpmbuild/SOURCES/ && \
popd
RUN rpmbuild -ba /tmp/bayeswave/bayeswave.spec
RUN rpm -ivh /root/rpmbuild/RPMS/x86_64/bayeswave-1.0.3-1.el7.x86_64.rpm
RUN rm -rf .git install.sh /src /BayesWaveUtils /etc/bayeswave-user-env.sh /build.sh /CMakeLists.txt /build
RUN mkdir -p /cvmfs /hdfs /hadoop /etc/condor /test
# Clean up
RUN rm -rf /tmp/* ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
WORKDIR /
ENTRYPOINT ["/bin/bash"]
......
Name: @PROJECT_NAME@
Version: @PROJECT_VERSION@
Release: 1%{?dist}
Summary: @PROJECT_DESCRIPTION@
License: GPLv2
Source: http://software.ligo.org/lscsoft/source/%{name}-%{version}.tar.xz
URL: https://git.ligo.org/lscsoft/bayeswave
Packager: Duncan Macleod <duncan.macleod@ligo.org>
Prefix: %{_prefix}
# -- build requires ---------
BuildRequires: gcc, gcc-c++, glibc
BuildRequires: cmake3 >= 3.12.0
BuildRequires: make
BuildRequires: help2man
BuildRequires: gsl-devel
BuildRequires: fftw-devel
BuildRequires: libframe-devel
BuildRequires: libmetaio-devel
BuildRequires: lal-devel
BuildRequires: lalframe-devel
BuildRequires: lalmetaio-devel
BuildRequires: lalsimulation-devel
BuildRequires: lalinspiral-devel
BuildRequires: lalinference-devel
# -- package definitions ----
%description
A Bayesian algorithm designed to robustly distinguish gravitational wave
signals from noise and instrumental glitches without relying on any prior
assumptions of waveform morphology.
BayesWave produces posterior probability distributions directly on
gravitational wave signals and instrumental glitches, allowing robust,
morphology-independent waveform reconstruction.
%package devel
Summary: Files and documentation needed for compiling bayeswave programs
Requires: %{name} = %{version}
%description devel
A Bayesian algorithm designed to robustly distinguish gravitational wave
signals from noise and instrumental glitches without relying on any prior
assumptions of waveform morphology.
This package contains the files needed for building libframe programs
# -- build stages -----------
%prep
%setup -c -T -D -a 0 -n %{name}-%{version}
%build
%cmake3 \
-DCMAKE_BUILD_TYPE=Release \
%{name}-%{version}
%make_build
%install
%make_install
# man pages
mkdir -vp %{buildroot}%{_mandir}/man1
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:${LD_LIBRARY_PATH}"
help2man --source %{name} --version-string %{version} \
--section 1 --no-info --no-discard-stderr \
--output %{buildroot}%{_mandir}/man1/BayesWave.1 %{buildroot}%{_bindir}/BayesWave
help2man --source %{name} --version-string %{version} \
--section 1 --no-info --no-discard-stderr \
--output %{buildroot}%{_mandir}/man1/BayesWaveCleanFrame.1 %{buildroot}%{_bindir}/BayesWaveCleanFrame
help2man --source %{name} --version-string %{version} \
--section 1 --no-info --no-discard-stderr \
--output %{buildroot}%{_mandir}/man1/BayesWavePost.1 %{buildroot}%{_bindir}/BayesWavePost
help2man --source %{name} --version-string %{version} \
--section 1 --no-info --no-discard-stderr \
--output %{buildroot}%{_mandir}/man1/BayesWaveToLALPSD.1 %{buildroot}%{_bindir}/BayesWaveToLALPSD
%check
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="%{buildroot}%{_libdir}/pkgconfig:${PKG_CONFIG_PATH}"
# run each executable with no args (equivalent of --help)
%{buildroot}%{_bindir}/BayesWave
%{buildroot}%{_bindir}/BayesWaveCleanFrame
%{buildroot}%{_bindir}/BayesWavePost
%{buildroot}%{_bindir}/BayesWaveToLALPSD
# run pkg-config to check metadata
pkg-config --modversion @PROJECT_NAME@
%clean
rm -rf %{buildroot}
# -- files ------------------
%files
%{_bindir}/*
%{_libdir}/*.so.*
%{_mandir}/man1/*
%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
# -- changelog --------------
# dates should be formatted using: 'date +"%a %b %d %Y"'
%changelog
* Thu Jun 6 2019 Duncan Macleod <duncan.macleod@ligo.org> 1.3.0-1
- Rework packaging for cmake
#!/bin/bash
set -e
INSTALL_PREFIX=$1
rm -rf build
mkdir -p build
pushd build
cmake3 .. \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=true
cmake3 --build . -- VERBOSE=1
cmake3 --build . --target install
popd
......@@ -14,5 +14,6 @@ pyminor=$(python -c 'import sys; print(sys.version_info[1])')
# BayesWave
export PATH=${BAYESWAVE_PREFIX}/bin:${PATH}
export LD_LIBRARY_PATH=${BAYESWAVE_PREFIX}/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${BAYESWAVE_PREFIX}/lib64:${LD_LIBRARY_PATH}
export PYTHONPATH=${BAYESWAVE_PREFIX}/lib/python${pymajor}.${pyminor}/site-packages:${PYTHONPATH}
......@@ -17,6 +17,7 @@
set -e
install_dir=${1}
# Remove trailing slash if present
......@@ -31,19 +32,20 @@ echo "Installing to ${install_dir}"
#
# Configure and make main executables
#
START=${PWD}
cd src
autoreconf --verbose --force --install --make
./configure --prefix ${install_dir} CFLAGS="-Wno-format-truncation -g -O3"
make install
cd ${START}
# START=${PWD}
# cd src
# autoreconf --verbose --force --install --make
# ./configure --prefix ${install_dir} CFLAGS="-Wno-format-truncation -g -O3"
# make install
# cd ${START}
./build.sh ${install_dir}
#
# Install python codes
#
cd BayesWaveUtils
pushd BayesWaveUtils
python setup.py install --prefix ${install_dir}
cd ${START}
popd
#
# Environment script
......
......@@ -19,6 +19,7 @@
#include <fftw3.h>
#include "version.h"
#include "BayesLine.h"
#include "BayesWave.h"
#include "BayesWaveIO.h"
......@@ -817,7 +818,7 @@ void print_version(FILE *fptr)
fprintf(fptr, " Git version: %s\n", GIT_VER);
fprintf(fptr, " Git commit: %s\n", GIT_HASH);
fprintf(fptr, " Git commit author: %s\n",GIT_AUTHOR);
fprintf(fptr, " Git commit date: %s\n",GIT_DATE);
fprintf(fptr, " Git commit date: %s\n", GIT_DATE);
}
void print_run_flags(FILE *fptr, struct Data *data, struct Prior *prior)
{
......
# -- C library --------------
# library version | the rules for shared library version are complicated,
# the only very important thing is that if the ABI
# changes in a backwards-incompatible way, you should
# increment the MAJOR version number (and probably reset
# the others)
set(BAYESWAVE_VERSION_MAJOR 1)
set(BAYESWAVE_VERSION_MINOR 0)
set(BAYESWAVE_VERSION_PATCH 3)
set(BAYESWAVE_VERSION_STRING
${BAYESWAVE_VERSION_MAJOR}.${BAYESWAVE_VERSION_MINOR}.${BAYESWAVE_VERSION_PATCH})
# find headers
pkg_check_modules(GSL REQUIRED "gsl")
pkg_check_modules(FFTW REQUIRED "fftw3")
pkg_check_modules(fftw3f REQUIRED "fftw3f")
pkg_check_modules(LIBFRAME REQUIRED "libframe")
pkg_check_modules(LIBMETAIO REQUIRED "libmetaio")
pkg_check_modules(LAL REQUIRED "lal")
pkg_check_modules(LALSUPPORT REQUIRED "lalsupport")
pkg_check_modules(LALFRAME REQUIRED "lalframe")
pkg_check_modules(LALINFERENCE REQUIRED "lalinference")
pkg_check_modules(LALINSPIRAL REQUIRED "lalinspiral") # REALLY?
pkg_check_modules(LALMETAIO REQUIRED "lalmetaio")
pkg_check_modules(LALSIMULATION REQUIRED "lalsimulation")
# -- VCS info --------
execute_process(COMMAND
"${GIT_EXECUTABLE}" config --get remote.origin.url
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_URL
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "GIT_URL is ${GIT_URL}")
execute_process(COMMAND
"${GIT_EXECUTABLE}" describe --dirty --always --tags
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_VER
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "GIT_VER is ${GIT_VER}")
execute_process(COMMAND
"${GIT_EXECUTABLE}" log -1 --format=%H
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_HASH
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "GIT_HASH is ${GIT_HASH}")
execute_process(COMMAND
"${GIT_EXECUTABLE}" log -1 --format=%ae
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_AUTHOR
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "GIT_AUTHOR is ${GIT_AUTHOR}")
execute_process(COMMAND
"${GIT_EXECUTABLE}" log -1 --format=%ad
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DATE
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "GIT_DATE is ${GIT_DATE}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${CMAKE_CURRENT_SOURCE_DIR}/version.h @ONLY)
# define library
set(
BAYESWAVE_HEADERS
version.h
BayesLine.h
BayesWave.h
BayesWaveEvidence.h
BayesWaveIO.h
BayesWaveLikelihood.h
BayesWaveMCMC.h
BayesWaveMath.h
BayesWaveModel.h
BayesWavePrior.h
BayesWaveProposal.h
BayesWaveWavelet.h
)
add_library(
libbayeswave SHARED
BayesLine.c
BayesWaveIO.c
BayesWaveMath.c
BayesWaveModel.c
BayesWaveWavelet.c
BayesWavePrior.c
BayesWaveLikelihood.c
BayesWaveProposal.c
BayesWaveEvidence.c
BayesWaveMCMC.c
)
target_include_directories(libbayeswave PRIVATE
${GSL_INCLUDE_DIRS}
${FFTW_INCLUDE_DIRS}
${FFTW3F_INCLUDE_DIRS}
${LIBFRAME_INCLUDE_DIRS}
${LIBMETAIO_INCLUDE_DIRS}
${LAL_INCLUDE_DIRS}
${LALSUPPORT_INCLUDE_DIRS}
${LALFRAME_INCLUDE_DIRS}
${LALINFERENCE_INCLUDE_DIRS}
${LALINSPIRAL_INCLUDE_DIRS}
${LALMETAIO_INCLUDE_DIRS}
${LALSIMULATION_INCLUDE_DIRS}
)
target_link_libraries(libbayeswave
m
gsl
fftw3
fftw3f
Frame
lal
lalsupport
lalframe
lalinference
lalinspiral
lalmetaio
lalsimulation
)
set_target_properties(
libbayeswave PROPERTIES
OUTPUT_NAME bayeswave
VERSION ${BAYESWAVE_VERSION_STRING}
SOVERSION ${BAYESWAVE_VERSION_MAJOR}
PUBLIC_HEADER "${BAYESWAVE_HEADERS}"
)
set_property(TARGET libbayeswave PROPERTY C_STANDARD 11)
# install
install(
TARGETS libbayeswave
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
# -- executables --------
add_executable(BayesWave BayesWave.c)
target_link_libraries(BayesWave libbayeswave)
set_property(TARGET BayesWave PROPERTY C_STANDARD 11)
add_executable(BayesWavePost BayesWavePost.c)
target_link_libraries(BayesWavePost libbayeswave)
set_property(TARGET BayesWavePost PROPERTY C_STANDARD 11)
add_executable(BayesWaveCleanFrame BayesWaveCleanFrame.c)
target_link_libraries(BayesWaveCleanFrame libbayeswave)
set_property(TARGET BayesWaveCleanFrame PROPERTY C_STANDARD 11)
add_executable(BayesWaveToLALPSD BayesWaveToLALPSD.c)
target_link_libraries(BayesWaveToLALPSD libbayeswave)
set_property(TARGET BayesWaveToLALPSD PROPERTY C_STANDARD 11)
install(
TARGETS
BayesWave
BayesWavePost
BayesWaveCleanFrame
BayesWaveToLALPSD
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# -- pkgconfig --------------
# install pkgconfig file
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig