platform checks in CMakeLists.txt