Tests: - Add cc test - Add python test Examples: - Add examples/cpp - Add examples/data - Add examples/notebook - Add examples/python Signed-off-by: Corentin Le Molgat <corentinl@google.com>
21 lines
459 B
CMake
21 lines
459 B
CMake
if (NOT BUILD_PYTHON)
|
|
return()
|
|
endif()
|
|
|
|
foreach(TEST
|
|
hidato_table
|
|
integer_programming
|
|
knapsack
|
|
linear_programming
|
|
pyflow_example
|
|
tsp
|
|
)
|
|
add_test(py${TEST}_venv ${VENV_BIN_DIR}/python ${CMAKE_CURRENT_SOURCE_DIR}/${TEST}.py)
|
|
set_tests_properties(py${TEST}_venv PROPERTIES DEPENDS build_venv)
|
|
endforeach()
|
|
|
|
include(GNUInstallDirs)
|
|
install(DIRECTORY .
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/ortools/examples/python
|
|
FILES_MATCHING PATTERN "*.py")
|