Skip to content
Snippets Groups Projects
Commit eacebc05 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Bug 1310: Added pyparmdb to CMake build.

parent ad8260dc
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ lofar_add_subdirectory(Calibration) ...@@ -41,7 +41,7 @@ lofar_add_subdirectory(Calibration)
lofar_add_subdirectory(DP3) lofar_add_subdirectory(DP3)
lofar_add_subdirectory(Imager) lofar_add_subdirectory(Imager)
lofar_add_subdirectory(Pipeline) lofar_add_subdirectory(Pipeline)
#lofar_add_subdirectory(pyparmdb) lofar_add_subdirectory(pyparmdb)
## --------------------------------------------------------------------------- ## ---------------------------------------------------------------------------
## Generate configuration header file. ## Generate configuration header file.
......
# $Id$
#
# Copyright (C) 2008-2009
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cmake_minimum_required(VERSION 2.6)
## ---------------------------------------------------------------------------
## Preamble: set compilers
## ---------------------------------------------------------------------------
include(LofarInit)
## ---------------------------------------------------------------------------
## Project characteristics
## ---------------------------------------------------------------------------
project(pyparmdb)
include(LofarGeneral)
include(LofarAddPackage)
lofar_add_package(${PROJECT_NAME} 1.0 DEPENDS Common ParmDB)
## ---------------------------------------------------------------------------
## External packages
## ---------------------------------------------------------------------------
include(LofarFindPackage)
lofar_find_package(Boost REQUIRED COMPONENTS python)
lofar_find_package(Python REQUIRED)
lofar_find_package(Pyrap REQUIRED)
## ---------------------------------------------------------------------------
## Generate configuration header file.
## ---------------------------------------------------------------------------
include(LofarConfig)
## ---------------------------------------------------------------------------
## Subdirectories
## ---------------------------------------------------------------------------
add_subdirectory(src)
add_subdirectory(test)
# $Id$
#
# Copyright (C) 2008-2009
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
include(LofarPackageVersion)
# Create symbolic link to include directory.
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/include/${PROJECT_NAME})
lofar_add_library(_parmdb SHARED pyparmdb.cc)
set_target_properties(_parmdb PROPERTIES PREFIX "")
lofar_add_bin_program(versionpyparmdb
versionpyparmdb.cc
Package__Version.cc)
# $Id$
#
# Copyright (C) 2008-2009
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
include(LofarCTest)
# We need to create a symlink to the parmdb_main executable in the current
# binary directory, so that the test program(s) can find it.
get_target_property(_parmdb_main parmdb_main LOCATION_${CMAKE_BUILD_TYPE})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${_parmdb_main}
${CMAKE_CURRENT_BINARY_DIR}/parmdb_main)
lofar_add_test(tpyparmdb DEPENDS parmdb_main)
#!/bin/sh #!/bin/sh
parmdb <<EOF > tpyparmdb_tmp.pdbout parmdb_main <<EOF > tpyparmdb_tmp.pdbout
create tablename='tpyparmdb_tmp.pdb' create tablename='tpyparmdb_tmp.pdb'
add parm1 domain=[1,5,4,10],values=2 add parm1 domain=[1,5,4,10],values=2
add parm2 type='polc', domain=[1,5,4,10], values=[2,0.1], nx=2 add parm2 type='polc', domain=[1,5,4,10], values=[2,0.1], nx=2
......
...@@ -121,6 +121,10 @@ if test "$AIPSPP" != ""; then ...@@ -121,6 +121,10 @@ if test "$AIPSPP" != ""; then
export AIPSPATH export AIPSPATH
fi fi
# Add the current directory to the path. We don't care if it's already in.
PATH=.:$PATH
export PATH
# Delete all possible files from previous test runs. # Delete all possible files from previous test runs.
\rm -f $1.err $1.valgrind* \rm -f $1.err $1.valgrind*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment