Skip to content

Commit

Permalink
Bug fix and suppress pip/uv/doxygen/sphinx outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
gipert committed Dec 28, 2024
1 parent 9f39f02 commit 933ff66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR})
# configure target that runs Doxygen
add_custom_command(
OUTPUT ${DOXYGEN_INDEX_FILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} > /dev/null
DEPENDS ${DOXYFILE_IN} ${REMAGE_PUBLIC_HEADERS}
MAIN_DEPENDENCY ${DOXYFILE_OUT})

Expand Down Expand Up @@ -59,7 +59,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${SPHINX_SOURCE}/conf.py @

add_custom_command(
OUTPUT ${SPHINX_INDEX_FILE}
COMMAND ${SPHINX_EXECUTABLE} -b html -Dbreathe_projects.remage=${DOXYGEN_OUTPUT_DIR}/xml
COMMAND ${SPHINX_EXECUTABLE} -q -b html -Dbreathe_projects.remage=${DOXYGEN_OUTPUT_DIR}/xml
${SPHINX_SOURCE} ${SPHINX_BUILD}
WORKING_DIRECTORY ${SPHINX_SOURCE}
DEPENDS ${SPHINX_SOURCES} ${SPHINX_IMAGES} ${DOXYGEN_INDEX_FILE}
Expand Down
24 changes: 10 additions & 14 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,23 @@ configure_file("${PROJECT_SOURCE_DIR}/cmake/cpp_utils.py.in"
set(VENV_DIR "${CMAKE_BINARY_DIR}/python_venv")

add_custom_command(
OUTPUT "${VENV_DIR}/bin/activate"
COMMAND "${PYTHON_EXECUTABLE}" -m venv "${VENV_DIR}"
COMMAND "${VENV_DIR}/bin/python" -m pip install --upgrade pip
COMMAND "${VENV_DIR}/bin/python" -m pip install uv)
OUTPUT "${VENV_DIR}/bin/uv"
COMMAND "${Python3_EXECUTABLE}" -m venv "${VENV_DIR}"
COMMAND "${VENV_DIR}/bin/python" -m pip -q install --no-warn-script-location --upgrade pip
COMMAND "${VENV_DIR}/bin/python" -m pip -q install --no-warn-script-location uv
COMMENT "Configuring Python virtual environment")

add_custom_target(
python-virtualenv
DEPENDS "${VENV_DIR}/bin/activate"
COMMENT "Configuring Python virtual environment in ${VENV_DIR}")
add_custom_target(python-virtualenv DEPENDS "${VENV_DIR}/bin/uv")

# install the remage wrapper package into the virtual environment with uv
add_custom_command(
OUTPUT "${VENV_DIR}/bin/remage"
COMMAND "${VENV_DIR}/bin/python" -m uv pip install "${CMAKE_SOURCE_DIR}"
DEPENDS python-virtualenv)

add_custom_target(
remage-cli ALL
DEPENDS "${VENV_DIR}/bin/remage"
COMMAND "${VENV_DIR}/bin/python" -m uv -q pip install "${CMAKE_SOURCE_DIR}"
DEPENDS python-virtualenv
COMMENT "Installing remage Python wrapper into the virtual environment")

add_custom_target(remage-cli ALL DEPENDS "${VENV_DIR}/bin/remage")

# store the path to the remage executable, needed later in tests
set_target_properties(remage-cli PROPERTIES PYEXE_PATH "${VENV_DIR}/bin/remage")

Expand Down

0 comments on commit 933ff66

Please sign in to comment.