This is a note from someone trying to build on the metro works compiler on
the mac.   Is there documentation for porting vcl to a new compiler?
It would be ideal if the configure scripts worked, but they do not, you have
to create these sgi, win32, etc directories with various hacks.
Anyway, is there a list of steps one should take to port vcl?

1. try configure
2. when 1 does not  work:
  2.1 edit vcl_compiler.h ...
  2.2 create compiler directory, and...???

-Bill



Date: Wed, 3 Apr 2002 20:42:43 +0200
Subject: Re: ITK on OSX compiled with CW7
From: Jon Harald Kaspersen <Jon.H.Kaspersen@unimed.sintef.no>
To: Bill Hoffman <bill.hoffman@kitware.com>
X-Mailer: Apple Mail (2.481)

Hi again Bill,

I was aware of the setenv CXX thing.
What I meant was, how do I tell CMake to choose the right header files in Code/Numerics/vxl/vcl ?
I don't know which of the header files that best suits the CW7 compiler (iso, generic or maybe gcc).
The error I experience right now (with the headers in generic used) is related to the STD namespace, with the following output :

### mwccppc Compiler:
#      In: ../../../Code/Numerics/vxl/vnl/vnl_math.h
#    From: itkAmoebaOptimizerTest.cpp
# -----------------------------------
#     149: inline float  vnl_math_sqrt(float x) { return float( vcl_sqrt(double(x))); }
#   Error:                                                              ^
#   undefined identifier 'std::sqrt'
### mwccppc Compiler:
#     150: inline double vnl_math_sqrt(double x) { return      vcl_sqrt(double(x)) ; }
#   Error:                                                              ^
#   undefined identifier 'std::sqrt'
### mwccppc Compiler:
#     153: inline float  vnl_math_cuberoot(float a) { return float((a<0) ? -vcl_exp(vcl_log(-a)/3) : vcl_exp(vcl_log(a)/3)); }
----Snip----

Any thoughts ?

Regards
Jon

On Tuesday, April 2, 2002, at 09:53 PM, Bill Hoffman wrote:

You have to setenv CXX and CC before you run cmake.


setenv CXX CW7
setenv CC CW7
cmake ../Insight

Where CW7 is the command line name for the compiler.

-Bill


At 09:39 PM 4/2/2002 +0200, you wrote:

Hi Bill,

I have finally got CW7.  I took quite some time due to the easter holidays.

Anyway, I have started to build ITK with the CW7 compiler/linker.  The first initial problem I have is to tell CMake that the compiler is not gcc.  So, how do I tell CMake to act as the compiler is ISO ?

Regards
Jon
========================================================
Jon Harald Kaspersen                    Tel:            +47 73 59 75 89
Ph.D. Mechanical Engineering            Mob:            +47 93 03 65 90
Senior Scientist                                Pager   +47 96 84 29 94
SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78 73
N-7465 Trondheim
NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
                                WEB:    http://www.us.unimed.sintef.no/
======================================================== </blockquote></x-html>

========================================================
Jon Harald Kaspersen                    Tel:            +47 73 59 75 89
Ph.D. Mechanical Engineering            Mob:            +47 93 03 65 90
Senior Scientist                                Pager   +47 96 84 29 94
SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78 73
N-7465 Trondheim
NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
                                WEB:    http://www.us.unimed.sintef.no/
======================================================== </blockquote></x-html>