Commit ba7dfb75 authored by Jan Möbius's avatar Jan Möbius

Updated ipopt finder

Added build time config variable if hsl was available

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@103 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent f38304a1
......@@ -118,9 +118,15 @@ if (IPOPT_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${IPOPT_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${IPOPT_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${IPOPT_LIBRARY} )
if ( IPOPT_LIBRARY_DIR )
set (COMISO_HSL_CONFIG_FILE_SETTINGS "#define COMISO_HSL_AVAILABLE 1" )
else ()
set (COMISO_HSL_CONFIG_FILE_SETTINGS "#define COMISO_HSL_AVAILABLE 0" )
endif()
else ()
message (STATUS "IPOPT or dependency not found!")
set (COMISO_IPOPT_CONFIG_FILE_SETTINGS "#define COMISO_IPOPT_AVAILABLE 0" )
set (COMISO_HSL_CONFIG_FILE_SETTINGS "#define COMISO_HSL_AVAILABLE 0" )
endif ()
find_package (Eigen3)
......
......@@ -4,6 +4,7 @@
@COMISO_GMM_CONFIG_FILE_SETTINGS@
@COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS@
@COMISO_MPI_CONFIG_FILE_SETTINGS@
@COMISO_HSL_CONFIG_FILE_SETTINGS@
@COMISO_PETSC_CONFIG_FILE_SETTINGS@
@COMISO_TAO_CONFIG_FILE_SETTINGS@
@COMISO_IPOPT_CONFIG_FILE_SETTINGS@
......
......@@ -4,23 +4,31 @@ if (IPOPT_INCLUDE_DIR)
endif (IPOPT_INCLUDE_DIR)
if (WIN32)
find_path(IPOPT_INCLUDE_DIR NAMES tao.h
PREFIXES SRC
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
PATHS
"C:\\libs\\gurobi45"
"C:\\libs\\Ipopt-3.8.2\\include\\coin"
${IPOPT_DIR}/include
)
find_library( IPOPT_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
Ipopt
PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\release" )
find_library( IPOPT_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
Ipopt
PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\debug" )
set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" )
IF(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND TRUE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
# Todo, set right version depending on build type (debug/release)
#GET_FILENAME_COMPONENT( IPOPT_LIBRARY_DIR ${GLEW_LIBRARY} PATH )
ELSE(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND FALSE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
ENDIF(IPOPT_INCLUDE_DIR)
ELSEIF(APPLE)
find_path(IPOPT_INCLUDE_DIR NAMES gurobi_c++.h
......
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