Description

If an Unreal Studio project is created on a different drive from where the Engine is installed, CLion is unable to successfully update CMake. The location for where Engine files can be found appears to be parsed incorrectly in this instance. In this case, a path similar to the following is created: C:/Users/<username>/Desktop/TestCLion3/D:/Epic Games/UE_4.21/Enterprise/Source/Runtime/Launch/Resources/EnterpriseVersion.h

If the project is created on the same drive as the Engine, a path similar to the following is created, which appears to work fine: D:/Unreal Projects/Current Issues/TestCLion1/../../../Epic Games/UE_4.22/Enterprise/Source/Runtime/Launch/Resources/EnterpriseVersion.h

 

REGRESSION:

No. The same behavior occurs in 4.21.2.

Steps to Reproduce
  1. Create a new Blank Unreal Studio project on a different drive from where the Engine is installed.
  2. Make sure the Editor is set to have CLion as the preferred source code accessor.
  3. Add a new code class to the project (tested using an Actor code class).
  4. Close CLion if it opens.
  5. Select File -> Refresh CLion Project.
  6. Select File -> Open CLion.
  7. When CLion opens, open the CMake Debug window if it is not already open.

RESULT:
When CLion is finished updating CMake, the window will display an error:

CMake Error at CMakeLists.txt:56 (add_executable):
  Cannot find source file:

    C:/Users/<username>/Desktop/TestCLion3/D:/Epic Games/UE_4.21/Enterprise/Source/Runtime/Launch/Resources/EnterpriseVersion.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error: CMake can not determine linker language for target: FakeTarget
CMake Error: Cannot determine link language for target "FakeTarget".

EXPECTED:
CLion updates CMake successfully.

WORKAROUND:
Make sure the project is created on the same drive that the Engine is installed on.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-73176 in the post.

4
Login to Vote

Won't Fix
ComponentUE - Foundation - Cpp Tools
Affects Versions4.224.21.2
CreatedApr 22, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021
View Jira Issue