[Insight-developers] Re: Problems with Obj C Tests on VS6 / VS7 / VS8

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 28 15:42:58 EDT 2007


Hi Mathieu,

Thanks for making all the tests.

It seems that this particular TRY_COMPILE is safe in
several platforms, but definitely not in Visual Studio.

Since you probably want to support Cygwin, we should
probably add more logic to the current IF(NOT WIN32)...

I would guess that we can expect to find Objective-C
compilers in Mac, and systems using the GNU compiler,
is that reasonable ?


    Luis


-----------------------
Mathieu Coursolle wrote:
> Hi,
> 
> I did try it on Windows XP with Cygwin, with no objective-C compiler, 
> and it did return NO.
> 
> Then, I comment the @end statement of the itkTestObjCxxCompiler.mm test file,
> and build it on OSX with an objective-C compiler and it did return NO.
> 
> Finaly, I uncommented the @end statement of the itkTestObjCxxCompiler.mm
> test file,
> and built it on OSX again, and it returned YES.
> 
> For some reason, VS seems to compile Objective-C++, but can't run it?
> 
> Thanks.
> 
> MAthieu
> 
> 
>>Bill, Mathieu, Sean
>>
>>
>>I looked at this problem. It actually happens in all
>>versions of Visual Studio, including VS8.
>>
>>The TRY_COMPILE happily answers "TRUE" on Visual Studio,
>>despite the fact that there is no Objective-C compiler
>>available for Visual Studio.
>>
>>I surrounded the TRY_COMPILE with a IF/ENDIF(WIN32),
>>and to avoid confusion replaced the variable
>>
>>
>>         CMAKE_OBJCXX_COMPILER
>>
>>with
>>
>>         CMAKE_OBJCXX_COMPILER_WORKS
>>
>>
>>to be consistent with the try compiles that CMake/Modules has
>>for the Fortran and Java compiler. The ides is to differentiate
>>between the boolean variable that indicates whether the compiler
>>works or not, and the string variable that contains the actual
>>path to the compiler.
>>
>>
>>Sean, Mathieu:
>>
>>You may want to verify if the TRY_COMPILE is actually compiling
>>by purposely (and locally) introducing a syntax error in the .mm file.
>>I'm under the impression that this is simply answering TRUE always...
>>
>>
>>
>>   Luis
>>
>>
>>
>>--------------------
>>Bill Lorensen wrote:
>>
>>>Mathieu,
>>> 
>>>I think non-VS builds are fine. It is just that one VS system. Maybe 
>>>Luis or one of the owners of the offending system can track down the 
>>>problem.
>>> 
>>>Bill
>>>
>>> 
>>>On 8/27/07, *Mathieu Coursolle* <mcoursolle at rogue-research.com 
>>><mailto:mcoursolle at rogue-research.com>> wrote:
>>>
>>>    Humm,
>>>
>>>    I've test it on MAC OSX, and it found an ObjC++ compiler, ran all the
>>>    tests and passed.
>>>
>>>    Then I tried it on windows with cygwin (no objective-C compiler), none
>>>    of the tests were added,
>>>    so it succeeded.
>>>
>>>    There is a TRY_COMPILE directive for ITK_OBJCXX_COMPILER in the
>>>    CMakeLists.txt file. The Objective-C++
>>>    header tests should be added only if ITK_OBJCXX_COMPILER is defined by
>>>    TRY_COMPILE.
>>>
>>>    Does VS has an ObjC++ compiler?
>>>
>>>    I am looking at today's dashboard and it seems that dash13 compiled the
>>>    ObjC++ code, but couldn't link,
>>>    while dash11 and peuplier.-jouy.-inra.-fr succeeded, but the tests were
>>>    added but not ran?
>>>
>>>    Am I right to say that it worked all right on all non-VS builds?
>>>
>>>    Thansk.
>>>
>>>    Mathieu
>>>
>>>     >Mathieu,
>>>     >
>>>     >I'm not sure what is going on with Win32-vs6, but it is trying to
>>>    build
>>>     >the objective c code:
>>>     >http://www.itk.org/Testing/Sites/dash13.kitware/Win32-
>>
>>vs60/20070827-0100-
>>
>>>    <http://www.itk.org/Testing/Sites/dash13.kitware/Win32-
>>
>>vs60/20070827-0100->
>>
>>>     >Nightly/BuildError.html
>>>     >
>>>     >I don't have access to a VS6 compiler anymore. Perhaps Luis can
>>>    take a look?
>>>     >
>>>     >Bill
>>>     >
>>>
>>>
> 
> 
> 


More information about the Insight-developers mailing list