WPI-AIM/ambf

Fix CMake out-of-source build

pkazanzides opened this issue · 3 comments

The AMBF instructions suggest building in a subfolder of the source tree, but the more conventional CMake approach is to have the build tree separate from the source tree. However, choosing a separate build tree does not produce the expected result, since some of the build files are placed in the source tree. Specifically, the bin folder appears in the source tree.

Hi,
I think the changes in 189cb5e are bad because you are now putting binaries outside both the build folder and the source folder :)

You can try:

mkdir -p ~/tmp/ambf-build
cd ~/tmp/ambf-build
cmake ~/path-to-ambf-source
make

You now have binaries in ~/tmp/bin.

I believe 189cb5e should be reverted while 40b3efa should stay.

@adnanmunawar not sure if you're notified on a closed issue, so just to be sure...

Hi Kim, thanks for your comment. I agree with you, the reason for the second commit, i.e. creating a bin just outside the build folder, was to keep all the launch instructions in READMEs on our multiple repositories valid. As you noted, the correct way is to keep the previous commit, but updating the READMEs will need to be done simultaneously. :)