Commit e300f1f3 authored by David Bommes's avatar David Bommes

fixed some cmake issues

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15990 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2ba2e7f1
......@@ -219,15 +219,15 @@ macro (acg_openmp)
if (NOT OPENMP_NOTFOUND)
# Set off OpenMP on Darwin architectures
# since it causes crashes sometimes
if(NOT APPLE)
# if(NOT APPLE)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
add_definitions(-DUSE_OPENMP)
else ()
set (OPENMP_NOTFOUND 1)
endif ()
# else ()
# set (OPENMP_NOTFOUND 1)
# endif ()
endif()
endif ()
endmacro ()
......
......@@ -50,8 +50,8 @@ 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(CPLEX DEFAULT_MSG
CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_CONCERT_INCLUDE_DIR CPLEX_ILO_LIBRARY CPLEX_CONCERT_LIBRARY)
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY )
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_ILO_LIBRARY CPLEX_CONCERT_LIBRARY)
endif(CPLEX_INCLUDE_DIR)
......@@ -5,12 +5,17 @@
# COMISO_INCLUDE_DIR - the COMISO include directory
# COMISO_LIBRARY_DIR - where the libraries are
# COMISO_LIBRARY - Link these to use COMISO
# COMISO_DEPS - List of COMISO dependencies
# COMISO_OPT_DEPS - List of optional COMISO dependencies
#
IF (COMISO_INCLUDE_DIR)
# Already in cache, be silent
SET(COMISO_FIND_QUIETLY TRUE)
ENDIF (COMISO_INCLUDE_DIR)
if (COMISO_INCLUDE_DIR)
# in cache already
set(COMISO_FOUND TRUE)
SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
SET( COMISO_LIBRARY "CoMISo")
else (COMISO_INCLUDE_DIR)
# Find CoMISo config file
FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/config.hh
......@@ -37,6 +42,21 @@ if ( COMISO_INCLUDE_DIR )
endif()
STRING(REGEX MATCH "\#define COMISO_BOOST_AVAILABLE 1" COMISO_BOOST_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_BOOST_BUILD_TIME_AVAILABLE )
find_package( Boost 1.42.0 COMPONENTS system filesystem regex )
if ( NOT Boost_FOUND )
message(ERROR "COMISO configured with Boost but Boost not available")
endif()
list (APPEND COMISO_OPT_DEPS "Boost")
endif()
STRING(REGEX MATCH "\#define COMISO_SUITESPARSE_AVAILABLE 1" COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE )
......@@ -196,12 +216,18 @@ if ( COMISO_INCLUDE_DIR )
endif(COMISO_INCLUDE_DIR)
IF (COMISO_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
SET(COMISO_FOUND TRUE)
SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
SET( COMISO_LIBRARY "CoMISo")
SET( COMISO_DEPS "GMM;BLAS;SUITESPARSE" )
# SET( COMISO_DEPS "GMM;BLAS;SUITESPARSE" )
SET( COMISO_DEPS "GMM" CACHE STRING "Comiso dependecies")
SET( COMISO_OPT_DEPS ${COMISO_OPT_DEPS} CACHE STRING "Comiso optional dependecies")
mark_as_advanced(COMISO_DEPS COMISO_OPT_DEPS)
ELSE (COMISO_INCLUDE_DIR)
SET( COMISO_FOUND FALSE )
SET( COMISO_LIBRARY_DIR )
ENDIF (COMISO_INCLUDE_DIR)
endif (COMISO_INCLUDE_DIR)
......@@ -17,15 +17,16 @@ FIND_PATH(GMM_INCLUDE_DIR NAMES gmm/gmm.h
PATHS /usr/include
/usr/include
/usr/local/include
~/sw/gmm-4.1/include
~/sw/gmm-4.2/include
~/sw/gmm-4.1/include
"c:\\libs\\gmm-4.1\\include"
"c:\\libs\\gmm-3.0\\include"
${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include
../../External/include
/ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/
/ACG/acgdev/gcc-4.3-i686/gmm-3/include/
${module_file_path}/../../../External/include)
${module_file_path}/../../../External/include
$ENV{HOME}/opt/gmm/gmm-4.2/include)
# Copy the results to the output variables.
......
# - Try to find GUROBI
# Once done this will define
# GUROBI_FOUND - System has Gurobi
# GUROBI_INCLUDE_DIRS - The Gurobi include directories
# GUROBI_LIBRARIES - The libraries needed to use Gurobi
if (GUROBI_INCLUDE_DIR)
# in cache already
set(GUROBI_FOUND TRUE)
set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
else (GUROBI_INCLUDE_DIR)
if (WIN32)
find_path(GUROBI_INCLUDE_DIR NAMES SRC/gurobi_c++.h
PATHS
"C:\\libs\\gurobi45"
${GUROBI_INCLUDE_PATH}
)
find_library( GUROBI_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
find_library( GUROBI_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
set ( GUROBI_LIBRARY "optimized;${GUROBI_LIBRARY_RELEASE};debug;${GUROBI_LIBRARY_DEBUG}" CACHE STRING "GUROBI Libraries" )
ELSEIF(APPLE)
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
${GUROBI_INCLUDE_PATH}
"${GUROBI_HOME}/include"
)
find_library( GUROBI_LIBRARY
gurobi
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
"${GUROBI_HOME}/lib")
ELSE( WIN32 )
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "$ENV{GUROBI_HOME}/include"
${GUROBI_INCLUDE_PATH}
)
# MESSAGE(STATUS "$ENV{GUROBI_HOME}/include")
IF(GUROBI_INCLUDE_DIR)
SET(GUROBI_FOUND TRUE)
SET(GUROBI_INCLUDE_DIR ${GUROBI_INCLUDE_DIR})
ELSE(GUROBI_INCLUDE_DIR)
SET(GUROBI_FOUND FALSE)
SET(GUROBI_INCLUDE_DIR ${GUROBI_INCLUDE_DIR})
ENDIF(GUROBI_INCLUDE_DIR)
#find_library( GUROBI_LIBRARY
# gurobi
# PATHS "${GUROBI_HOME}/lib" )
ENDIF()
find_path(GUROBI_INCLUDE_DIR
NAMES gurobi_c++.h
PATHS "$ENV{GUROBI_HOME}/include"
"/Library/gurobi502/mac64/include"
"C:\\libs\\gurobi502\\include"
)
find_library( GUROBI_LIBRARY
NAMES gurobi
gurobi45
gurobi46
gurobi50
PATHS "$ENV{GUROBI_HOME}/lib"
"/Library/gurobi502/mac64/lib"
"C:\\libs\\gurobi502\\lib"
)
find_library( GUROBI_CXX_LIBRARY
NAMES gurobi_c++
PATHS "$ENV{GUROBI_HOME}/lib"
"/Library/gurobi502/mac64/lib"
"C:\\libs\\gurobi502\\lib"
)
set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
# use c++ headers as default
# set(GUROBI_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Gurobi Compiler Flags")
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(GUROBI DEFAULT_MSG
GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_INCLUDE_DIR)
mark_as_advanced(GUROBI_INCLUDE_DIR GUROBI_LIBRARY GUROBI_CXX_LIBRARY)
endif(GUROBI_INCLUDE_DIR)
IF(UNIX)
IF(GUROBI_INCLUDE_DIR AND NOT GUROBI_LIBRARY)
IF (NOT DEFINED ENV{GUROBI_HOME})
message(FATAL_ERROR "Environment variable GUROBI_HOME not set. Set it so I can find the gurobi libs in \${GUROBI_HOME}/lib/.")
ENDIF()
SET(GUROBI_LIBRARY_DIR "$ENV{GUROBI_HOME}/lib/" CACHE PATH "Path to GUROBI Library")
IF (EXISTS "${GUROBI_LIBRARY_DIR}/libgurobi45.so")
SET(GUROBI_LIBRARY "gurobi45;gurobi_c++;pthread" CACHE STRING "GUROBI Libraries")
ELSEIF(EXISTS "${GUROBI_LIBRARY_DIR}/libgurobi46.so")
SET(GUROBI_LIBRARY "gurobi46;gurobi_c++;pthread" CACHE STRING "GUROBI Libraries")
ELSEIF(EXISTS "${GUROBI_LIBRARY_DIR}/libgurobi50.so")
SET(GUROBI_LIBRARY "gurobi50;gurobi_c++;pthread" CACHE STRING "GUROBI Libraries")
ELSEIF(EXISTS "${GUROBI_LIBRARY_DIR}/libgurobi50.dylib")
SET(GUROBI_LIBRARY "gurobi50;gurobi_c++;pthread" CACHE STRING "GUROBI Libraries")
ELSE()
message(FATAL_ERROR "Couldn't find a gurobi lib in ${GUROBI_LIBRARY_DIR}. Maybe it's a version I don't know about, yet.")
ENDIF()
ENDIF()
ENDIF(UNIX)
......@@ -6,7 +6,6 @@
# PHYSIM_LIBRARY_DIR - where the libraries are
# PHYSIM_LIBRARY - Link these to use PHYSIM
#
IF (PHYSIM_INCLUDE_DIRS)
# Already in cache, be silent
SET(PHYSIM_FIND_QUIETLY TRUE)
......
......@@ -14,7 +14,8 @@ ENDIF (SVM_INCLUDE_DIRS)
FIND_PATH( SVM_INCLUDE_DIR libsvm/svm.h
PATHS /usr/include/libsvm-2.0
/usr/include/libsvm-3.0
/usr/include )
/usr/include
/opt/local/include )
FIND_LIBRARY( SVM_LIBRARY
......
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