mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 00:13:16 +00:00
[CMake] Teach CMake to build the maxsat
example as an external
project. The project can be built by building the new `c_maxsat_example` target.
This commit is contained in:
parent
bfd1bbc136
commit
4d6cbd3788
2 changed files with 58 additions and 0 deletions
|
@ -23,6 +23,22 @@ ExternalProject_Add(c_example
|
|||
)
|
||||
set_target_properties(c_example PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
################################################################################
|
||||
# Build maxsat example project using libz3's C API as an external project
|
||||
################################################################################
|
||||
ExternalProject_Add(c_maxsat_example
|
||||
DEPENDS libz3
|
||||
# Configure step
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/maxsat"
|
||||
CMAKE_ARGS "-DZ3_DIR=${CMAKE_BINARY_DIR}"
|
||||
# Build step
|
||||
${EXTERNAL_PROJECT_BUILD_ALWAYS_ARG}
|
||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/c_maxsat_example_build_dir"
|
||||
# Install Step
|
||||
INSTALL_COMMAND "${CMAKE_COMMAND}" -E echo "" # Dummy command
|
||||
)
|
||||
set_target_properties(c_maxsat_example PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Build example project using libz3's C++ API as an external project
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue