[Insight-developers] vcl compilation--Compiler flags not propogated correctly

Brad King brad.king at kitware.com
Fri, 9 Jan 2004 08:59:32 -0500 (EST)


On Thu, 8 Jan 2004, Hans Johnson wrote:

> First is that the wrapping does not work on the icc compiler or the SGI
> compilers.

What is the error message that you get?  This is expected to be working.

> Second, I had set custom compile flags, but not link flags, this is what
> now works:
>
> CMAKE_CXX_FLAGS:STRING= -g -UNDEBUG  -w1 -wd810,188 -i_dynamic
> CMAKE_EXE_LINKER_FLAGS:STRING='   '
> CMAKE_MODULE_LINKER_FLAGS:STRING=   -i_dynamic -shared -fPIC -pthread
> CMAKE_SHARED_LINKER_FLAGS:STRING=    -i_dynamic -shared -fPIC -pthread
>
> I know that if the CMAKE_EXE_LINKER_FLAGS is set teh same as the other,
> it also does not work.

So shared libraries have to be built with -i_dynamic and executables
without it?

> PS: I think you hard-coded the i_dynamic somewhere that can now be
> removed.  I've seen compliations where this flag is set twice (no big
> deal, it will just cause problems at some point in the future if I
> needed to turn i_dynamic off).

We would like ITK to build on anyone's machine without manually adding
these flags.  I'd like to setup the listfiles to automatically add the
needed flags when needed.  Once we've decided what they are, I'll add the
necessary code.

-Brad