Skip to content

Commit 06d95de

Browse files
committed
Merge branch 'fix-cmake-needed' into 'v92-bugfix'
Fix cmake needed See merge request integer/scip!3886
2 parents 3899f3b + 64ae346 commit 06d95de

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Build system
2626

2727
- disable setting the boolean variable MACOSX_RPATH to a string value to actually enable @rpath usage
2828

29+
- define SOPLEX_NEEDED and ZIMPL_NEEDED to avoid syntax error in configuration file
30+
2931
### Makefile
3032

3133
Miscellaneous

src/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,14 +1062,18 @@ target_link_libraries(libscip
10621062
${LAPACK_LIBRARIES}
10631063
${PAPILO_IMPORTED_TARGETS})
10641064

1065+
set(SOPLEX_NEEDED 0)
1066+
set(ZIMPL_NEEDED 0)
10651067
if(SHARED)
1066-
set(SOPLEX_NEEDED 0)
1067-
set(ZIMPL_NEEDED 0)
10681068
target_link_libraries(libscip PRIVATE ${ZIMPL_PIC_LIBRARIES} ${LPS_PIC_LIBRARIES} ${SYM_PIC_LIBRARIES})
10691069
add_executable(scip main.c ${scipsources} ${objscipsources} ${lpisources} ${tpisources} ${symsources})
10701070
else()
1071-
set(SOPLEX_NEEDED ${SOPLEX_FOUND})
1072-
set(ZIMPL_NEEDED ${ZIMPL_FOUND})
1071+
if(SOPLEX_FOUND)
1072+
set(SOPLEX_NEEDED 1)
1073+
endif()
1074+
if(ZIMPL_FOUND)
1075+
set(ZIMPL_NEEDED 1)
1076+
endif()
10731077
target_link_libraries(libscip PRIVATE ${ZIMPL_LIBRARIES} ${LPS_LIBRARIES} ${SYM_LIBRARIES})
10741078
add_executable(scip main.c)
10751079
target_link_libraries(scip PUBLIC libscip)

0 commit comments

Comments
 (0)