I wish CLion had better support for C++20 modules, right now the best way is to bypass cmake and use the "Makefile" project functionality with custom build steps, works great but unfortunately CLion still flags all the imports/exports etc as errors, doesn't prevent compile but clutters the display and logs :/