Skip to content

Commit

Permalink
deprecate 'cppflags' in favor of 'cxxflags'
Browse files Browse the repository at this point in the history
  • Loading branch information
jgsogo committed Feb 26, 2019
1 parent d898cae commit fad1d9d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions conans/model/build_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from collections import OrderedDict

import deprecation

DEFAULT_INCLUDE = "include"
DEFAULT_LIB = "lib"
Expand All @@ -25,7 +26,7 @@ def __init__(self):
self.libs = [] # The libs to link against
self.defines = [] # preprocessor definitions
self.cflags = [] # pure C flags
self.cppflags = [] # C++ compilation flags
self.cxxflags = [] # C++ compilation flags
self.sharedlinkflags = [] # linker flags
self.exelinkflags = [] # linker flags
self.rootpath = ""
Expand Down Expand Up @@ -85,6 +86,17 @@ def res_paths(self):
self._res_paths = self._filter_paths(self.resdirs)
return self._res_paths

# Compatibility for 'cppflags' (old style property to allow decoration)
@deprecation.deprecated(deprecated_in="1.13", removed_in="2.0", details="Use 'cxxflags' instead")
def get_cppflags(self):
return self.cxxflags

@deprecation.deprecated(deprecated_in="1.13", removed_in="2.0", details="Use 'cxxflags' instead")
def set_cppflags(self, value):
self.cxxflags = value

cppflags = property(get_cppflags, set_cppflags)


class CppInfo(_CppInfo):
""" Build Information declared to be used by the CONSUMERS of a
Expand Down Expand Up @@ -140,7 +152,7 @@ def merge_lists(seq1, seq2):

# Note these are in reverse order
self.defines = merge_lists(dep_cpp_info.defines, self.defines)
self.cppflags = merge_lists(dep_cpp_info.cppflags, self.cppflags)
self.cxxflags = merge_lists(dep_cpp_info.cxxflags, self.cxxflags)
self.cflags = merge_lists(dep_cpp_info.cflags, self.cflags)
self.sharedlinkflags = merge_lists(dep_cpp_info.sharedlinkflags, self.sharedlinkflags)
self.exelinkflags = merge_lists(dep_cpp_info.exelinkflags, self.exelinkflags)
Expand Down

0 comments on commit fad1d9d

Please sign in to comment.