summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorsvidyuk <[email protected]>2022-12-20 10:35:35 +0300
committersvidyuk <[email protected]>2022-12-20 10:35:35 +0300
commitd238c469aadb562f79ff0c394c83d6918197c606 (patch)
treea72f9bc9050fcb20ab939e3af74532d6298f7bb7 /cmake
parent84f2cfa253cc618438ed6e9d68b33fa7c0d88cb9 (diff)
Resore port of vcs_info.py to pyton3
* Atomic commit swiching vcs_info.py to py3. * Keeping java build part py2 compatible (it can be dropped when maven-export is switched to new java build engine for all projects). * Last external build system generator release 7 with code assuming that vcs_info.py is py3 compatible redeployed.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/common.cmake (renamed from cmake/yandex_common.cmake)5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmake/yandex_common.cmake b/cmake/common.cmake
index 1c136d58040..aedd887a207 100644
--- a/cmake/yandex_common.cmake
+++ b/cmake/common.cmake
@@ -1,6 +1,5 @@
# Set of common macros
-find_package(Python2 REQUIRED)
find_package(Python3 REQUIRED)
add_compile_definitions(CATBOOST_OPENSOURCE=yes)
@@ -39,7 +38,7 @@ function(target_joined_source TgtName Out)
endforeach()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${Out}
- COMMAND Python2::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/gen_join_srcs.py ${CMAKE_CURRENT_BINARY_DIR}/${Out} ${IncludesList}
+ COMMAND Python3::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/gen_join_srcs.py ${CMAKE_CURRENT_BINARY_DIR}/${Out} ${IncludesList}
DEPENDS ${CMAKE_SOURCE_DIR}/build/scripts/gen_join_srcs.py ${ARGN}
)
target_sources(${TgtName} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${Out})
@@ -137,7 +136,7 @@ endfunction()
function(vcs_info Tgt)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/__vcs_version__.c
- COMMAND Python2::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/vcs_info.py no-vcs dummy.json ${CMAKE_CURRENT_BINARY_DIR}/__vcs_version__.c ${CMAKE_SOURCE_DIR}/build/scripts/c_templates/svn_interface.c
+ COMMAND Python3::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/vcs_info.py no-vcs dummy.json ${CMAKE_CURRENT_BINARY_DIR}/__vcs_version__.c ${CMAKE_SOURCE_DIR}/build/scripts/c_templates/svn_interface.c
DEPENDS ${CMAKE_SOURCE_DIR}/build/scripts/vcs_info.py ${CMAKE_SOURCE_DIR}/build/scripts/c_templates/svn_interface.c
)
target_sources(${Tgt} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/__vcs_version__.c)