As I've tried getting cmake working with clang and gcc here I've run across what I think is the wierdest thing ever.
I have a small hello world-ish program that compiles perfectly using clang in cmake in ubuntu, the setup was super fast and it's just a fun thing to try.
Now on the windows side I have way more issues, I did the regular order of installing MinGW w64, then clang (also 64 bit) and lastly cmake (VS 15 was insalled earlier due to school projects). I managed to fumble with different cmake things until I almost got it compiling, clearing build directory and using cmake .. -G"MinGW Makefiles"
in my build folder to try and get the thing compiling at all. What I instead got was errors telling me the compile failed and it wasn't long before I figured out why;
the try_compile of cmake tries to pass MSVC style flags like /nologo
to clang which then thinks the flags are directories.
I couldn't find any way of forcing the flags to look like the regular -flag
's.
Are there some hidden cmake variables that can be set or am I just screwed tring to compile in this specific configuration?