I tried CLion with Hello World on Mac compiled for macOS with Cocos2d-x 3.13 and first I got Linker errors because of glfw3 missing and after adding glfw3 manually I got even more Linker errors. I installed the GitHub v3 version and this fixed the linker errors (after I added glfw3 again) and it compiles fine, but it crashes hard with EXC_BAD_ACCESS (code=1, address=0x0).
Is CLion even supposed to work at all with Cocos2d-x, or is Cocos2d-x supposed to be exclusively XCode on Mac?
AppCode works pretty well with Cocos 3.13.x though, at the time of writing, it has some C++ parsing bugs remaining. Make sure you set up the base SDKs for each of the cocos library projects in XCode.