Skip to content

cmake(MSVC): building ortools_full.lib is not working in Debug #3822

@Mizux

Description

@Mizux

As spotted by user the cmake/bundle-install.cmake.in is not working in config Debug since we don't take into account the variable CMAKE_DEBUG_POSTFIX.

here we should add few wildcard (or better use ${CMAKE_DEBUG_POSTFIX}) to find the correct static lib dependencies

set(DEPS absl_*.lib zlib.lib re2.lib *protobuf.lib)
if (@BUILD_Cbc@)
set(DEPS ${DEPS} Cbc*.lib)
endif()
if (@BUILD_Cgl@)
set(DEPS ${DEPS} Cgl.lib)
endif()
if (@BUILD_Clp@)
set(DEPS ${DEPS} Clp*.lib)
endif()
if (@BUILD_Osi@)
set(DEPS ${DEPS} Osi*.lib)
endif()
if (@BUILD_CoinUtils@)
set(DEPS ${DEPS} CoinUtils.lib)
endif()
if (@BUILD_SCIP@)
set(DEPS ${DEPS} libscip.lib)
endif()
if (@BUILD_GLPK@)
set(DEPS ${DEPS} libglpk.lib)
endif()

Todo:

  • Fix debug postfix managment
  • Add ci job to test it

ref: https://cmake.org/cmake/help/latest/variable/CMAKE_CONFIG_POSTFIX.html#variable:CMAKE_%3CCONFIG%3E_POSTFIX

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions