minor improvements to CMake script