Pull stable cmake fix

Backport cmake fixes for linux