Cannot build project with cmake

I am trying to build project in CLion by using generated cmake config.
I generated cmake config with

cd
/Users/Shared/UnrealEngine/4.13/Engine/Build/BatchFiles/Mac
./GenerateProjectFiles.sh -cmakefile
-game -project “/Users//Dropbox/ST/Unreal
Projects/MyProject/MyProject.uproject"

And when i start build it always breaks with error:

Building MyProject...
2016-10-04 21:59:33.592 defaults[83705:6005733] 
The domain/default pair of (/Users//Library/Preferences/com.apple.dt.Xcode, IDEBuildOperationMaxNumberOfConcurrentCompileTasks) does not exist
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Mac DebugGame -deploy -project=/Users//Dropbox/ST/Unreal\ Projects/MyProject/MyProject.uproject
e[?1he=e[6nERROR: Couldn't find target rules file for target 'MyProject' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Location: /Users/Shared/UnrealEngine/4.13/Engine/Intermediate/Build/BuildRules/UE4Rules.dll
Target rules found:
	UE4Editor - /Users/Shared/UnrealEngine/4.13/Engine/Source/UE4Editor.Target.cs
	UE4Game - /Users/Shared/UnrealEngine/4.13/Engine/Source/UE4Game.Target.cs
	UnrealHeaderTool - /Users/Shared/UnrealEngine/4.13/Engine/Source/Programs/UnrealHeaderTool/UnrealHeaderTool.Target.cs

e[?1le>e[39;49mmake[3]: *** [CMakeFiles/MyProject-Mac-DebugGame] Error 5
make[2]: *** [CMakeFiles/MyProject-Mac-DebugGame.dir/all] Error 2
make[1]: *** [CMakeFiles/MyProject-Mac-DebugGame.dir/rule] Error 2
make: *** [MyProject-Mac-DebugGame] Error 2

But When i just use my Terminal to build project with command:

cd /Users/Shared/UnrealEngine/4.13
./Engine/Build/BatchFiles/Mac/Build.sh
MyProject Mac DebugGame -deploy
-project=/Users//Dropbox/ST/Unreal
Projects/MyProject/MyProject.uproject

It builds fine without any errors.

Please help me to resolve problem.

Please put the errors in a quote block, it makes it easier to see for us.

It is done

Hello ,

We don’t officially support CLion for usage with UE4 so I won’t be able to provide any support on this front. I’ll leave this open however as some other users may be able to assist you. You may also want to check our forums as I’ve seen discussion about CLion being used previously. If you do decide to switch over to using XCode and still encounter problems, please let us know we’ll be happy to help.

XCode 8 just does not work with UE 4 becouse start to index project and use ALL available memory and swap. My Mac with 16 Gb of memory and SSD can`t finish Indexing process. Last what i saw - 32 GB of memory used by XCode. By the way, on my opinion - XCode is the worst IDE i have seen in my life.

This is a known issue with XCode 8 and a fix is coming in the next update from Apple. In the meantime, there is a workaround for that memory usage problem. After Generating Project Files for your UE4 source build, do the following in your XCode .xcworkspace:

Unfortunately, this workaround must be done every time you generate project files but it should fix the issue in the meantime until the update is available.