From ab6bdd129ae6009f87394d628b101f05334ac847 Mon Sep 17 00:00:00 2001 From: Stewart Miles Date: Wed, 27 Apr 2016 14:29:22 -0700 Subject: [PATCH 1/3] Fixed docs build when built from tree without submodules. Change-Id: Ib5611f1a12f70be10dc311dfcf436e63ecf2618e --- disttools/push_package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/disttools/push_package.py b/disttools/push_package.py index 05f9e80..4373d08 100755 --- a/disttools/push_package.py +++ b/disttools/push_package.py @@ -687,9 +687,12 @@ def update_docs(self, branch, docs_branch, dryrun): # Clean the working copy and reset to the docs branch. dependencies_dir = os.path.join(self.working_copy, 'dependencies') if os.path.exists(dependencies_dir): + # This is only required if the docs are being built from the github + # master branch which includes a set of submodules. + if os.path.exists(os.path.join(self.working_copy, '.gitmodules')): + self.subprocess_runner.check_call( + ['git', 'submodule', 'deinit', '.'], cwd=self.working_copy) shutil.rmtree(dependencies_dir) - self.subprocess_runner.check_call(['git', 'submodule', 'deinit', '.'], - cwd=self.working_copy) if Package.git_remote_branch_exists(self.git_remote_upstream, docs_branch, self.working_copy, self.subprocess_runner): From 11a52f1d9c05d01406565b7b7714ab5d8245fa32 Mon Sep 17 00:00:00 2001 From: Kelsey Mayfield Date: Fri, 29 Apr 2016 11:20:01 -0700 Subject: [PATCH 2/3] Use buildutil directory within fplutil. Before, including cmake_common.txt was not working when staging for GitHub push because the include was using ${fplroot}, which directed it to fplutil/dependencies/fplutil/buildutil. This causes a CMake error; we should just be using fplutil/buildutil. Tested: Works on OS X Change-Id: Ib741efc2722cbbf8455d081f053cd82a394c17dc --- libfplutil/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfplutil/CMakeLists.txt b/libfplutil/CMakeLists.txt index 58a6145..4897bba 100644 --- a/libfplutil/CMakeLists.txt +++ b/libfplutil/CMakeLists.txt @@ -30,7 +30,7 @@ if(NOT DEFINED fpl_root) endif () endif() -include (${fpl_root}/fplutil/buildutil/cmake_common.txt) +include (${CMAKE_CURRENT_SOURCE_DIR}/../buildutil/cmake_common.txt) set_common_build_variables() # Includes for this project. From d72d27be20826a47b10333370e2c1f07545e725d Mon Sep 17 00:00:00 2001 From: Kelsey Mayfield Date: Fri, 29 Apr 2016 14:30:14 -0700 Subject: [PATCH 3/3] Check dependencies directory for googletest/googletest. The current version of googletest is found under nested googletest directories, but some versions are simply in the "googletest" directory. Check if the former exists, and if not, use the latter. Tested: Works on OS X Change-Id: I4c7b02499263a89273f1b7ca53ef88426cae8c6f --- buildutil/cmake_common.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/buildutil/cmake_common.txt b/buildutil/cmake_common.txt index f089fa6..5343906 100644 --- a/buildutil/cmake_common.txt +++ b/buildutil/cmake_common.txt @@ -79,8 +79,6 @@ function(set_common_build_variables) CACHE PATH "Directory containing the fplutil library.") set(dependencies_libfplutil_dir "${fpl_root}/fplutil/libfplutil" CACHE PATH "Directory containing the libfplutil library.") - set(dependencies_gtest_dir "${fpl_root}/googletest" - CACHE PATH "Directory containing the GoogleTest library.") set(dependencies_mathfu_dir "${fpl_root}/mathfu" CACHE PATH "Directory containing the MathFu library.") set(dependencies_motive_dir "${fpl_root}/motive" @@ -90,6 +88,16 @@ function(set_common_build_variables) set(dependencies_scene_lab_dir "${fpl_root}/scene_lab" CACHE PATH "Directory containing the Scene Lab library.") + # Depending on googletest version, the gtest directory may be nested under + # googletest/googletest + if(EXISTS "${fpl_root}/googletest/googletest") + set(dependencies_gtest_dir "${fpl_root}/googletest/googletest" + CACHE PATH "Directory containing the GoogleTest library.") + else() + set(dependencies_gtest_dir "${fpl_root}/googletest" + CACHE PATH "Directory containing the GoogleTest library.") + endif() + # third party module directory variables set(dependencies_vectorial_dir "${third_party_root}/vectorial" CACHE PATH "Directory containing the Vectorial library.")