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

Generator: msvs: compile .mm files #1167

Closed
wants to merge 1 commit into from
Closed

Conversation

jracle
Copy link
Contributor

@jracle jracle commented Apr 7, 2017

Hi guys,

in a native node extension I want to compile .mm file with C/C++ compiler on Windows.

It does not appear in vcxproj in CLCompile group. I did the modification to fix it.

Cheers

@bnoordhuis
Copy link
Member

.mm is normally used for Objective-C++ files, isn't it? How would that work exactly?

@jracle
Copy link
Contributor Author

jracle commented Apr 7, 2017

Yes indeed, this file compiles as Objective-C++ on mac, and as C++ on windows.
I happen in several projects to need to put .mm extension so as clang not to shout if I import an objective-C header. This is BTW consistent with the rest of the file I modified, see:

def _ValidateSourcesForMSVSProject(spec, version):
    ....
    is_compiled_file = ext in [
        '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']

which already considers '.mm' as a valid extension for a vcxproj.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

Right, I understand now: Objective in name only. Okay, LGTM.

CI: https://ci.nodejs.org/job/nodegyp-test-pull-request/6/

bnoordhuis pushed a commit that referenced this pull request Jun 8, 2018
PR-URL: #1167
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@bnoordhuis
Copy link
Member

Landed in 206309e, thanks.

@bnoordhuis bnoordhuis closed this Jun 8, 2018
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.

2 participants