source: trunk/cmake/withcasa.cmake@ 1989

Last change on this file since 1989 was 1976, checked in by Takeshi Nakazato, 14 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Changes from Wes and Darrell.


File size: 2.4 KB
Line 
1###
2# CMakeLists.txt for build with casa
3###
4
5
6# install directory
7# set casaroot
8# the regular expression means '../'
9# [^ ] Matches any character(s) not inside the brackets
10# + Matches preceding pattern one or more times
11# ? Matches preceding pattern zero or once only
12# $ Mathces at end of a line
13string( REGEX REPLACE /[^/]+/?$ "" casaroot ${CMAKE_SOURCE_DIR} )
14message( STATUS "casaroot = " ${casaroot} )
15
16# modules
17set( CMAKE_MODULE_PATH ${casaroot}/code/install )
18include( config )
19include( CASA )
20
21# environment dependent settings
22if( APPLE )
23 if( NOT arch )
24 set( arch darwin )
25 endif()
26 if( CMAKE_SYSTEM MATCHES ^Darwin-10 )
27 if( NOT archflag )
28 if( EXISTS /opt/casa/darwin10-64b )
29 set( archflag x86_64 )
30 elseif( EXISTS /opt/casa/core2-apple-darwin10 )
31 set( archflag i386 )
32 else()
33 set( archflag x86_64 )
34 endif()
35 endif()
36 if( archflag STREQUAL x86_64 )
37 set( casa_packages /opt/casa/darwin10-64b )
38 else()
39 set( casa_packages /opt/casa/core2-apple-darwin10 )
40 endif()
41 elseif( CMAKE_SYSTEM MATCHES ^Darwin-9 )
42 set( casa_packages /opt/casa/core2-apple-darwin8/3rd-party )
43 endif()
44elseif( CMAKE_SYSTEM_NAME STREQUAL Linux )
45 if( CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 )
46 set( casa_packages /usr/lib64/casapy )
47 if( NOT arch )
48 set( arch linux_64b )
49 endif()
50 else()
51 set( casa_packages /usr/lib/casapy )
52 if( NOT arch )
53 set( arch linux_gnu )
54 endif()
55 endif()
56endif()
57message( STATUS "arch = " ${arch} )
58
59# set root directory for installation
60set( CMAKE_INSTALL_PREFIX ${casaroot}/${arch} )
61
62
63#
64# casacore
65#
66set( CASACORE_PATHS "${casaroot}/${arch};${casaroot};/usr/local;/usr" )
67
68
69#
70# Boost
71#
72if( NOT BOOST_ROOT )
73 set( BOOST_ROOT ${casa_packages} )
74endif()
75
76
77#
78# wcslib
79#
80set( WCSLIB_PATHS "${casaroot}/${arch};/usr/local;/usr" )
81
82
83#
84# subdirectories
85# ASAP2TO3 asap2to3 apps
86# PYRAPLIB libpyrap.so external/libpyrap
87# ATNFLIB libatnf.so external-alma/atnf
88# ASAPLIB _asap.so src
89# python modules python
90# shared files share
91#
92macro( asap_add_subdirectory )
93 add_subdirectory( apps )
94 add_subdirectory( external/libpyrap )
95 add_subdirectory( external-alma/atnf )
96 add_subdirectory( src )
97 add_subdirectory( python )
98 add_subdirectory( share )
99endmacro( asap_add_subdirectory )
100
Note: See TracBrowser for help on using the repository browser.