diff options
Diffstat (limited to 'build_files/scons/Modules')
-rw-r--r-- | build_files/scons/Modules/FindPython.py | 50 | ||||
-rw-r--r-- | build_files/scons/Modules/FindSharedPtr.py | 42 | ||||
-rw-r--r-- | build_files/scons/Modules/FindUnorderedMap.py | 38 | ||||
-rw-r--r-- | build_files/scons/Modules/__init__.py | 0 |
4 files changed, 0 insertions, 130 deletions
diff --git a/build_files/scons/Modules/FindPython.py b/build_files/scons/Modules/FindPython.py deleted file mode 100644 index 9f652b73585..00000000000 --- a/build_files/scons/Modules/FindPython.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import platform - -def FindPython(): - all_abi_flags = ['m', 'mu', ''] - - python = "/usr" - abi_flags = "m" # Most common for linux distros - version = "3.5" - - _arch = platform.uname()[4] + "-linux-gnu" - - # Determine ABI flags used on this system - include = os.path.join(python, "include") - for cur_flags in all_abi_flags: - inc = os.path.join(include, "python" + version + cur_flags, "Python.h") - if os.path.exists(inc): - abi_flags = cur_flags - break - - # Find config.h. In some distros, such as ubuntu 12.10 they are not in standard include dir. - incconf = os.path.join(include, _arch, "python" + version + cur_flags) - if not os.path.exists(os.path.join(incconf, "pyconfig.h")): - incconf = '' - - # Determine whether python is in /usr/lib or /usr/lib64 - lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py") - lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py") - if os.path.exists(lib32): - libpath = "${BF_PYTHON}/lib" - elif os.path.exists(lib64): - libpath = "${BF_PYTHON}/lib64" - else: - # roll back to default value - libpath = "${BF_PYTHON}/lib" - - libpath_arch = libpath - _libpath_arch = os.path.join(python, "lib", _arch) # No lib64 stuff with recent deb-like distro afaik... - _libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")] - for l in _libs: - if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)): - libpath_arch = os.path.join(libpath, _arch) - break - - return {"PYTHON": python, - "VERSION": version, - "LIBPATH": libpath, - "LIBPATH_ARCH": libpath_arch, - "ABI_FLAGS": abi_flags, - "CONFIG": incconf} diff --git a/build_files/scons/Modules/FindSharedPtr.py b/build_files/scons/Modules/FindSharedPtr.py deleted file mode 100644 index ba53f55d563..00000000000 --- a/build_files/scons/Modules/FindSharedPtr.py +++ /dev/null @@ -1,42 +0,0 @@ -def FindSharedPtr(conf): - """ - Detect shared_ptr availability - """ - - found = False - namespace = None - header = None - - if conf.CheckCXXHeader("memory"): - # Finding the memory header doesn't mean that shared_ptr is in std - # namespace. - # - # In particular, MSVC 2008 has shared_ptr declared in std::tr1. In - # order to support this, we do an extra check to see which namespace - # should be used. - - if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"): - print("-- Found shared_ptr in std namespace using <memory> header.") - namespace = 'std' - header = 'memory' - elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"): - print("-- Found shared_ptr in std::tr1 namespace using <memory> header..") - namespace = 'std::tr1' - header = 'memory' - - if not namespace and conf.CheckCXXHeader("tr1/memory"): - # Further, gcc defines shared_ptr in std::tr1 namespace and - # <tr1/memory> is to be included for this. And what makes things - # even more tricky is that gcc does have <memory> header, so - # all the checks above wouldn't find shared_ptr. - if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"): - print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..") - namespace = 'std::tr1' - header = 'tr1/memory' - - if not namespace: - print("-- Unable to find shared_ptrred_map>.") - - conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header - conf.env['SHARED_PTR_NAMESPACE'] = namespace - conf.env['SHARED_PTR_HEADER'] = header diff --git a/build_files/scons/Modules/FindUnorderedMap.py b/build_files/scons/Modules/FindUnorderedMap.py deleted file mode 100644 index 34073c1b0b9..00000000000 --- a/build_files/scons/Modules/FindUnorderedMap.py +++ /dev/null @@ -1,38 +0,0 @@ -def FindUnorderedMap(conf): - """ - Detect unordered_map availability - """ - - namespace = None - header = None - - if conf.CheckCXXHeader("unordered_map"): - # Even so we've found unordered_map header file it doesn't - # mean unordered_map and unordered_set will be declared in - # std namespace. - # - # Namely, MSVC 2008 have unordered_map header which declares - # unordered_map class in std::tr1 namespace. In order to support - # this, we do extra check to see which exactly namespace is - # to be used. - - if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"): - print("-- Found unordered_map/set in std namespace.") - namespace = 'std' - header = 'unordered_map' - elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"): - print("-- Found unordered_map/set in std::tr1 namespace.") - namespace = 'std::tr1' - header = 'unordered_map' - else: - print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.") - elif conf.CheckCXXHeader("tr1/unordered_map"): - print("-- Found unordered_map/set in std::tr1 namespace.") - namespace = 'std::tr1' - header = 'tr1/unordered_map' - else: - print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ") - - conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header - conf.env['UNORDERED_MAP_NAMESPACE'] = namespace - conf.env['UNORDERED_MAP_HEADER'] = header diff --git a/build_files/scons/Modules/__init__.py b/build_files/scons/Modules/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 --- a/build_files/scons/Modules/__init__.py +++ /dev/null |