Skip to content

Commit

Permalink
Revert "fix meson build_type" (#4503)
Browse files Browse the repository at this point in the history
* Revert "fix meson build_type (#4489)"

This reverts commit aa56072.

* touch
  • Loading branch information
jgsogo authored Feb 11, 2019
1 parent aa56072 commit 3ba8012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
8 changes: 1 addition & 7 deletions conans/client/build/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from conans.client import defs_to_string, join_arguments, tools
from conans.client.tools.oss import args_to_string
from conans.errors import ConanException
from conans.model.build_info import DEFAULT_BIN, DEFAULT_INCLUDE, DEFAULT_LIB, DEFAULT_SHARE
from conans.model.version import Version
from conans.util.files import decode_text, get_abs_path, mkdir

Expand All @@ -31,11 +30,6 @@ def __init__(self, conanfile, backend=None, build_type=None):
self.options = dict()
if self._conanfile.package_folder:
self.options['prefix'] = self._conanfile.package_folder
self.options['libdir'] = DEFAULT_LIB
self.options['bindir'] = DEFAULT_BIN
self.options['sbindir'] = DEFAULT_BIN
self.options['libexecdir'] = DEFAULT_BIN
self.options['includedir'] = DEFAULT_INCLUDE

# C++ standard
cppstd = self._ss("cppstd")
Expand All @@ -51,7 +45,7 @@ def __init__(self, conanfile, backend=None, build_type=None):

# shared
shared = self._so("shared")
self.options['default_library'] = "shared" if shared is None or shared else "static"
self.options['default-library'] = "shared" if shared is None or shared else "static"

# fpic
if self._os and "Windows" not in self._os:
Expand Down
11 changes: 3 additions & 8 deletions conans/test/unittests/client/build/meson_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,8 @@ def folders_test(self):
meson = Meson(conan_file)

defs = {
'default_library': 'shared',
'default-library': 'shared',
'prefix': package_folder,
'libdir': 'lib',
'bindir': 'bin',
'sbindir': 'bin',
'libexecdir': 'bin',
'includedir': 'include',
'cpp_std': 'none'
}

Expand Down Expand Up @@ -124,9 +119,9 @@ def folders_test(self):
self._check_commands(cmd_expected, conan_file.command)

args = ['--werror', '--warnlevel 3']
defs['default_library'] = 'static'
defs['default-library'] = 'static'
meson.configure(source_folder="source", build_folder="build", args=args,
defs={'default_library': 'static'})
defs={'default-library': 'static'})
build_expected = os.path.join(self.tempdir, "my_cache_build_folder", "build")
source_expected = os.path.join(self.tempdir, "my_cache_source_folder", "source")
cmd_expected = 'meson "%s" "%s" --backend=ninja %s %s --buildtype=release' \
Expand Down

0 comments on commit 3ba8012

Please sign in to comment.