From: Ian S. <sc...@im...> - 2014-01-20 09:21:13
|
Hi, I don't kow how much this will help, but this is the patch we applied on a private version of VXL to get C++11 constexpr static initialisation working for vnl_math on gcc and MSVC, whilst maintaining C++98 compatibility. Ian. On 18/01/2014 21:01, Brandon Mayer wrote: > Hello all, > > I would like to link a client application build with clang under osx > mavericks to VXL libraries also built with clang and mac osx mavericks. > While there were no problems building VXL using the default settings, > the client application uses c++11 features (std::thread) and needed to > have the -std=c++11 passed to clang which resulted in build errors due > to static const float initialization inside vnl class class definitions > (vnl_numeric_limits.h) which was included in the client application. To > solve the problem, I set VCL_STATIC_CONST_INIT_FLOAT=0 in the > automatically generated ${VXLBIN}/vcl_config_compiler.h file and rebuilt > VXL. > > After that the client application successfully builds because when it > includes relevant vnl headers, there are no static constant float > initializations in the class definitions which clang doesn't seem to > like if the -std=c++11 flag is used but doesn't mind otherwise. > > So, Is there a way to specify to specify via CMAKE or an environment > variable that despite the result of the configuration test in > ${VXLSRC}/configure, line 3798, I do not want to have static constant > floats initialized inside class definitions? > > Thanks for your help and I'm sorry if the answer is something obvious > that I missed. > > Brandon > > -- > Brandon Mayer > b.m...@gm... <mailto:b.m...@gm...> > 516.672.0551 > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Vxl-users mailing list > Vxl...@li... > https://lists.sourceforge.net/lists/listinfo/vxl-users > |