[Insight-developers] Re: cmake error building ITK for slicer

Karthik Krishnan Karthik.Krishnan at kitware.com
Sat Dec 3 18:36:09 EST 2005


On Sat, 2005-12-03 at 17:31 -0500, Karthik Krishnan wrote:
> Please correct me if I am wrong. Why are the Slicer VS71 dashboards
> building then ? They use ITK CVS.

Sorry, did not see the bug report.
"This error occurs on cmake 2.0.1, but not on cmake 2.2.2"


> http://splweb.bwh.harvard.edu:8000/cgi-bin/develop/viewcvs.cgi/slicer2/slicer_variables.tcl?rev=1.40&content-type=text/vnd.viewcvs-markup&cvsroot=slicer
> 
> set ::ITK_TAG "HEAD"
> 
> dash11 builds a fresh VS71 binary tree.
> 
> -karthik
> 
> On Sat, 2005-12-03 at 15:47 -0500, Luis Ibanez wrote:
> > Hi Hans,
> > 
> > Steve Pieper is reporting the following problem
> > with the recent modifications that you added to
> > the main CMakeLists.txt file in ITK in order to
> > deal with the GCC options
> > 
> >      -frename-registers
> >      -ffloat-store
> > 
> > It seems that the IF has a CMake syntax error...
> > Although it doesn't look wrong to me...
> > 
> > Since this is only relevant for GCC, I'm encapsulating
> > the test inside IF/ENDIF for the GCC compiler.
> > 
> > This has been entered in the phpBugTracker as BUG# 2552
> > http://public.kitware.com/Bug/bug.php?op=show&bugid=2552&pos=0
> > 
> > Please let me know if you see a better option.
> > 
> > 
> >       Thanks
> > 
> > 
> >          Luis
> > 
> > 
> > 
> > 
> > Steve: What version of CMake were you using ?
> > 
> > 
> > 
> > 
> > ---------------------
> > Steve Pieper wrote:
> > > Hi Andy, Luis -
> > > 
> > > I've attached a diff for a patch that we've been needing to apply to ITK 
> > > to support windows builds.  There seems to be a cmake syntax error that 
> > > gets triggered by having a windows build option specified.
> > > 
> > > I'm not sure if it's a problem for anyone else, but if it turns out it's 
> > > something slicer specific, is there a way we can work around it?  If 
> > > not, maybe we can just put the patch into a slicer branch of ITK (as a 
> > > last resort).
> > > 
> > > Thanks,
> > > Steve
> > > 
> > > The error message:
> > > 
> > > running: 
> > > C:/pieper/bwh/slicer2/latest/slicer2/Lib/win32/CMake-build/bin/cmake.exe 
> > > {-GVisual Studio 7 .NET 2003} {-DCMAKE_CXX_COMPILER:STRING=c:/Program 
> > > Files/Microsoft Visual Studio .NET 2003/Common7/Vc7/bin/cl} 
> > > {-DCMAKE_CXX_COMPILER_FULLPATH:FILEPATH=c:/Program Files/Microsoft 
> > > Visual Studio .NET 2003/Common7/Vc7/bin/cl} -DBUILD_SHARED_LIBS:BOOL=ON 
> > > -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF 
> > > -DCMAKE_BUILD_TYPE:STRING=Debug ../Insight
> > > -- Check for working C compiler: cl -- works
> > > -- Check for working CXX compiler: c:/Program Files/Microsoft Visual 
> > > Studio .NET 2003/Common7/Vc7/bin/cl -- works
> > > -- Configuring done
> > > 
> > > CMake Error: Error in cmake code at
> > > :0:
> > > IF An IF command had incorrect arguments: "/W3" STREQUAL 
> > > "-frename-registers"
> > > -frename-registers causes runtime bugs.  It must be removed from your 
> > > compilation options.
> > > running: {c:/Program Files/Microsoft Visual Studio .NET 
> > > 2003/Common7/IDE/devenv} ITK.SLN /build Debug
> > > 
> > > Microsoft (R) Development Environment  Version 7.10.3077.
> > > Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
> > > 
> > > The following files specified on the command line:
> > > 
> > >         ITK.SLN
> > > 
> > > could not be found and will not be loaded.
> > > child process exited abnormally
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ======= the patch I've been using to get around it:
> > > 
> > > # [ /cygdrive/c/pieper/bwh/slicer2/latest/slicer2/Lib/win32/Insight]$ 
> > > cvs diff CMakeLists.txt
> > > Index: CMakeLists.txt
> > > ===================================================================
> > > RCS file: /cvsroot/Insight/Insight/CMakeLists.txt,v
> > > retrieving revision 1.209
> > > diff -r1.209 CMakeLists.txt
> > > 531,536c531,536
> > > <      IF("${COMP_OPTION}" STREQUAL "-frename-registers")
> > > <        MESSAGE(FATAL_ERROR "-frename-registers causes runtime bugs. It 
> > > must be removed from your compilation options.")
> > > <      ENDIF("${COMP_OPTION}" STREQUAL "-frename-registers")
> > > <      IF("${COMP_OPTION}" STREQUAL "-ffloat-store")
> > > <        MESSAGE(FATAL_ERROR "-ffloat-store causes runtime bugs on gcc 
> > > 3.2.3 (appearently not on gcc 3.4.3, but the exact criteria is not 
> > > known).  It must be removed from your compilation options.")
> > > <      ENDIF("${COMP_OPTION}" STREQUAL "-ffloat-store")
> > > ---
> > >  >      #IF("${COMP_OPTION}" STREQUAL "-frename-registers")
> > >  >        #MESSAGE(FATAL_ERROR "-frename-registers causes runtime bugs. 
> > >  It must be removed from your compilation options.")
> > >  >      #ENDIF("${COMP_OPTION}" STREQUAL "-frename-registers")
> > >  >      #IF("${COMP_OPTION}" STREQUAL "-ffloat-store")
> > >  >        #MESSAGE(FATAL_ERROR "-ffloat-store causes runtime bugs on gcc 
> > > 3.2.3 (appearently not on gcc 3.4.3, but the exact criteria is not 
> > > known).  It must be removed from your compilation options.")
> > >  >      #ENDIF("${COMP_OPTION}" STREQUAL "-ffloat-store")
> > > 
> > > 
> > 
> > _______________________________________________
> > Insight-developers mailing list
> > Insight-developers at itk.org
> > http://www.itk.org/mailman/listinfo/insight-developers
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list