Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
df3a606f
Commit
df3a606f
authored
Nov 13, 2020
by
Martin Heistermann
Browse files
CMake: Improve FindMOSEK.
parent
2c7fde01
Pipeline
#15749
failed with stages
in 6 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cmake/FindMOSEK.cmake
View file @
df3a606f
...
...
@@ -8,7 +8,10 @@
# 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"
)
# TODO: add fusion_cxx target to compile with the current compiler(!), safer than a globally built fusion_cxx
set
(
MOSEK_BASE
"c:"
CACHE PATH
"Base path of your MOSEK installation"
)
if
(
MOSEK_INCLUDE_DIR
)
# in cache already
...
...
@@ -17,39 +20,54 @@ if (MOSEK_INCLUDE_DIR)
set
(
MOSEK_LIBRARIES
"
${
MOSEK_LIBRARY
}
;
${
MOSEK_CXX_LIBRARY
}
"
)
else
(
MOSEK_INCLUDE_DIR
)
if
(
${
CMAKE_HOST_SYSTEM_NAME
}
MATCHES
"Windows"
)
set
(
DEFAULT_MOSEK_PLATFORM
"win64x86"
)
elseif
(
${
CMAKE_HOST_SYSTEM_NAME
}
MATCHES
"Darwin"
)
set
(
DEFAULT_MOSEK_PLATFORM
"osx64x86"
)
elseif
(
${
CMAKE_HOST_SYSTEM_NAME
}
MATCHES
"Linux"
)
set
(
DEFAULT_MOSEK_PLATFORM
"linux64x86"
)
else
()
set
(
DEFAULT_MOSEK_PLATFORM
"unknown"
)
endif
()
set
(
MOSEK_PLATFORM
"
${
DEFAULT_MOSEK_PLATFORM
}
"
CACHE STRING
"mosek platform, e.g. linux64x86 or osx64x86"
)
mark_as_advanced
(
MOSEK_PLATFORM
)
find_path
(
MOSEK_INCLUDE_DIR
NAMES mosek.h
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
osx64x86
/h"
"
${
MOSEK_BASE
}
/tools/platform/
osx64x86
/h"
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
${
MOSEK_PLATFORM
}
/h"
"
${
MOSEK_BASE
}
/tools/platform/
${
MOSEK_PLATFORM
}
/h"
)
find_path
(
MOSEK_LIBRARY_DIR
NAMES libmosek64.dylib
PATHS
"$ENV{MOSEK_DIR}/tools/platform/osx64x86/bin"
"
${
MOSEK_BASE
}
/tools/platform/osx64x86/bin"
libmosek64.so
mosek64_9_2.dll
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
)
find_library
(
MOSEK_LIBRARY
NAMES mosek64
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
osx64x86
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
osx64x86
/bin"
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
)
find_library
(
MOSEK_CXX_LIBRARY
NAMES fusion64
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
osx64x86
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
osx64x86
/bin"
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
${
MOSEK_PLATFORM
}
/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"
"mosekcli"
PATHS
"$ENV{MOSEK_DIR}/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
"
${
MOSEK_BASE
}
/tools/platform/
${
MOSEK_PLATFORM
}
/bin"
DOC
"Directory containing the MOSEK DLLs"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment