On Oct 25, 2013, at 5:12 AM, Daniel Roßberg wrote: > 2013/10/24 Daniel Roßberg <[email protected]>: >>> Is there any hint in your CMakeCache.txt? I've scanned the entire >>> hierarchy and find no manipulation of MD or MT manipulation, so it "should" >>> be CMake's default (i.e., /MD). >> >> This is what I did too (scanning the source directory hierarchy with >> grep). And, if I remember right, I cleaned the build directory before >> calling cmake. However, I'll do the scan for my build directory >> hierarchy as well. > > There is no manipulation of the runtime library flag in stepcode - and > this seems to be the problem. In src/other/CMakeLists.txt the > CMAKE_C_FLAGS variable is wiped out. I.e. the CMake standard /MD is > cleared and the MSVC standard /MT will be used.
That explains it! Presumably, wiping out the FLAGS is letting MSVC use an unspecified default (which is apparently /MT). If we need something else, we should set it. That said, it's still concerning that /MT doesn't work, though, since that should just cause a static C runtime to get linked... It should work. I would expect it to work unless there are system libs compiled against a different static C runtime because we should be compiling all the same. Moreover, /MT is desirable for supporting more versions of Windows, ones older than what we're compiling on. However, I think I just figured out what is going on. We wipe out the flags ... in CompilerFlags.cmake ... which is included in a NOT MSVC block in the top-level CMakeLists.txt file ... which means they're not being wiped out on Windows [0] like they needed to be. If we make them sync, I'd expect MT or MD to work and no platform conditionals are needed anywhere. Sean [0] This is why platform conditionals are bad. Several hours lost figuring this out. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
