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

Fix: add preprocessor_definitions to Meson + CC/CXX from build requirements #8353

Merged
merged 5 commits into from Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion conan/tools/meson/toolchain.py
Expand Up @@ -74,7 +74,8 @@ def __init__(self, conanfile, env=os.environ):
self._fpic = self._conanfile.options.get_safe("fPIC")
self.definitions = dict()
self.preprocessor_definitions = dict()
self._env = env
self._env = env.copy()
lasote marked this conversation as resolved.
Show resolved Hide resolved
self._env.update(self._conanfile.env)

@staticmethod
def _to_meson_value(value):
Expand Down
4 changes: 3 additions & 1 deletion conans/test/functional/toolchains/meson/test_android.py
Expand Up @@ -101,12 +101,14 @@ def env(self):
ar = self._tool('ar')
cflags = '--target=%s' % self._target
cxxflags = '--target=%s' % self._target
ldflags = '--target=%s' % self._target

return {'CC': cc,
'CXX': cxx,
'AR': ar,
'CFLAGS': cflags,
'CXXFLAGS': cxxflags}
'CXXFLAGS': cxxflags,
'LDFLAGS': ldflags}

def profile(self):
template = textwrap.dedent("""
Expand Down
4 changes: 3 additions & 1 deletion conans/test/functional/toolchains/meson/test_ios.py
Expand Up @@ -71,11 +71,13 @@ def env(self):
cflags += " -isysroot " + self.xcrun.sdk_path
cflags += " -arch " + to_apple_arch(self.arch)
cxxflags = cflags
ldflags = cflags
solvingj marked this conversation as resolved.
Show resolved Hide resolved

return {'CC': cc,
'CXX': cxx,
'CFLAGS': cflags,
'CXXFLAGS': cxxflags}
'CXXFLAGS': cxxflags,
'LDFLAGS': ldflags}

def profile(self):
template = textwrap.dedent("""
Expand Down