Since I've started submitting Windows test results to the dashboard,
I've noticed that I'm getting an order of magnitude more test failures
than any of the *NIX builds.  In trying to ferret out the reason, I
discovered that hundreds of the test executables aren't being built
correctly; 441 of them are showing up in the build tree as zero-length
files, causing spurious failures.

From what I can tell, the reason is that a macro invocation such as the
following:

  # Serialization
  # xml archive tests
  boost_test_run(testgreg_serialize_xml
    "gregorian/testgreg_serialize.cpp"
    DEPENDS boost_date_time boost_serialization STATIC
    COMPILE_FLAGS "${DATE_TIME_COMPILE_FLAGS} -DDATE_TIME_XML_SERIALIZE")


winds up expanding to a linker command containing this flag:

   /implib:..\..\..\lib\tests\date_time\testgreg_serialize_xml.lib
                    ^^^

This path doesn't exist, so the link fails, and the file is truncated.
I think the command should contain:

   /implib:..\..\..\bin\tests\date_time\testgreg_serialize_xml.lib
                    ^^^

(I say this because: for a given test, if I manually modify the
build.cmake file as shown above, then the test builds and runs
successfully.)

I've started to go a bit cross-eyed trying to trace how the build system
winds up specifying the 'wrong' path.  (I assume it must be the right
path for other generators.) I thought I'd post here in the hopes that
someone might be able to recommend a stategy for tracking this problem
down.  The entire CMake-generated link command for one of the truncated
binaries is appended below for reference...

----------

@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable ..\..\..\bin\tests\date_time\testgreg_serialize_xml.exe"
        cd C:\projects\boost-trunk\build\libs\date_time\test
"C:\Program Files (x86)\CMake-cvs\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MICROS~4\VC\bin\cl.exe /nologo @CMakeFiles\date_time-testgreg_serialize_xml.dir\objects1.rsp @<< /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /Fe..\..\..\bin\tests\date_time\testgreg_serialize_xml.exe /FdC:\projects\boost-trunk\build\bin\tests\date_time\testgreg_serialize_xml.pdb -link /implib:..\..\..\lib\tests\date_time\testgreg_serialize_xml.lib /version:0.0 /MANIFEST /STACK:10000000 /machine:I386 /subsystem:console /debug /INCREMENTAL:YES ..\..\..\lib\libboost_date_time-vc80-mt-gd-1_40.lib ..\..\..\lib\libboost_serialization-vc80-mt-gd-1_40.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
<<

_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake

Reply via email to