From 900b45e3dd5a241769db8fb31b00b5eb83de613a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Chr=C3=A9tien?= Date: Thu, 28 May 2015 20:26:29 +0900 Subject: [PATCH] Fix CMakelists.txt for mumps on Ubuntu/Debian. If ipopt were properly compiled on Ubuntu, we would end up with -ldmumps_seq_seq. This solves this issue. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c689ece..83ee5c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,9 @@ ADD_REQUIRED_DEPENDENCY("ipopt") IF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND EXISTS "/etc/debian_version" AND IPOPT_PREFIX MATCHES "/usr") - STRING(REPLACE "-ldmumps" "-ldmumps_seq" IPOPT_LDFLAGS "${IPOPT_LDFLAGS}") + IF(NOT IPOPT_LDFLAGS MATCHES "-ldmumps_seq") + STRING(REPLACE "-ldmumps" "-ldmumps_seq" IPOPT_LDFLAGS "${IPOPT_LDFLAGS}") + ENDIF() ENDIF()