New installation of cmake "is not able to compile a simple test program." - c++

I am using Cmake 3.5.1, and need to compile some C++ codes that needs Cmake 3.7. I am using Ubuntu 16.04.
I can't uninstall Cmake 3.5.1 as it is bundled with ROS and doing so will break ROS. Hence, I installed CMake 3.12.3 using the instructions from here but in a different directory (/usr/local/cmake-3.12.3).
Running the commands in terminal to check versions:
cmake version 3.12.3
gcc version 5.4.0
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0
Next, I try to compile the C++ codes
cd /media/fastrl-master
sudo cmake .
I got an error that CMake is unable to compile a simple test program. I have tried setting the permissions of the folder containing the C++ codes (fastrl-master), and also to install build essentials (apt install --reinstall build-essential). These did not work.
This is the contents of CMakeError.log
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags:
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: -c
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --c++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --ec++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags:
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: -c
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --c++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --ec++
The output was: Permission denied
Checking whether the CXX compiler is IAR using "" did not match "IAR
.+ Compiler": Checking whether the CXX compiler is IAR using "" did
not match "IAR .+ Compiler": Determining if the CXX compiler works
failed with the following output: Change Dir:
/media/fastrl-master/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_662e1/fast" /usr/bin/make -f
CMakeFiles/cmTC_662e1.dir/build.make CMakeFiles/cmTC_662e1.dir/build
make1: Entering directory '/media/fastrl-master/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o
/usr/local/src/cmake-3.12.3 -o
CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o -c
/media/fastrl-master/CMakeFiles/CMakeTmp/testCXXCompiler.cxx make1:
execvp: /usr/local/src/cmake-3.12.3: Permission denied
CMakeFiles/cmTC_662e1.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o' failed make1: *
[CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o] Error 127 make1:
Leaving directory '/media/fastrl-master/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_662e1/fast' failed make: *
[cmTC_662e1/fast] Error 2

Related

How do I fix the "No known features for CXX compiler" while compiling with CMake (Linux Mint)

I am trying to install this plugin: https://github.com/CatxFish/obs-v4l2sink
I followed all the steps (Installed QT, got obs-studio source code and then tried to build the plugin):
sudo apt install qtbase5-dev
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
But then...
-- Configuring done
CMake Error in CMakeLists.txt:
No known features for CXX compiler
""
version .
-- Build files have been written to: /home/********/obs-v4l2sink/build
It is my first time compiling using cmake (instead of make), and I don't know much about compiling. Was there any step I missed between installing cmake and trying to compile the plugin?
From what I found online, here's what I have done:
build-essential is already installed;
c++, cc and all are installed as well;
tried to add -DCMAKE_CXX_COMPILER=/usr/bin/cc to the cmake command line (did the same with c++);
And of course, I have done the update && upgrade
Here's what's in the CMakeError.log file :
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
1
/usr/bin/ld : ne peut pas trouver Scrt1.o : Aucun fichier ou dossier de ce type
/usr/bin/ld : ne peut pas trouver crti.o : Aucun fichier ou dossier de ce type
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Determining if the C compiler works failed with the following output:
Change Dir: /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_f18b2/fast"
/usr/bin/make -f CMakeFiles/cmTC_f18b2.dir/build.make CMakeFiles/cmTC_f18b2.dir/build
make[1] : on entre dans le répertoire « /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o -c /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_f18b2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f18b2.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o -o cmTC_f18b2
/usr/bin/ld : ne peut pas trouver Scrt1.o : Aucun fichier ou dossier de ce type
/usr/bin/ld : ne peut pas trouver crti.o : Aucun fichier ou dossier de ce type
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_f18b2.dir/build.make:97: recipe for target 'cmTC_f18b2' failed
make[1]: *** [cmTC_f18b2] Error 1
make[1] : on quitte le répertoire « /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp »
Makefile:126: recipe for target 'cmTC_f18b2/fast' failed
make: *** [cmTC_f18b2/fast] Error 2
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
c++: fatal error: no input files
compilation terminated.
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
c++: fatal error: no input files
compilation terminated.
Turning my comment into an answer:
The error message is peculiar. It looks like CMake previously detected a C++ compiler, and is searching for compiler features for it. However, now it cannot find that compiler (blank compiler name and version):
CMake Error in CMakeLists.txt:
No known features for CXX compiler
""
version .
This is indicative of a stale CMake configuration, and it may be useful to clean it up. Try removing the build folder altogether, and run the CMake steps again from the tutorial (starting from creation of the build folder as shown below). This will help clear out the old/cached CMake settings:
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
I'm sharing my problem.
I got the same message as soon as I applied Quickstart: Building with CMake
.
The problem was the project command which specified LANGUAGES element.
project(my-project C)
I removed the C part and it works now.
project(my-project)
Specifying both languages seems to work.
project(my-project LANGUAGES C CXX)
Go to visual studio downloads and download tools regarding visual studio and it will works.
I spend nearly 3 days for this (I reinstall the vscode 2022 eventhough it's not worked).
My Superior suggest me to download tools for visual studio and check ,
now it's working.

MinGw can't compile test file from cmake

I installed MinGW from the official website, and I'm trying to compile a simple cmake project.
I did
cmake -G"MinGw Makefiles" .
and got:
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/MinGW/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp
Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_3eeac/fast && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_3eeac.dir\build.make CMakeFiles/cmTC_3eeac.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_3eeac.dir\testCCompiler.c.obj -c C:\Users\LZ\Desktop\roosek_ocr\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTC_3eeac.dir\build.make:81: recipe for target 'CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj' failed mingw32-make.exe[1]: *** [CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Makefile:137: recipe for target 'cmTC_3eeac/fast' failed
mingw32-make.exe: *** [cmTC_3eeac/fast] Error 2
I found https://stackoverflow.com/a/55941909/6655884 but I looked at my path and I couldn't find sh.exe. Atually I don't know if it's there. How can I check? Typing sh on powershell, it complains that it's not a command or a script or anything.
Other posts talk about MinGw installed through chocolatey, which is not my case.
UPDATE:
Here's the CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
gcc.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: -c
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --c++
The output was:
1
g++.exe: error: unrecognized command line option '--c++'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --ec++
The output was:
1
g++.exe: error: unrecognized command line option '--ec++'; did you mean '-Weffc++'?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
g++.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: -c
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --c++
The output was:
1
g++.exe: error: unrecognized command line option '--c++'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --ec++
The output was:
1
g++.exe: error: unrecognized command line option '--ec++'; did you mean '-Weffc++'?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
g++.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
compilation terminated.
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
Determining if the C compiler works failed with the following output:
Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_3eeac/fast && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_3eeac.dir\build.make CMakeFiles/cmTC_3eeac.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_3eeac.dir\testCCompiler.c.obj -c C:\Users\LZ\Desktop\roosek_ocr\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTC_3eeac.dir\build.make:81: recipe for target 'CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe: *** [cmTC_3eeac/fast] Error 2
I've run into this issue as well and am still looking for a solution. The only way I've been able to get around this issue is to add the CMAKE_CXX_COMPILER_WORKS=1 flag.

cross-compile opencv for arm : c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?

I am trying to cross-compile opencv 4.0/3.4 for a Tinker Board - ARM-based processor — the Rockchip RK3288
I am using Ubuntu 18.04 as host machine.
I pretty much followed everything mentioned here.
But when I try the cmake using below:
mike#mike-laptop:~/opencv-3.4.5/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake ../ I am getting the below error:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags:
The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags: -c
The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
and tons of more messages
I had met the same problem. I try
sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabihf
and I solve it.
I hope it will help you!

Can't build SFML 2.4.1 with CMake

I am trying to build SFML 2.4.1 with CMake GUI for MinGW on Windows 10. I get an error saying that "libintl-8.dll" is missing and a bunch of other errors.
I checked the PATH, "C:\MinGW\bin" and "C:\MinGW\msys\1.0\bin" are both there. I found a library called "msys-intl-8.dll" in "C:\MinGW\msys\1.0\bin", tried to rename it to "libintl-8.dll". The "missing" error disappeared but the rest of the errors persist.
Message in CMake GUI:
The C compiler identification is GNU 5.3.0
The CXX compiler identification is GNU 5.3.0
Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"
Generator: execution of make failed. Make command was:
"C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:40 (project)
Contents of "CMakeOutput.log":
The system is: Windows - 10.0.14393 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"
Contents of "CMakeError.log":
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_2426e/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_2426e/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_acc1b/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_acc1b/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_9db84/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_9db84/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_4e89a/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_4e89a/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_570e4/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_570e4/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_ef272/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_ef272/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_6bcbb/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_6bcbb/fast"
Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"
I manaded to fix the problem, I had to choose Msys MinGW in Generator options instead of just MinGW :)

CMake compiling results in errors

The C compiler identification is unknown The CXX compiler
identification is unknown Check for working C compiler:
C:/MinGW/bin/gcc.exe Check for working C compiler:
C:/MinGW/bin/gcc.exe -- broken CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.2/Modules/CMakeTestCCompiler.cmake:61
(message): The C compiler "C:/MinGW/bin/gcc.exe" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: C:/SFML-2.2/bin/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe"
"cmTryCompileExec3616319305/fast"
C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec3616319305.dir\build.make
CMakeFiles/cmTryCompileExec3616319305.dir/build
mingw32-make.exe[1]: Entering directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E
cmake_progress_report C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o
CMakeFiles\cmTryCompileExec3616319305.dir\testCCompiler.c.obj -c
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTryCompileExec3616319305.dir\build.make:56: recipe for
target
'CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: Leaving directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
mingw32-make.exe[1]: ***
[CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj] Error
1
Makefile:116: recipe for target 'cmTryCompileExec3616319305/fast'
failed
mingw32-make.exe: *** [cmTryCompileExec3616319305/fast] Error 2
CMake will not be able to correctly generate this project. Call
Stack (most recent call first): CMakeLists.txt:16 (project)
Configuring incomplete, errors occurred! See also
"C:/SFML-2.2/bin/CMakeFiles/CMakeOutput.log". See also
"C:/SFML-2.2/bin/CMakeFiles/CMakeError.log".
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build
flags: Id flags:
The output was: 1
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build
flags: Id flags: -c
The output was: 1
Checking whether the CXX compiler is IAR using "" did not match "IAR
.+ Compiler": g++.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir: C:/SFML-2.2/bin/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe"
"cmTryCompileExec3616319305/fast" C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec3616319305.dir\build.make
CMakeFiles/cmTryCompileExec3616319305.dir/build
mingw32-make.exe[1]: Entering directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o
CMakeFiles\cmTryCompileExec3616319305.dir\testCCompiler.c.obj -c
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTryCompileExec3616319305.dir\build.make:56: recipe for
target 'CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj'
failed
mingw32-make.exe[1]: Leaving directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
mingw32-make.exe[1]: ***
[CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj] Error
1
Makefile:116: recipe for target 'cmTryCompileExec3616319305/fast'
failed
mingw32-make.exe: *** [cmTryCompileExec3616319305/fast] Error 2
To answer the question you never asked ... You don't have a compiler installed that CMake is able to find and use. Install one and try again.