Skip to content

Commit 64ae346

Browse files
DominikKampdiscopt
authored andcommitted
Fix cmake needed
1 parent da448e1 commit 64ae346

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
@@ -22,6 +22,8 @@ Build system
2222

2323
### Cmake
2424

25+
- define SOPLEX_NEEDED and ZIMPL_NEEDED to avoid syntax error in configuration file
26+
2527
### Makefile
2628

2729
Miscellaneous

src/CMakeLists.txt

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

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

0 commit comments

Comments
 (0)