Exocortex / ExocortexCrate

http://exocortex.com/products/crate
BSD 3-Clause "New" or "Revised" License
134 stars 68 forks source link

Fixes build breaks for Maya 2016 and Softimage 2015 on Windows #50

Closed martin-chatterjee closed 8 years ago

martin-chatterjee commented 8 years ago

Both issues for these build breaks got introduced somewhere between 81f6fcd and 2fb8179.

Issue 1: build break for CommonUtils (Visual Studio 2012)

This has apparently been caused by the clang-formatting of Shared/CommonUtils introduced in 966e604.

Clang-format also reordered #include statements in several files. However apparently "CommonAlembic.h" must always be included before CommonAbcCache.h".

Just reverting this include order in three files (while keeping all the rest of the clang-format changes) was enough to again successfully build CommonUtils on my side.

Issue 2: build break for Softimage 2015

This got introduced due to various CMake changes introduced in 4fd6f80 and 7880e12.

I basically reverted all CMake changes introduced in those two commits and then only reintroduced the new crate_BUILD_VERSION and the changes in regards to which MSVC version builds which version of Maya.

With these changes I can now again successfully compile both Softimage 2015 and Maya 2016 (both with Visual Studio 2012).

Prior to these changes (but after fixing CommonUtils) I could only successfully compile Maya 2016 (with VS 2012)

A couple of notes on this:

Please note that my CMake-fu is not strong - all I have been doing here is reverting back to the last known working state and then going forward again bit by bit making sure it still builds and my objective is met (--> build Maya 2015/2016 in VS2012)

I have only verified the Maya2016 and Softimage2015 build on Windows on my side using a fresh repo clone and a full rebuild.

@AWhetter :

I've got to admit that I don't know enough about CMake to even understand your changes to ExocortexCMakeShared.txt in the first place. :) All I know is that they broke Soft2015, and on the other hand Maya2016 in VS2012 still builds without them. So by all means if there is something that I am missing here then please do let me know.

Also as far as I understand the situation neither your nor myself have the ressources to fully build and check all other targets (3DSMax, Python, Arnold, Linux,...) .

Therefore I'd like to suggest to be extremely cautious with changes introduced to the shared parts of this project (like CMake and Shared/CommonUtils) and only touch/change them if absolutely necessary.

bhouston commented 8 years ago

Clang format reorders includes? That is an incredibly dangerous feature.

martin-chatterjee commented 8 years ago

Well, that's what I assumed has happened after reading the comment of the commit.

I never heard that clang format does that before either - but that is what has happened inside 966e604...

martin-chatterjee commented 8 years ago

As already mentioned in the comments of #46 and #51 I'm fine with forgetting about this PR and instead use the alternative PR #51.