Skip to content

CI: Remove explicit LANGUAGE flags for cmake 3.19+#3753

Merged
jp9000 merged 1 commit intoobsproject:masterfrom
PatTheMav:macos-cmake-fixes
Nov 21, 2020
Merged

CI: Remove explicit LANGUAGE flags for cmake 3.19+#3753
jp9000 merged 1 commit intoobsproject:masterfrom
PatTheMav:macos-cmake-fixes

Conversation

@PatTheMav
Copy link
Copy Markdown
Member

Description

Removes the Cmake directives to explicitly set the language of some plugins to C on macOS which breaks most recent cmake versions.

Motivation and Context

Cmake merged and released a change with version 3.19 that breaks building on macOS with our current cmake rules.

The change as explained in https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4780 now sets the language flag explicitly when LANGUAGE is set in cmake rules. This leads to the switch -x c being added to calls to cc or clang which then fails when the compiler meets an ObjectiveC file (as is the case in libobs and some other plugins.

According to one of cmake's maintainers, the flag is supposed to explicitly set the source code language, not which compiler is preferred. This PR removes all instances of setting the LANGUAGE for plugins that use ObjectiveC to enable compilation again.

Note that Cmake is not part of macOS default or development distribution, so it has to be installed via Homebrew where 3.19 is the default version.

How Has This Been Tested?

  • OBS compiled and tested with cmake 3.19

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@jp9000 jp9000 merged commit fb27900 into obsproject:master Nov 21, 2020
@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Nov 21, 2020
@PatTheMav PatTheMav deleted the macos-cmake-fixes branch December 10, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants