I know there has been a lot of effort going into switching everything to CMake for good reason!
I personally use CLion for all my project because of it’s cross platform goodness and, in my opinion, It’s better code formatting options out the box. With Cocos2d-x, It usually doesn’t work well on windows.
Missing dependancies, Resolving errors, things like that.
Will CLion work on Windows and Cocos2d-x in the 3.17 Release? Works perfectly on Linux and Mac OS. But my main, most powerful computer is my custom-built windows computer 
@drelaptop what do you think?
CLion supports CMake really well, I never do the special adaptions for CLion, but the cpp-tests project works well on mac-CLion. Oh! you said that
Works perfectly on Linux and Mac OS
Actually the cmake didn’t support MinGW in 3.17 release, so that it didn’t support CLion. for CLion on windows depend on the MinGW. I want to add the MinGW support at next release after 3.17, can you give me some advice? @zhangxm
I have no experience of MinGW, but i think it should not do much work if MinGW is good enough to simulate linux environment.
CLion can config different C++ compiler, if you use the MSVC on CLion, the build will success. If you use MinGW, error infos will be given, for example:
-- It appears you are building natively for Windows Desktop with Mingw GCC
CMake Error at cmake/Modules/SetCompilerOptions.cmake:243 (message):
please using Windows MSVC compile cocos2d-x project, support other compile
tools not yet
Call Stack (most recent call first):
cmake/Modules/CocosBuildSet.cmake:48 (SetCompilerOptions)
CMakeLists.txt:39 (CocosBuildSet)
-- Configuring incomplete, errors occurred!
See also "F:/cocos2d-x/cmake-build-debug-gnu/CMakeFiles/CMakeOutput.log".
So, it’s a MinGW issue, not a windows issue, I will try to add the MinGW support on Windows before the 3.17 release.
Yeah!
The latest release of CLion has MSVC support witch is awesome
Only problem I’ve had so far with it though is that it compile one file at a time and not multiple!
I tried all the thing with /MP but it doesn’t work. I did a little research and apparently NMAKE only does multi-core Compiling in Visual Studio 
I going to try WSL and see if I have better luck
Just a quick update on my findings:
WSL does work, but when you try to run the app, since WSL has no UI and cocos2d-x uses x11, It will not open the launch window 
CLion’s YouTrack issue manager says that they will add JOM and Ninja support to MSVC in the coming future, Which will allow multi-core compiling when using MSVC in CLion. They are also adding debugging support with MSVC which will make CLion very practical for Cocos2d-x Via CMake on Windows.
That will likely be the best option so just gonna wait for now!
1 Like
@mozartalouis FYI
There is “native” CMake support for Visual Studio 2017. (no need to generate VS2017 projects/solutions etc just open folder with root CMakeLists.txt ).
I checked cocos2d-x (latest version from github) and CMake works fine with latest Visual Studio 2017.
I was able (without any problems) compile (multi-core build), run, debug cpp-test.
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/
Yeah, I know that. I just rather use CLion because I literally work with all platforms (Linux, Mac, Windows) and it starts to get annoying when you have to maintain all the projects with different IDE’s especially when it comes to things like Code formatting.
Once CLion supports JOM, Ninja and the MSVC Debugger, I’m am going to switch over. Besides, As an android developer, I’ve become accustomed to JetBrains IDE’s in general
(Android Studio is based off IntelliJ By Jetbrains)
2 Likes