CMake fails if project is stored on an external drive

Answered

Hello.

I am using CLion 2017.3.3 with the MinGW 5.0 toolchain, bundled CMake version 3.9.6.

I store my projects on a standard 32GB USB flash drive. Today, when attempting to build my project, I got a "No rule to make target [project name]" error. I discovered that this issue resolved itself if I copied my project folder to my desktop on my C: drive. This is the only fix I have found. I have also tried:

  • Moving the project folder to a different path on the flash drive
  • Symlinking the flash drive to a folder on my C: drive (so CLion was loading the project from C:\DDrive\projectname)
  • Switching to a different machine with the same CLion version, but with the Cygwin64 toolchain.

I even tried creating a new, blank project on the drive with the standard template provided by CLion (single-file hello world program with default CMakeLists.txt file), but CMake would not compile it.

Any advice is appreciated, I work on multiple machines so it is most convenient to store my projects on removable media.

2
2 comments
Avatar
Permanently deleted user

Bump?

0

Hello! I'm terribly sorry for the delay in response.

We've made some test on our side. According to the testing results:

  1. The problem is reproducible in CLion with MinGW.
  2. The problem is reproducible outside CLion (building the target in the Command Prompt) with MinGW.
  3. The problem is not reproducible in CLion with MinGW-64.

So it looks like a MinGW-related issue. A workaround is to use MinGW-64.

0

Please sign in to leave a comment.