WSL "target pattern contains no '%'. Stop."

已完成

Trying to use WSL to compile something from within CLion. I get the following:

-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/c/projects/setmatch/main/clion/debug
src/test/CMakeFiles/unit-tests.dir/depend.make:4: *** target pattern contains no '%'.  Stop.
CMakeFiles/Makefile2:271: recipe for target 'src/test/CMakeFiles/unit-tests.dir/all' failed
src/jni/CMakeFiles/jni.dir/depend.make:4: *** target pattern contains no '%'.  Stop.
make[1]: *** [src/test/CMakeFiles/unit-tests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
src/core/CMakeFiles/core.dir/depend.make:4: *** target pattern contains no '%'.  Stop.
make[1]: *** [src/jni/CMakeFiles/jni.dir/all] Error 2
make[1]: *** [src/core/CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2
CMakeFiles/Makefile2:216: recipe for target 'src/jni/CMakeFiles/jni.dir/all' failed
CMakeFiles/Makefile2:161: recipe for target 'src/core/CMakeFiles/core.dir/all' failed
Makefile:83: recipe for target 'all' failed

Note that if I actually go into WSL and do this:

cmake -DCMAKE_BUILD_TYPE=debug ../../main
make

Everything works fine. So this is CLion-specific.

0

Hi! Do you run the same CMake version directly on WSL and in CLion?

How does depend.make:4 line look like?

0
Avatar
Permanently deleted user

Hi Anna, thanks for getting back! The problem resolved itself by deleting the directory and clearing the CLion cache. I think I had some files left behind from MinGW.

0

请先登录再写评论。