From 2ab083d81fce92d0f7d607de161632b958e2d4e5 Mon Sep 17 00:00:00 2001 From: Marcel Loose <loose@astron.nl> Date: Fri, 3 Jul 2009 13:39:12 +0000 Subject: [PATCH] Bug 1310: Added FindBlitz.cmake; added some extra include file checks in LofarGeneral.cmake --- .gitattributes | 1 + CMake/FindBlitz.cmake | 45 ++++++++++++++++++++++++++++++++++++++++ CMake/FindPQXX.cmake | 3 +-- CMake/LofarGeneral.cmake | 2 ++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 CMake/FindBlitz.cmake diff --git a/.gitattributes b/.gitattributes index dd3c831b610..2b0b6f9ce75 100644 --- a/.gitattributes +++ b/.gitattributes @@ -160,6 +160,7 @@ CEP/ParmDB/test/tsetupsourcedb.in_ms2.vds -text CEP/Pipeline/bootstrap -text CEP/Pipeline/library/lioff.clusterdesc -text CEP/Pipeline/library/makevds.bash -text +CMake/FindBlitz.cmake -text CMake/makeversion -text CMake/variants/variants.bgfen0 -text CMake/variants/variants.rs002 -text diff --git a/CMake/FindBlitz.cmake b/CMake/FindBlitz.cmake new file mode 100644 index 00000000000..3dcdd239729 --- /dev/null +++ b/CMake/FindBlitz.cmake @@ -0,0 +1,45 @@ +# $Id: FindBLITZ.cmake 13414 2009-06-16 22:15:37Z loose $ +# +# 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 + +# Try to find Blitz: a C++ template class library for scientific computing +# +# This will define: +# +# BLITZ_FOUND - system has Blitz +# BLITZ_INCLUDE_DIR - the Blitz include directory (cached) +# BLITZ_INCLUDE_DIRS - the Blitz include directories +# (identical to BLITZ_INCLUDE_DIR) +# BLITZ_LIBRARY - the Blitz library (cached) +# BLITZ_LIBRARIES - the Blitz libraries +# (identical to BLITZ_LIBRARY) + +if(NOT BLITZ_FOUND) + + find_path(BLITZ_INCLUDE_DIR blitz/blitz.h) + find_library(BLITZ_LIBRARY blitz) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Blitz DEFAULT_MSG + BLITZ_LIBRARY BLITZ_INCLUDE_DIR) + + set(BLITZ_INCLUDE_DIRS ${BLITZ_INCLUDE_DIR}) + set(BLITZ_LIBRARIES ${BLITZ_LIBRARY}) + +endif(NOT BLITZ_FOUND) diff --git a/CMake/FindPQXX.cmake b/CMake/FindPQXX.cmake index f79a656e219..003f007deab 100644 --- a/CMake/FindPQXX.cmake +++ b/CMake/FindPQXX.cmake @@ -37,8 +37,7 @@ if(NOT PQXX_FOUND) find_library(PQ_LIBRARY pq) include(FindPackageHandleStandardArgs) - set(custom_msg "Could NOT find PQXX in ${CMAKE_PREFIX_PATH}") - find_package_handle_standard_args(PQXX "${custom_msg}" + find_package_handle_standard_args(PQXX DEFAULT_MSG PQXX_LIBRARY PQ_LIBRARY PQXX_INCLUDE_DIR) set(PQXX_INCLUDE_DIRS ${PQXX_INCLUDE_DIR}) diff --git a/CMake/LofarGeneral.cmake b/CMake/LofarGeneral.cmake index c181c095830..7484b2f1cd2 100644 --- a/CMake/LofarGeneral.cmake +++ b/CMake/LofarGeneral.cmake @@ -60,9 +60,11 @@ if(NOT DEFINED LOFAR_GENERAL_INCLUDED) check_include_file(stdlib.h HAVE_STDLIB_H) check_include_file(string.h HAVE_STRING_H) check_include_file(strings.h HAVE_STRINGS_H) + check_include_file(sys/mman.h HAVE_SYS_MMAN_H) check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) + check_include_file(sys/timepps.h HAVE_SYS_TIMEPPS_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(unistd.h HAVE_UNISTD_H) -- GitLab