Skip to content

Commit

Permalink
cmake: set COPY_CADICAL when building cadical to determine whether to…
Browse files Browse the repository at this point in the history
… copy it

closes: #5603
  • Loading branch information
juhp committed Nov 3, 2024
1 parent cd24e9d commit bc643f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
INSTALL_COMMAND "")
set(CADICAL ${CMAKE_BINARY_DIR}/cadical/cadical${CMAKE_EXECUTABLE_SUFFIX} CACHE FILEPATH "path to cadical binary" FORCE)
set(EXTRA_DEPENDS "cadical")
set(COPY_CADICAL ON)
endif()
list(APPEND CL_ARGS -DCADICAL=${CADICAL})
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ else()
OUTPUT_NAME leancpp)
endif()

if((${STAGE} GREATER 0) AND CADICAL)
if((${STAGE} GREATER 0) AND COPY_CADICAL)
add_custom_target(copy-cadical
COMMAND cmake -E copy_if_different "${CADICAL}" "${CMAKE_BINARY_DIR}/bin/cadical${CMAKE_EXECUTABLE_SUFFIX}")
add_dependencies(leancpp copy-cadical)
Expand Down Expand Up @@ -736,7 +736,7 @@ file(COPY ${LEAN_SOURCE_DIR}/bin/leanmake DESTINATION ${CMAKE_BINARY_DIR}/bin)

install(DIRECTORY "${CMAKE_BINARY_DIR}/bin/" USE_SOURCE_PERMISSIONS DESTINATION bin)

if (${STAGE} GREATER 0 AND CADICAL)
if (${STAGE} GREATER 0 AND COPY_CADICAL)
install(PROGRAMS "${CADICAL}" DESTINATION bin)
endif()

Expand Down

0 comments on commit bc643f6

Please sign in to comment.