caffe-builder
caffe-builder copied to clipboard
Build script chooses gcc over VC if on path.
Hi, I accidentially had gcc installed (http://tdm-gcc.tdragon.net) - and this breaks the build script. [Output not pasted - ninja fails a subcommand on the variable "toolset"]
I assume it is a bug and not a feature that gcc is chosen as compiler if available, when running the build_v1*0_x64.cmd scripts?
Asbjørn
@asbe Can you echo the PATH after vcvarsall.bat has been called?
Some people have had success by specifying the compiler path like so: -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe
Hi. I worked around it by removing the gcc compiler suite - but I assume this also could be fixed by checking what compiler is reported used? Literally the first output of your script is "The C compiler identification is MSVC 18.0.21005.1", and when the id was Gnu 5.1 I realized that gcc was used - the Ninja errors were slightly confusing.
I'll try to get around to reinstalling gcc and have a poke around - if it helps.
same problem ! vs2013 && tdm installed, tdm is chosen as compiler.
CMake found gcc.exe on your path. You need to it tell it to use cl.exe either by executing:
set CC=cl
set CXX=cl
in a command prompt before you execute CMake or by adding -DCMAKE_C_COMPILER=cl
and -DCMAKE_CXX_COMPILER=cl
on the cmake command.
Make sure to delete the build folder and start over.