Fix apps cmake

old code produces numerous warnings with cmake 3.0