Skip to content

Commit

Permalink
rename flatzinc backend to cpsatlp
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Aug 30, 2023
1 parent 8ba7943 commit 5156459
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions cmake/flatzinc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ endif()
add_library(${PROJECT_NAMESPACE}::flatzinc ALIAS flatzinc)


# fzn-ortools Binary
# fzn-cp-sat-lp Binary
add_executable(fzn
ortools/flatzinc/fz.cc
)
Expand All @@ -132,7 +132,7 @@ set_target_properties(fzn PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
OUTPUT_NAME fzn-${PROJECT_NAME}
OUTPUT_NAME fzn-cp-sat-lp
)
target_compile_features(fzn PUBLIC cxx_std_17)
target_compile_definitions(fzn PUBLIC ${FLATZINC_COMPILE_DEFINITIONS})
Expand Down Expand Up @@ -168,7 +168,7 @@ set_target_properties(fzn-parser_test PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
OUTPUT_NAME fzn-parser-${PROJECT_NAME}
OUTPUT_NAME fzn-parser-cp-sat-lp
)
target_compile_features(fzn-parser_test PUBLIC cxx_std_17)
target_compile_definitions(fzn-parser_test PUBLIC ${FLATZINC_COMPILE_DEFINITIONS})
Expand All @@ -182,10 +182,10 @@ add_executable(${PROJECT_NAME}::fzn-parser_test ALIAS fzn-parser_test)
# MiniZinc solver configuration
file(RELATIVE_PATH FZ_REL_INSTALL_BINARY
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/minizinc/solvers
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/fzn-${PROJECT_NAME})
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/fzn-cp-sat-lp)
configure_file(
ortools/flatzinc/ortools.msc.in
${PROJECT_BINARY_DIR}/ortools.msc
ortools/flatzinc/cpsatlp.msc.in
${PROJECT_BINARY_DIR}/cpsatlp.msc
@ONLY)

# Install rules
Expand All @@ -199,7 +199,7 @@ install(TARGETS flatzinc fzn #fzn-parser_test
)

install(DIRECTORY ortools/flatzinc/mznlib/
DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/ortools
DESTINATION ${DATAROOTDIR}/minizinc/cpsatlp
FILES_MATCHING PATTERN "*.mzn")
install(FILES ${PROJECT_BINARY_DIR}/ortools.msc
DESTINATION ${CMAKE_INSTALL_DATADIR}/minizinc/solvers)
install(FILES ${PROJECT_BINARY_DIR}/cpsatlp.msc
DESTINATION ${DATAROOTDIR}/minizinc/solvers)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "com.google.or-tools",
"name": "OR Tools",
"description": "Google's Operations Research tools FlatZinc interface",
"id": "com.google.ortools.sat",
"name": "OR Tools CP-SAT-LP",
"description": "Google's Operations Research CP-SAT-LP FlatZinc interface",
"version": "@PROJECT_VERSION@",
"mznlib": "../ortools",
"mznlib": "../cpsatlp",
"executable": "@FZ_REL_INSTALL_BINARY@",
"tags": ["ortools", "cp", "lcg", "int"],
"tags": ["cpsatlp", "cp", "lcg", "int"],
"stdFlags": ["-a", "-f", "-p", "-r", "-s", "-v"],
"extraFlags": [
["--params", "Provide parameters interpreted as a text SatParameters proto", "string", ""]
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/minizinc-challenge.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ RUN rm -rf build
RUN cmake -S. -Bbuild -DBUILD_PYTHON=OFF -DBUILD_JAVA=OFF -DBUILD_DOTNET=OFF -DUSE_SCIP=OFF -DUSE_COINOR=OFF -DBUILD_DEPS=ON
RUN cmake --build build --target all -j16

RUN ln -s /root/or-tools/build/bin/fzn-ortools /entry_data/fzn-exec
RUN ln -s /root/or-tools/build/bin/fzn-cp-sat-lp /entry_data/fzn-exec

RUN cp /root/or-tools/ortools/flatzinc/mznlib/*mzn /entry_data/mzn-lib

0 comments on commit 5156459

Please sign in to comment.