Commit e300f1f3 authored by David Bommes's avatar David Bommes
Browse files

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) ...@@ -219,15 +219,15 @@ macro (acg_openmp)
if (NOT OPENMP_NOTFOUND) if (NOT OPENMP_NOTFOUND)
# Set off OpenMP on Darwin architectures # Set off OpenMP on Darwin architectures
# since it causes crashes sometimes # since it causes crashes sometimes
if(NOT APPLE) # if(NOT APPLE)
find_package(OpenMP) find_package(OpenMP)
if (OPENMP_FOUND) if (OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
add_definitions(-DUSE_OPENMP) add_definitions(-DUSE_OPENMP)
else () # else ()
set (OPENMP_NOTFOUND 1) # set (OPENMP_NOTFOUND 1)
endif () # endif ()
endif() endif()
endif () endif ()
endmacro () endmacro ()
......
...@@ -50,8 +50,8 @@ include(FindPackageHandleStandardArgs) ...@@ -50,8 +50,8 @@ include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE # handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE # if all listed variables are TRUE
find_package_handle_standard_args(CPLEX DEFAULT_MSG 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) endif(CPLEX_INCLUDE_DIR)
...@@ -5,12 +5,17 @@ ...@@ -5,12 +5,17 @@
# COMISO_INCLUDE_DIR - the COMISO include directory # COMISO_INCLUDE_DIR - the COMISO include directory
# COMISO_LIBRARY_DIR - where the libraries are # COMISO_LIBRARY_DIR - where the libraries are
# COMISO_LIBRARY - Link these to use COMISO # 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) if (COMISO_INCLUDE_DIR)
# Already in cache, be silent # in cache already
SET(COMISO_FIND_QUIETLY TRUE) set(COMISO_FOUND TRUE)
ENDIF (COMISO_INCLUDE_DIR) SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
SET( COMISO_LIBRARY "CoMISo")
else (COMISO_INCLUDE_DIR)
# Find CoMISo config file # Find CoMISo config file
FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/config.hh FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/config.hh
...@@ -37,6 +42,21 @@ if ( COMISO_INCLUDE_DIR ) ...@@ -37,6 +42,21 @@ if ( COMISO_INCLUDE_DIR )
endif() 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} ) STRING(REGEX MATCH "\#define COMISO_SUITESPARSE_AVAILABLE 1" COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE ) if ( COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE )
...@@ -196,12 +216,18 @@ if ( COMISO_INCLUDE_DIR ) ...@@ -196,12 +216,18 @@ if ( COMISO_INCLUDE_DIR )
endif(COMISO_INCLUDE_DIR) endif(COMISO_INCLUDE_DIR)
IF (COMISO_INCLUDE_DIR) IF (COMISO_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
SET(COMISO_FOUND TRUE) SET(COMISO_FOUND TRUE)
SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" ) SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
SET( COMISO_LIBRARY "CoMISo") 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) ELSE (COMISO_INCLUDE_DIR)
SET( COMISO_FOUND FALSE ) SET( COMISO_FOUND FALSE )
SET( COMISO_LIBRARY_DIR ) SET( COMISO_LIBRARY_DIR )
ENDIF (COMISO_INCLUDE_DIR) ENDIF (COMISO_INCLUDE_DIR)
endif (COMISO_INCLUDE_DIR)
...@@ -17,15 +17,16 @@ FIND_PATH(GMM_INCLUDE_DIR NAMES gmm/gmm.h ...@@ -17,15 +17,16 @@ FIND_PATH(GMM_INCLUDE_DIR NAMES gmm/gmm.h
PATHS /usr/include PATHS /usr/include
/usr/include /usr/include
/usr/local/include /usr/local/include
~/sw/gmm-4.1/include
~/sw/gmm-4.2/include ~/sw/gmm-4.2/include
~/sw/gmm-4.1/include
"c:\\libs\\gmm-4.1\\include" "c:\\libs\\gmm-4.1\\include"
"c:\\libs\\gmm-3.0\\include" "c:\\libs\\gmm-3.0\\include"
${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include ${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include
../../External/include ../../External/include
/ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/ /ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/
/ACG/acgdev/gcc-4.3-i686/gmm-3/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. # 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) if (GUROBI_INCLUDE_DIR)
# in cache already # in cache already
set(GUROBI_FOUND TRUE) set(GUROBI_FOUND TRUE)
set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
else (GUROBI_INCLUDE_DIR) else (GUROBI_INCLUDE_DIR)
if (WIN32) find_path(GUROBI_INCLUDE_DIR
find_path(GUROBI_INCLUDE_DIR NAMES SRC/gurobi_c++.h NAMES gurobi_c++.h
PATHS PATHS "$ENV{GUROBI_HOME}/include"
"C:\\libs\\gurobi45" "/Library/gurobi502/mac64/include"
${GUROBI_INCLUDE_PATH} "C:\\libs\\gurobi502\\include"
) )
find_library( GUROBI_LIBRARY_RELEASE find_library( GUROBI_LIBRARY
SuperLU NAMES gurobi
PATHS "C:\\libs\\gurobi45\\lib" ) gurobi45
find_library( GUROBI_LIBRARY_DEBUG gurobi46
SuperLUd gurobi50
PATHS "C:\\libs\\gurobi45\\lib" ) PATHS "$ENV{GUROBI_HOME}/lib"
"/Library/gurobi502/mac64/lib"
"C:\\libs\\gurobi502\\lib"
set ( GUROBI_LIBRARY "optimized;${GUROBI_LIBRARY_RELEASE};debug;${GUROBI_LIBRARY_DEBUG}" CACHE STRING "GUROBI Libraries" ) )
ELSEIF(APPLE) find_library( GUROBI_CXX_LIBRARY
NAMES gurobi_c++
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h PATHS "$ENV{GUROBI_HOME}/lib"
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40" "/Library/gurobi502/mac64/lib"
${GUROBI_INCLUDE_PATH} "C:\\libs\\gurobi502\\lib"
"${GUROBI_HOME}/include" )
)
set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
find_library( GUROBI_LIBRARY set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
gurobi
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40" # use c++ headers as default
"${GUROBI_HOME}/lib") # set(GUROBI_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Gurobi Compiler Flags")
ELSE( WIN32 ) include(FindPackageHandleStandardArgs)
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h # handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
PATHS "$ENV{GUROBI_HOME}/include" # if all listed variables are TRUE
${GUROBI_INCLUDE_PATH} find_package_handle_standard_args(GUROBI DEFAULT_MSG
) GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_INCLUDE_DIR)
# MESSAGE(STATUS "$ENV{GUROBI_HOME}/include") mark_as_advanced(GUROBI_INCLUDE_DIR GUROBI_LIBRARY GUROBI_CXX_LIBRARY)
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()
endif(GUROBI_INCLUDE_DIR) 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 @@ ...@@ -6,7 +6,6 @@
# PHYSIM_LIBRARY_DIR - where the libraries are # PHYSIM_LIBRARY_DIR - where the libraries are
# PHYSIM_LIBRARY - Link these to use PHYSIM # PHYSIM_LIBRARY - Link these to use PHYSIM
# #
IF (PHYSIM_INCLUDE_DIRS) IF (PHYSIM_INCLUDE_DIRS)
# Already in cache, be silent # Already in cache, be silent
SET(PHYSIM_FIND_QUIETLY TRUE) SET(PHYSIM_FIND_QUIETLY TRUE)
......
...@@ -14,7 +14,8 @@ ENDIF (SVM_INCLUDE_DIRS) ...@@ -14,7 +14,8 @@ ENDIF (SVM_INCLUDE_DIRS)
FIND_PATH( SVM_INCLUDE_DIR libsvm/svm.h FIND_PATH( SVM_INCLUDE_DIR libsvm/svm.h
PATHS /usr/include/libsvm-2.0 PATHS /usr/include/libsvm-2.0
/usr/include/libsvm-3.0 /usr/include/libsvm-3.0
/usr/include ) /usr/include
/opt/local/include )
FIND_LIBRARY( SVM_LIBRARY 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