IRC log for #brlcad on 20161003

03:26.50 brlcad starseeker: sorry, I had to take a break from it -- filed a bug report
03:27.56 brlcad pretty certain I found the cause, just spent hours trying to find a workaround
06:16.04 *** join/#brlcad merzo (~merzo@80-29-133-95.pool.ukrtel.net)
06:29.00 *** join/#brlcad amarjeet (~amarjeet@202.164.53.117)
06:41.50 brlcad spectacular... cmake segfaulted
06:42.11 brlcad finally devised a workaround, terrible but working
07:27.01 Notify 03BRL-CAD:brlcad * 68968 brlcad/trunk/CMakeLists.txt: after MUCH thrashing, here is a rewrite the add_test() wrapper that fixes a problem with the previous version. previous was not actually handling empty strings, which are used by a significant number of our tests. it was silently not passing them to the test program. turns out that cmake really does not like consistently dealing with empty string/list elements
07:27.03 Notify and loses it once we're in the wrapper. once it's processed into list form (e.g., ARGV/ARGN), it gets ignored by _add_test(). this may be due to cmake_parse_arguments() being used within _add_test() which also unexpectedly ignores empty list elements. reported behavior as bug to upstream.after much trial and error (more error than trial), a workaround was finally found and is implemented here. basically, we
07:27.05 Notify reconstruct an invocation of add_test() in the wrapper so empty strings are passed as such, not via a list. this is fugly and inane and would be fragile, but there are a couple protections included that greatly help future-proof the wrapper. other comments should also help the next dev figure out what's going on....
07:29.06 Notify 03BRL-CAD:brlcad * 68969 brlcad/trunk/src/libbu/tests/CMakeLists.txt: reorganize the booleanize tests a little bit for clarity. add another arg indicating the expected output result.
07:30.37 Notify 03BRL-CAD:brlcad * 68970 brlcad/trunk/src/libbu/tests/bu_booleanize.c: rewicker that booleanize test to not rely on some built-in notion of true or false that can become inconsistent with what libbu defines. just make it take the expected result as input, then test and compare.
07:31.47 Notify 03BRL-CAD:brlcad * 68971 brlcad/trunk/include/bu/str.h: clarify that empty strings are whitespace-trimmed
07:46.52 *** join/#brlcad kintel (~kintel@unaffiliated/kintel)
08:14.50 *** join/#brlcad merzo (~merzo@user-94-45-58-138-1.skif.com.ua)
08:37.31 *** join/#brlcad merzo (~merzo@92.60.189.225)
09:03.42 *** join/#brlcad kintel (~kintel@unaffiliated/kintel)
10:30.45 Notify 03BRL-CAD:ZitarMorningStar * 0 /wiki/User:ZitarMorningStar:
12:15.40 *** join/#brlcad Caterpillar (~caterpill@unaffiliated/caterpillar)
13:30.41 *** join/#brlcad yorik (~yorik@2804:431:f721:d5eb:290:f5ff:fedc:3bb2)
14:43.28 *** join/#brlcad kintel (~kintel@unaffiliated/kintel)
14:59.59 starseeker brlcad: one way we might avoid the problem would be to have add_test maintain a list in CMake land of all defined targets - our adding to unit and check is based on name, so we could just post-process the list after all tests are added
15:00.23 starseeker pwd
15:01.21 Notify 03BRL-CAD:starseeker * 68972 brlcad/trunk/misc/CMake/FindUUID.cmake: ws
15:04.38 starseeker has other things he needs to add to CMake to avoid the need for the _ prefix redefinition - I'll add that to the list
15:05.23 Notify 03BRL-CAD:starseeker * 68973 brlcad/trunk/src/libbu/CMakeLists.txt: Only use UUID_INCLUDE_DIR if it's valid
15:11.42 *** join/#brlcad amarjeet (~Amarjeet@169.149.136.110)
15:22.45 *** join/#brlcad kintel (~kintel@unaffiliated/kintel)
15:23.02 *** join/#brlcad amarjeet (~Amarjeet@169.149.136.110)
15:35.30 brlcad starseeker: that would be a good fix this particular case .. what about scripting something around: ${CMAKE_COMMAND} --build . --target help
15:36.06 brlcad could create a function like "get_targets()" to get the current list
15:57.38 starseeker brlcad: the trick is we need the list before the CMake configure is fully complete, and I don't know if CMAKE_COMMAND would report correctly before the final CMake generation
15:57.54 starseeker brlcad: I posted to the list to see if that information is available somewhere
15:58.50 starseeker there is of course the possibility of just manually adding each test to the check/unit dependencies, but imho that won't scale
16:07.03 *** join/#brlcad Caterpillar (~caterpill@unaffiliated/caterpillar)
19:18.00 brlcad ahh, good point .. can't run cmake yet
19:18.14 brlcad agrees the latter doesn't scale
20:01.02 *** join/#brlcad Guest33108 (~joel@dhcp-004073.ics.uci.edu)
21:40.02 Notify 03BRL-CAD:starseeker * 68974 (brlcad/trunk/include/nmg.h brlcad/trunk/include/rt/nmg.h and 105 others): Well, that was amazingly painful. Get all rt_vlblock_init calls up out of the nmg code. Removing RTG.rtg_vlfree as a global variable access flowed up through a lot of calling functions, which in turn required updating code calling them.
21:41.22 starseeker brlcad: that may not be minimally impacting, but it was enough work I had to try - it's one of the preliminary moves needed for relocating the nmg code out of librt
22:08.21 *** join/#brlcad merzo (~merzo@93-195-113-92.pool.ukrtel.net)
22:16.46 *** join/#brlcad kintel (~kintel@unaffiliated/kintel)
23:51.37 Notify 03BRL-CAD:ejno * 68975 brlcad/trunk/src/libbu/color.c: only check errno if the return value of strtol()/strtod() is exactly 0.0

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.