tork-a/openrtm_aist-release — pull request #1 by cottsay (2014-10-12 22:18:13+00:00)
Title: Completely overhaul CMakeLists.txt

The current `CMakeLists.txt` for this project has two major problems:
1. It ONLY works for debian generation, and only under certain conditions (the ones on the buildfarm). That means it won't work to build this package from source, or on any other system besides the buildfarm.
2. `libtool` is setting static rpaths on all of the executables and libraries. rpaths are not allowed in RPM packages, and they are not necessary in this context as ROS is setting the `LD_LIBRARY_PATH` appropriately.

There are also some minor issues:
1. "make" properties don't get passed to the generated makefile. This is a result of invoking `make` directly instead of invoking it as `$(MAKE)`. The latter will pass any variables in the make environment (such as `CFLAGS`), and will ensure that parallelization happens. Currently, even on a 16 core machine, the code is compiled with `-j 1`, which is very slow. Using `$(MAKE)` also ensures that the native make utility is called, which is sometimes `gmake` and not `make`.
2. The code is unnecessarily re-compiled during the install phase. This, compounded with the parallelization issue, means that builds for this package are taking 2-3 times longer than is necessary.

This PR will fix all four of these problems, allowing faster, more correct builds on ANY system (debian buildfarm included), and will prevent libtool from detecting a need for static rpaths.

Example build break on Fedora: https://csc.mcs.sdsmt.edu/jenkins/job/ros-indigo-openrtm-aist_binaryrpm_heisenbug_x86_64/12/console

Thanks,

--scott