Ejemplo n.º 1
0
    os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)

import ced_py_utils

gtest_binaries_dir = os.path.abspath(os.getcwd() + '/../../binaries_gtest')
gtest_include_dir = os.path.abspath(os.getcwd() +
                                    '/cedrus_build_gtest/gtest-1.7.0/include')

# this next path is INTENTIONALLY a relative path. (not absolute path)
relpath_to_reach_gtest_src_from_our_output_dir = '../build_oss_deps/mac/cedrus_build_gtest/gtest-1.7.0/'

# First section:  do a bunch of sanity-checking
ced_py_utils.verify_that_CWD_is_the_enclosing_folder_of_this_script()
ced_py_utils.verify_absence_of_fink()
ced_py_utils.verify_absence_of_homebrew()
ced_py_utils.enforce_dir_exists(gtest_binaries_dir + os.path.sep +
                                relpath_to_reach_gtest_src_from_our_output_dir)
ced_py_utils.enforce_dir_exists(gtest_binaries_dir)
ced_py_utils.enforce_dir_exists(gtest_include_dir)

conf_cmd = relpath_to_reach_gtest_src_from_our_output_dir + os.path.sep + 'configure '
conf_cmd += str(' CXX="clang++ -std=c++11 -stdlib=libc++" ' +
                ' LDFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++" ' +
                ' LINKERFLAGS="-stdlib=libc++" DYLDFLAGS="-stdlib=libc++" ')

# note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'.
# (in other words, we are NOT running configure from the dir where configure resides.)
# This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir.
ced_py_utils.exec_command_using_given_cwd(conf_cmd, gtest_binaries_dir)
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)

import ced_py_utils

boost_src_dir = os.path.abspath(os.getcwd() + "/../../boost_github")
boost_binaries_dir = os.path.abspath(os.getcwd() + "/../../binaries_boost")

cedrus_build_script = os.path.abspath(os.getcwd() + "/cedrus_build_boost/cedrus_build_boost.sh")
cedrus_boost_patch = os.path.abspath(os.getcwd() + "/cedrus_build_boost/patch_submodule_tools_build_1_58.patch")

# First section:  do a bunch of sanity-checking
ced_py_utils.verify_that_CWD_is_the_enclosing_folder_of_this_script()
ced_py_utils.verify_absence_of_fink()
ced_py_utils.verify_absence_of_homebrew()
ced_py_utils.enforce_dir_exists(boost_src_dir)
ced_py_utils.enforce_dir_exists(boost_binaries_dir)

# ---------- Begin 2nd section: make sure SUBMODULES inside boost were populated!! -------

# Note: this list of submodules is NOT exhaustive!  please populate ALL SUBMODULES.

# if anything in this section fails, you need to:
#    1. go into the boost_src_dir directory.
#    2. run the command: git submodule init
#    3. run the command: git submodule update --init

submod_msg = "If this fails, you need to GO INTO YOUR checked-out boost.org repo and do: {git submodule update --init}"
ced_py_utils.enforce_dir_exists(boost_src_dir + "/libs/asio/include", submod_msg)