CLion infinitely loops while loading CMake Project
Hi,
I'm setting a project for NUCLEO-H755ZI-Q board (this might be important since an older project, I had no issues with).
I start the project normally and configure the project in CubeMX (both cores), and then generate the code. The problem is CLion will initially inform me that my compilers, arm-none-eabi-gcc are not found on PATH.
This is incorrect as I can go to my command window and type arm-none-eabi-gcc --version anywhere in the file system and get the version output information. And I have verified the PATH variable to have that information.
Now, if I put in the full path in to the CMAKE_C_COMPILER for example, then upon reloading the project CLion is stuck in an infinite loop:
- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
And this keeps repeating. Is this happening because ABI info fails? It does not stop (I tried letting it do this for several hours). I also tried invalidating the cache and restarting.
How do I check what is wrong with CLion's PATH variable and how it sees it?
When writing path names on a Windows 10, do I use \\ or / in the path name or is it all the same?
Should the whole CmakeLists_template.txt be copied to make CMakeLists.txt at once, or do I need to get past this ABI info or PATH information failing before the rest of the document is parsed? Because I'm unable to change some of the variables for CMakeLists_templates.txt (designating linker file via a variable, for example).
If I make a "traditional C/C++" project from the start menu and start building, the ABI info does not fail but I'm not using the CMAKE_C_COMPILER flags in CMakeLists.txt either.
I'm using:
Windows 10 1903 18362.449
Clion 2019.2.5
MinGW and gcc --version is 8.2.0
Any help and ideas on how to progress are welcomed, as I'm at my wits end with this.
Best regards,
Tero
请先登录再写评论。
I should point out that if I specify the full path to the executables in CC for example:
"C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe"
The compiler is swapped as I see this in the log window:
-- The C compiler identification is GNU 7.3.1
Which is correct for my setup for the arm-none-eabi-gcc.exe.
Now the problem is, the standard test code does not compile and the build fails. I have declared:
SET(CMAKE_C_COMPILER_WORKS 1)
in my CMakeLists_templates.txt and it is present in CMakeLists.txt as well. But for some reason it is not taken into account.
Any ideas on how to force it to skip the test build?
Best regards,
Tero