Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang / Windows Build #40

Closed
dresch86 opened this issue Jan 12, 2018 · 6 comments
Closed

Clang / Windows Build #40

dresch86 opened this issue Jan 12, 2018 · 6 comments

Comments

@dresch86
Copy link

@dresch86 dresch86 commented Jan 12, 2018

I would like to build with clang (llvm-windows). I don't see the options in the CMake to do so though as it defaults to MSVC. Can corrade be built with LLVM's clang?

@mosra

This comment has been minimized.

Copy link
Owner

@mosra mosra commented Jan 12, 2018

@Squareys can you comment here? I don't remember the particulars or how far we got when we tried the last time.

@Squareys

This comment has been minimized.

Copy link
Contributor

@Squareys Squareys commented Jan 12, 2018

Hey @primesoftware !

You need a special cmake command to tell cmake to use clang in the MSVC project:
cmake -G"Visual Studio 14 2015" -T"LLVM-vs2014" ..

I am unsure if this works, though. I think the cmake still thinks you are using the MSVC compiler and tries to compile with MSVC 15 specific code...

This is what I used back then, but not guarantee that works or even worked back then, it's been a while.

Let me know if you get it to work! :)

@dresch86

This comment has been minimized.

Copy link
Author

@dresch86 dresch86 commented Jan 26, 2018

I got it to work!! I added this toolset (https://github.com/WubbaLubba/LlvmForVS2017) to VS and used the command:

cmake -G"Visual Studio 15 2017" -T"LLVM-vs2017" ..

Then I followed the instructions on how to build the rest of the way. Now to see if I can get Magnum to work too...

@mosra mosra added this to TODO in Platforms via automation Jan 27, 2018
@mosra

This comment has been minimized.

Copy link
Owner

@mosra mosra commented Jan 27, 2018

Wow, this is amazing, thank you!

I think we should add this to the AppVeyor build now :)

@mosra mosra moved this from TODO to In Progress in Platforms Jan 27, 2018
@dresch86

This comment has been minimized.

Copy link
Author

@dresch86 dresch86 commented Jan 27, 2018

I will have to see if the downloadable SDL dll will work with LLVM code otherwise in order to use clang/llvm with Magnum folks might have to rebuild their required libraries like SDL, GLFW, etc.

@mosra mosra added the help wanted label Nov 25, 2019
@mosra mosra added this to the 2019.1c milestone Dec 11, 2019
@mosra

This comment has been minimized.

Copy link
Owner

@mosra mosra commented Dec 20, 2019

With b87f7ab, cd9c0d2, 4491547, d0dfbfd, c0c4a06, 3fc478e, 94594b2, 3b4cade and 0280fbe Corrade compiles on clang-cl cleanly without warnings and passes all tests. It's also tested on the CI now: https://magnum.graphics/build-status/.

@mosra mosra closed this Dec 20, 2019
Platforms automation moved this from In Progress to Done Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Platforms
  
Done
3 participants
You can’t perform that action at this time.