Me and my partner are working with CLion so that we can collaborate by pushing and pulling our code via GitHub. We reached a stage where his code compiled perfectly, but mine did not (he is on Mac and I am on Windows) I have attached an image of the general hierarchy of the project:
A folder called MathCore contains all the mathematical headers and .cc files, with subfolders for "Integrateurs" and "Tests". The journal and main are contained in the main folder.
After pulling his code, my initial error was as follows:
However, we managed to fix this by adding a line to CMakeLists.txt (the one found in the main folder), as follows:
set (CMAKE_PREFIX_PATH "C:\\Qt\\5.14.1\\msvc2017_64\\")which is the path that the program was looking for.
After doing this, we managed to load the CMakeLists.txt file. However, when building, we got a new error:
mingw32-make.exe[3]: No rule to make target 'RCS/../', needed by '../'. Stop.
mingw32-make.exe[2]: [CMakeFiles/ToupieMain.dir/all] Error 2
mingw32-make.exe[1]: [CMakeFiles/ToupieMain.dir/rule] Error 2
mingw32-make.exe: [ToupieMain] Error 2
As far as we can tell, the main issue is "No rule to make target ... needed by". We googled the issue and the specific issue with the target being RCS is fairly rare. I searched my computer for files named RCS and the closest match was in C:\\Qt, but it was buried deep inside a very specific folder that is almost certainly not being used by the program. According to google, the more general issue "No rule to make target" usually occers when the file (here, RCS) is not found, but we have no idea where this file could be (although since RCS is revision control system, this may be an issue with CLion trying to merge our projects together, although when we searched our problem on Google with the additional key word "CLion" we got no results.
Here is a photo of the CMakeLists.txt in full:
![photo of cmakelists.txt](https://moodlearchive.epfl.ch/2019-2020/pluginfile.php/575901/mod_forum/post/59428/cmakelists%20photo.png)
We tried a couple of simple fixes, like changing
set(CMAKE_CXX_FLAGS "-O -mavx2 -funroll-loops")to a comment, as it is only used for a very specific purpose on my partner's computer and I do not need it, and changing
set(CMAKE_CXX_STANDARD 17) to set(CMAKE_CXX_STANDARD 14)in case I was on C++ 14 instead of 17, but neither fix worked.
Right now, I am re-installing Qt; in the worst case I will completely delete the project and pull it from GitHub again (because maybe an error was created when merging my project with the current version on GitHub, especially since my partner has done a lot more pushes than me!). But is there a simpler fix?