-----Original Message----- From: Boost
On Behalf Of Steven Watanabe via Boost Sent: Wednesday, October 17, 2018 7:19 PM I would recommend using a make target (warning untested):
make CMakeCache.txt : CMakeLists.txt : @echo ; always CMakeCache.txt ;
actions echo { cmake -S "$(>:D)" -B $(<:D) cmake --build "$(<:D)" }
Note 1: The directory will be created automatically. Note 2: Avoiding cd simplifies the path handling a lot. Note 3: This could probably be split into two separate actions.
Thanks you very much, that got me mostly there. In cmake versions older than 3.13 this apparently has to be actions echo { cmake -H"$(>:D)" -B$(<:D) cmake --build "$(<:D)" } (no space between B and the path and -H instead of -S). Now I only need a way to properly hook this up, so it gets only re-run, if one of the cmake files change. Best Mike