set(CXXFLAGS "${CXXFLAGS} -DNUNLOCKED")
endif()
+ if("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles")
+ # use $(MAKE) instead of "make" to allow for parallel builds
+ set(make_cmd "$(MAKE)")
+ else()
+ # $(MAKE) does not work with ninja
+ set(make_cmd "make")
+ endif()
+
ExternalProject_Add(
CaDiCaL-EP
${COMMON_EP_CONFIG}
sed -i.orig -e "s,@CXX@,${CMAKE_CXX_COMPILER}," -e
"s,@CXXFLAGS@,${CXXFLAGS}," -e "s,@MAKEFLAGS@,,"
<SOURCE_DIR>/build/makefile
- # use $(MAKE) instead of "make" to allow for parallel builds
- BUILD_COMMAND $(MAKE) -C <SOURCE_DIR>/build libcadical.a
+ BUILD_COMMAND ${make_cmd} -C <SOURCE_DIR>/build libcadical.a
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/build/libcadical.a
<INSTALL_DIR>/lib/libcadical.a
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/src/cadical.hpp
<INSTALL_DIR>/include/cadical.hpp
+ BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libcadical.a
)
set(CaDiCaL_INCLUDE_DIR "${DEPS_BASE}/include/")
<INSTALL_DIR>/lib/libkissat.a
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/src/kissat.h
<INSTALL_DIR>/include/kissat/kissat.h
+ BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkissat.a
)
set(Kissat_INCLUDE_DIR "${DEPS_BASE}/include/")