mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 12:53:55 +08:00

add_custom_command() supports option DEPFILE when generator is Makefiles or Ninja. And swig tool is able to generate a dependencies file which is compatible with DEPFILE option.
14 lines
356 B
CMake
14 lines
356 B
CMake
cmake_minimum_required(VERSION 3.1...3.20)
|
|
|
|
project(TestBasicPython CXX)
|
|
|
|
include(CTest)
|
|
|
|
set(language "python")
|
|
|
|
include (../BasicConfiguration.cmake)
|
|
|
|
add_test (NAME BasicPython
|
|
COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PS}$<TARGET_FILE_DIR:example>"
|
|
"${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
|