message( WARNING "Found ${casaroot}/aipshosts. You probably don't need this file unless you need to build multiple architectures. If you remove aipshosts the name of the installation directory will be automatically set based on this machine's architecture, or defined by the cmake command line option -Darch=<arch name>. Specifying on the command line will override the aipshosts entry." )
# CASA - Common Astronomy Software Applications
# Copyright (C) 2010 by ESO (in the framework of the ALMA collaboration)
# Copyright (C) 2010-2013 Associated Universities, Inc. Washington DC, USA.
# This file is part of CASA.
# 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 3 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, see <http://www.gnu.org/licenses/>.
cmake_minimum_required( VERSION 2.8 )
message (STATUS "Searching for ccache.")
find_program(CCACHE_FOUND ccache)
message (STATUS "Ccache found.")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
add_definitions ("-DUseCasacoreNamespace")
add_definitions ("-DWITHOUT_BOOST")
add_definitions(-DUSE_THREADS) # new casacore requirement:
# https://github.com/casacore/casacore/commit/2184df898452e1de695a04eb2e785419f707434c
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/install )
execute_process( COMMAND svn info
RESULT_VARIABLE SVNINFOSTATUS
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
message("SVNINFOSTATUS: ${SVNINFOSTATUS}")
if(${SVNINFOSTATUS} STREQUAL "0")
message("Running svn scripts.")
set( CASA_svngen ${CMAKE_SOURCE_DIR}/install/generate-svninfo )
execute_process( COMMAND ${CASA_svngen} -revision url=${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE SVNREVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
execute_process( COMMAND ${CASA_svngen} -date url=${CMAKE_SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE
execute_process( COMMAND ${CASA_svngen} -url url=${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE CASASRCURL
OUTPUT_STRIP_TRAILING_WHITESPACE