diff options
-rw-r--r-- | src/api/python/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/api/python/genkinds.py.in (renamed from src/api/python/genkinds.py) | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/api/python/CMakeLists.txt b/src/api/python/CMakeLists.txt index b400c14e5..62482a0ba 100644 --- a/src/api/python/CMakeLists.txt +++ b/src/api/python/CMakeLists.txt @@ -26,12 +26,13 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories("${CMAKE_BINARY_DIR}/src/") # Generate cvc4kinds.{pxd,pyx} +configure_file(genkinds.py.in genkinds.py) add_custom_target( gen-pycvc4-kinds ALL COMMAND "${PYTHON_EXECUTABLE}" - "${CMAKE_CURRENT_LIST_DIR}/genkinds.py" + "${CMAKE_CURRENT_BINARY_DIR}/genkinds.py" --kinds-header "${PROJECT_SOURCE_DIR}/src/api/cvc4cppkind.h" --kinds-file-prefix "${CMAKE_CURRENT_BINARY_DIR}/cvc4kinds" DEPENDS diff --git a/src/api/python/genkinds.py b/src/api/python/genkinds.py.in index 30ee18708..0f8ba4b45 100644 --- a/src/api/python/genkinds.py +++ b/src/api/python/genkinds.py.in @@ -25,11 +25,8 @@ import argparse import os import sys -# the following command in CVC4/build/src/api/python/CMakeFiles/gen-pycvc4-kinds.dir/build.make -# cd CVC4/build/src/api/python && /usr/bin/python3 CVC4/src/api/python/genkinds.py ... -# indicates we are in directory CVC4/build/src/api/python -# so we use ../../../../src/api to access CVC4/src/api/parsekinds.py -sys.path.insert(0, os.path.abspath('../../../../src/api')) +# get access to CVC4/src/api/parsekinds.py +sys.path.insert(0, os.path.abspath('${CMAKE_SOURCE_DIR}/src/api')) from parsekinds import * |