Modernized and standardized all CMake code