Move generated versions.target file to build directory

This commit is contained in:
Lukas Joswiak 2021-11-10 18:00:07 -08:00
parent 557186ed17
commit 8d4ec8562d
4 changed files with 4 additions and 3 deletions

View File

@ -89,7 +89,7 @@ message(STATUS "Current git version ${CURRENT_GIT_VERSION}")
set(FDB_PACKAGE_NAME "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
set(FDB_VERSION ${PROJECT_VERSION})
set(FDB_VERSION_PLAIN ${FDB_VERSION})
configure_file(${CMAKE_SOURCE_DIR}/versions.target.cmake ${CMAKE_SOURCE_DIR}/versions.target)
configure_file(${CMAKE_SOURCE_DIR}/versions.target.cmake ${CMAKE_CURRENT_BINARY_DIR}/versions.target)
message(STATUS "FDB version is ${FDB_VERSION}")
message(STATUS "FDB package name is ${FDB_PACKAGE_NAME}")

View File

@ -49,6 +49,7 @@ function(add_documentation_target)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}_done
COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir} &&
FDB_VERSIONS_TARGET_PATH=${CMAKE_BINARY_DIR}/versions.target
${python_command} ${SPHINX_COMMAND} -W -b ${target}
-d ${doctree} -c ${sphinx_dir}
${sphinx_dir}/source

View File

@ -53,7 +53,7 @@ copyright = u'2013-2021 Apple, Inc and the FoundationDB project authors'
# Load the version information from 'versions.target'
import xml.etree.ElementTree as ET
version_path = os.path.join(os.path.dirname(__file__), '..', '..', 'versions.target')
version_path = os.environ['FDB_VERSIONS_TARGET_PATH']
tree = ET.parse(version_path)
root = tree.getroot()

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)versions.target" />
<Import Project="$(OutDir)versions.target" />
<PropertyGroup Condition="'$(Release)' != 'true' ">
<SuppressValidation>true</SuppressValidation>
<PreReleaseDecoration>-PRERELEASE</PreReleaseDecoration>