Commit 10761aa2 authored by David Bommes's avatar David Bommes

added Mosek support

parent 0693e027
Pipeline #6010 passed with stages
in 4 minutes and 28 seconds
......@@ -293,6 +293,18 @@ else ()
set (COMISO_GUROBI_CONFIG_FILE_SETTINGS "#define COMISO_GUROBI_AVAILABLE 0" )
endif ()
find_package (MOSEK)
if (MOSEK_FOUND )
set (COMISO_MOSEK_CONFIG_FILE_SETTINGS "#define COMISO_MOSEK_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${MOSEK_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${MOSEK_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${MOSEK_LIBRARIES} )
else ()
message (STATUS "MOSEK not found!")
set (COMISO_MOSEK_CONFIG_FILE_SETTINGS "#define COMISO_MOSEK_AVAILABLE 0" )
endif ()
find_package (ARPACK)
if (ARPACK_FOUND )
set (COMISO_ARPACK_CONFIG_FILE_SETTINGS "#define COMISO_ARPACK_AVAILABLE 1" )
......@@ -514,6 +526,12 @@ if (COMISO_BUILD_EXAMPLES )
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/finite_element_integrability_problem/CMakeLists.txt" )
add_subdirectory (Examples/finite_element_integrability_problem)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/small_mosek_native/CMakeLists.txt" )
add_subdirectory (Examples/small_mosek_native)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/small_mosek_fusion_sdp/CMakeLists.txt" )
add_subdirectory (Examples/small_mosek_fusion_sdp)
endif()
endif (COMISO_BUILD_EXAMPLES )
......
......@@ -25,3 +25,4 @@
@COMISO_CLP_CONFIG_FILE_SETTINGS@
@COMISO_CGL_CONFIG_FILE_SETTINGS@
@COMISO_COINUTILS_CONFIG_FILE_SETTINGS@
@COMISO_MOSEK_CONFIG_FILE_SETTINGS@
......@@ -123,6 +123,14 @@ if (GUROBI_FOUND )
list( APPEND COMISO_LINK_LIBRARIES ${GUROBI_LIBRARIES} )
endif ()
if (MOSEK_FOUND )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${MOSEK_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${MOSEK_LIBRARIES} )
list( APPEND COMISO_LINK_DIRECTORIES ${MOSEK_LIBRARY_DIR} )
endif ()
#MESSAGE( ${COMISO_LINK_LIBRARIES})
#ToDo:
......
# - Try to find MOSEK
# MOSEK_BASE - base path to the library
# Once done this will define
# MOSEK_FOUND - System has Mosek
# MOSEK_INCLUDE_DIRS - The Mosek include directories
# MOSEK_LIBRARIES - The libraries needed to use Mosek
# MOSEK_LIBRARY_DIR - The Mosek library dicrectory
set (MOSEK_BASE "c:" CACHE PATH "Base path of your gurobi installation")
if (MOSEK_INCLUDE_DIR)
# in cache already
set(MOSEK_FOUND TRUE)
set(MOSEK_INCLUDE_DIRS "${MOSEK_INCLUDE_DIR}" )
set(MOSEK_LIBRARIES "${MOSEK_LIBRARY};${MOSEK_CXX_LIBRARY}" )
else (MOSEK_INCLUDE_DIR)
find_path(MOSEK_INCLUDE_DIR
NAMES mosek.h
PATHS "$ENV{MOSEK_DIR}/tools/platform/osx64x86/h"
"${MOSEK_BASE}/tools/platform/osx64x86/h"
)
find_path(MOSEK_LIBRARY_DIR
NAMES libmosek64.dylib
PATHS "$ENV{MOSEK_DIR}/tools/platform/osx64x86/bin"
"${MOSEK_BASE}/tools/platform/osx64x86/bin"
)
find_library( MOSEK_LIBRARY
NAMES mosek64
PATHS "$ENV{MOSEK_DIR}/tools/platform/osx64x86/bin"
"${MOSEK_BASE}/tools/platform/osx64x86/bin"
)
find_library( MOSEK_CXX_LIBRARY
NAMES fusion64
PATHS "$ENV{MOSEK_DIR}/tools/platform/osx64x86/bin"
"${MOSEK_BASE}/tools/platform/osx64x86/bin"
)
# Binary dir for DLLs
find_path(MOSEK_BIN_DIR
NAMES "mosek.dll"
PATHS "$ENV{MOSEK_DIR}/tools/platform/osx64x86/bin"
"${MOSEK_BASE}/tools/platform/osx64x86/bin"
DOC "Directory containing the MOSEK DLLs"
)
set(MOSEK_INCLUDE_DIRS "${MOSEK_INCLUDE_DIR}" )
set(MOSEK_LIBRARIES "${MOSEK_LIBRARY};${MOSEK_CXX_LIBRARY}" )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(MOSEK DEFAULT_MSG
MOSEK_LIBRARY MOSEK_CXX_LIBRARY MOSEK_INCLUDE_DIR)
mark_as_advanced(MOSEK_INCLUDE_DIR MOSEK_LIBRARY MOSEK_CXX_LIBRARY MOSEK_BIN_DIR MOSEK_LIBRARY_DIR)
endif(MOSEK_INCLUDE_DIR)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment