replace bashism with posix redirect to fix problems using dash on ubuntu with cmake