Right click the CMakeLists.txt and select import as a cmake project. This bug happened to me after the last update of CLion