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

Enable djinterop on Windows CI builds #3155

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

mr-smidge
Copy link
Contributor

This PR enables building of the ENGINEPRIME feature on Windows builds.

It also:

  • Sets the /Zc:__cplusplus flag for the whole build when using MSVC - see this post on the MS C++ Team Blog.
  • Fixes some other build-related issues for macOS and Linux.
  • Bumps up the version of libdjinterop to the latest version, which also contains fixes for multi-platform builds.

@@ -49,6 +49,9 @@ endif()
#######################################################################

set(CMAKE_CXX_STANDARD 17)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for the current version of libdjinterop (which looks only at __cplusplus and doesn't use any _MSVC_LANG hacks), but may be considered a good idea to enable anyway.

FWIW, if used on an older version of MSVC, this prints an "unrecognised option" message and carries on anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it suffice to add this to the libdjinterop CMakeLists.txt? Or is this required for libdjinterop includes? If so, will building Mixxx still work if an older MSVC version is used that doesn't support the flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag is already set in libdjinterop's own CMakeLists.txt file, but it is indeed also required to use libdjinterop's public includes, which is why it's required in Mixxx in order to use libdjinterop.

The /Zc:__cplusplus flag is supported from VS 2017 onwards, which appears to be the minimum-supported version to build Mixxx (according to the wiki). That was my reasoning for adding the flag for the whole MSVC build - hope this is ok.


set(DJINTEROP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lib/libdjinterop-install")
set(DJINTEROP_LIBRARY "lib/${CMAKE_STATIC_LIBRARY_PREFIX}djinterop${CMAKE_STATIC_LIBRARY_SUFFIX}")
Copy link
Contributor Author

@mr-smidge mr-smidge Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifying lib here (rather than ${CMAKE_INSTALL_LIBDIR}) follows the pattern used for keyfinder, and should resolve the issue seen by @uklotzde here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable since CMAKE_INSTALL_LIBDIR refers to the standard system location while the local builds use just "lib".

@mr-smidge mr-smidge force-pushed the enh/djinterop-win-ci branch 2 times, most recently from 91b5827 to 71213a5 Compare October 6, 2020 16:40
@mr-smidge mr-smidge marked this pull request as ready for review October 6, 2020 18:32
@mr-smidge
Copy link
Contributor Author

The Ubuntu2004 build timed out after 1 hour - please could this be restarted? (I don't have appropriate permissions to do so.)

FWIW, the OSX/Scons build also timed out, but I understand this is considered less important as the CMake build passed just fine.

Many thanks!

@uklotzde
Copy link
Contributor

uklotzde commented Oct 6, 2020

The Ubuntu2004 build timed out after 1 hour - please could this be restarted? (I don't have appropriate permissions to do so.)

FWIW, the OSX/Scons build also timed out, but I understand this is considered less important as the CMake build passed just fine.

Many thanks!

Unfortunately, AppVeyour builds cannot be restarted afaik.

@mr-smidge
Copy link
Contributor Author

Unfortunately, AppVeyour builds cannot be restarted afaik.

I've force-pushed a no-op update to kick the builds off again. Fingers crossed...

@mr-smidge
Copy link
Contributor Author

All CMake and AppVeyor builds are now green.

@uklotzde
Copy link
Contributor

uklotzde commented Oct 6, 2020

LGTM

@uklotzde uklotzde merged commit c90e38b into mixxxdj:master Oct 6, 2020
@uklotzde
Copy link
Contributor

uklotzde commented Oct 7, 2020

Now the master build got stuck at the exact same step:
https://ci.appveyor.com/project/mixxxdj/mixxx/builds/35606313/job/3aswu18mtsxu809w

It might be a coincidence, but it is suspicious. @Holzhaus Did we miss something?

@mr-smidge
Copy link
Contributor Author

Now the master build got stuck at the exact same step:
https://ci.appveyor.com/project/mixxxdj/mixxx/builds/35606313/job/3aswu18mtsxu809w

I notice that subsequent master builds now appear ok. There don't seem to be many useful timestamps in the console output to see where it's slow, but if it turns out to be due to libdjinterop, I'm happy to at least take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants