3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-05 17:14:07 +00:00

[CMake] Add missing python example files.

We have to flatten the hierarchy when copying across so that all
Python examples have the `z3` directory in their directory.
This commit is contained in:
Dan Liew 2017-06-25 23:08:24 +01:00
parent bfd1bbc136
commit 849eb389e6

View file

@ -1,5 +1,11 @@
set(python_example_files
all_interval_series.py
complex/complex.py
example.py
hamiltonian/hamiltonian.py
mus/marco.py
mus/mss.py
socrates.py
visitor.py
)
@ -10,7 +16,10 @@ foreach (example_file ${python_example_files})
add_custom_command(OUTPUT "${z3py_bindings_build_dest}/${example_file}"
COMMAND "${CMAKE_COMMAND}" "-E" "copy"
"${CMAKE_CURRENT_SOURCE_DIR}/${example_file}"
"${z3py_bindings_build_dest}/${example_file}"
# We flatten the hierarchy so that all python files have
# the `z3` directory in their directory so that their import
# statements "just work".
"${z3py_bindings_build_dest}/"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${example_file}"
COMMENT "Copying \"${example_file}\" to ${z3py_bindings_build_dest}/${example_file}"
)