Skip to content

Commit 12b1be3

Browse files
jktjktmichalvasko
authored andcommitted
python: do not put generated files into the source tree
Untracked content shows up in git submodules, causing stuff to be marked "dirty" by various git-level tools. Tested by temporarily putting the resulting target within `ALL`. The result is the same as without this change (and it remains unusable with no generated index, at least when building out-of-tree, BTW).
1 parent 1436092 commit 12b1be3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if (PYTHON)
1919
endif()
2020

2121
configure_file(${SETUP_PY_IN} ${SETUP_PY})
22-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile)
22+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile.in ${CMAKE_CURRENT_BINARY_DIR}/docs/Makefile)
2323
add_custom_target(pyapi ALL COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} ${DEBUG})
24-
add_custom_target(pyapidoc COMMAND make -f ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile html)
24+
add_custom_target(pyapidoc COMMAND make -f ${CMAKE_CURRENT_BINARY_DIR}/docs/Makefile html)
2525
execute_process(COMMAND ${PYTHON} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"
2626
OUTPUT_VARIABLE PYTHON_MODULE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
2727
install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --install-lib=\$ENV{DESTDIR}/${PYTHON_MODULE_PATH})")

0 commit comments

Comments
 (0)