tests/cpp fix for CMake < 3.3
tests/cpp fix for CMake < 3.3

- On CMake 3.1, 3.2 use add_dependencies instead of
  target_link_libraries for lcm-test-types-generate-cpp.

lcm-proj/lcm,adeschamps/lcm,lcm-proj/lcm,lcm-proj/lcm,lcm-proj/lcm,adeschamps/lcm,adeschamps/lcm,lcm-proj/lcm,bluesquall/lcm,lcm-proj/lcm,bluesquall/lcm,adeschamps/lcm,bluesquall/lcm,adeschamps/lcm,bluesquall/lcm,bluesquall/lcm,lcm-proj/lcm,adeschamps/lcm,bluesquall/lcm,bluesquall/lcm,adeschamps/lcm,lcm-proj/lcm,adeschamps/lcm