File: find_flags

package info (click to toggle)
gccxml 0.9.0%2Bgit20140716-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 60,796 kB
  • ctags: 77,240
  • sloc: ansic: 793,461; cpp: 37,497; asm: 26,833; sh: 5,086; makefile: 4,700; lex: 589; awk: 566; perl: 334; yacc: 271; pascal: 86
file content (51 lines) | stat: -rwxr-xr-x 1,371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
#=============================================================================
#
#  Program:   GCC-XML
#  Module:    find_flags
#  Language:  C++
#  Date:      $Date$
#  Version:   $Revision$
#
#  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
#  See Copyright.txt for details.
#
#     This software is distributed WITHOUT ANY WARRANTY; without even 
#     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
#     PURPOSE.  See the above copyright notices for more information.
#
#=============================================================================

# Find the compiler executable name.
if test "x$1" = "x" ; then
  if test "x${CXX}" = "x" ; then
    CXX=CC
  fi
else 
  CXX="$1"
  shift
  CXXFLAGS="$@"
fi

# Find the compiler version
CXX_VERSION=`${CXX} -V 2>&1 | awk '{print $4}'`
[ -z "${CXX_VERSION}" ] && echo "Could not find compiler version" && exit 1

# Compute the script dir
SCRIPT_DIR=`dirname $0`
if test "x$SCRIPT_DIR" = "x" ; then SCRIPT_DIR="." ; fi
SCRIPT_DIR=`cd "$SCRIPT_DIR" ; pwd`

# Compute the version-specific support dir
CXX_SUPPORT_DIR="$SCRIPT_DIR/$CXX_VERSION"

# Use the version-specific find_flags if available
if [ -f "$CXX_SUPPORT_DIR/find_flags" ]
then
  . "$CXX_SUPPORT_DIR/find_flags"
else
  . "$SCRIPT_DIR/find_flags_common"
fi
 
# Print out the options
echo $OPTIONS