Skip to content

Commit

Permalink
Merge pull request bright-dev#12 from scopatz/x
Browse files Browse the repository at this point in the history
Updates Build System
  • Loading branch information
FlanFlanagan committed Feb 19, 2015
2 parents 9f09fd8 + cbb0c0d commit 8fbb7c0
Show file tree
Hide file tree
Showing 15 changed files with 811 additions and 810 deletions.
2 changes: 1 addition & 1 deletion cmake/CTestCustom.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## uncomment this section when the following issue has been fixed by CMake
## http://permalink.gmane.org/gmane.comp.programming.tools.cmake.devel/5990
# SET(CTEST_CUSTOM_POST_TEST "python ${CMAKE_CURRENT_LIST_DIR}/print_regs.py")
# SET(CTEST_CUSTOM_POST_TEST "python ${CMAKE_CURRENT_LIST_DIR}/print_regs.py")
154 changes: 77 additions & 77 deletions cmake/FindCOIN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Last updated: 12/17/12

# This cmake file is designed to locate coin-related
# dependencies on a filesystem.
# dependencies on a filesystem.
#
# If the coin dependencies were installed in a non-standard
# directory, e.g. installed from source perhaps, then
Expand Down Expand Up @@ -33,63 +33,63 @@ MESSAGE(STATUS "COIN_ROOT_DIR hint is : ${COIN_ROOT_DIR}")
#
MESSAGE(STATUS "Coin multiple library dependency status:")
FIND_PATH(COIN_INCLUDE_DIR coin/CbcModel.hpp
HINTS "${COIN_INCLUDE_DIR}"
HINTS "${COIN_ROOT_DIR}/include"
HINTS /usr/
HINTS /usr/include/
HINTS /usr/local/
HINTS /usr/local/include/
HINTS /usr/coin/
HINTS /usr/coin-Cbc/
HINTS /usr/local/coin/
HINTS /usr/local/coin-Cbc/
)
HINTS "${COIN_INCLUDE_DIR}"
HINTS "${COIN_ROOT_DIR}/include"
HINTS /usr/
HINTS /usr/include/
HINTS /usr/local/
HINTS /usr/local/include/
HINTS /usr/coin/
HINTS /usr/coin-Cbc/
HINTS /usr/local/coin/
HINTS /usr/local/coin-Cbc/
)
set(COIN_INCLUDE_DIR ${COIN_INCLUDE_DIR}/coin)
MESSAGE("\tCOIN Include Dir: ${COIN_INCLUDE_DIR}")

#
# Find all coin library dependencies
#
FIND_LIBRARY(COIN_CBC_LIBRARY
NAMES Cbc libCbc #libCbc.so.0
HINTS "${COIN_INCLUDE_DIR}/../../lib/"
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES Cbc libCbc #libCbc.so.0
HINTS "${COIN_INCLUDE_DIR}/../../lib/"
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN CBC: ${COIN_CBC_LIBRARY}")

FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
NAMES CbcSolver libCbcSolver libCbcSolver.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES CbcSolver libCbcSolver libCbcSolver.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN CBC solver: ${COIN_CBC_SOLVER_LIBRARY}")

FIND_LIBRARY(COIN_CGL_LIBRARY
NAMES Cgl libCgl libCgl.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES Cgl libCgl libCgl.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN CGL: ${COIN_CGL_LIBRARY}")

FIND_LIBRARY(COIN_CLP_LIBRARY
NAMES Clp libClp libClp.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES Clp libClp libClp.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN CLP: ${COIN_CLP_LIBRARY}")

FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
NAMES CoinUtils libCoinUtils libCoinUtils.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES CoinUtils libCoinUtils libCoinUtils.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN UTILS: ${COIN_COIN_UTILS_LIBRARY}")

FIND_LIBRARY(COIN_OSI_LIBRARY
NAMES Osi libOsi libOsi.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES Osi libOsi libOsi.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN OSI: ${COIN_OSI_LIBRARY}")

# FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
Expand All @@ -100,66 +100,66 @@ MESSAGE("\tCOIN OSI: ${COIN_OSI_LIBRARY}")
# MESSAGE("\tCOIN OSI CBC: ${COIN_OSI_CBC_LIBRARY}")

FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
NAMES OsiClp libOsiClp libOsiClp.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES OsiClp libOsiClp libOsiClp.so.0
HINTS ${COIN_INCLUDE_DIR}/../../lib/
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN OSI CLP: ${COIN_OSI_CLP_LIBRARY}")

FIND_LIBRARY(COIN_ZLIB_LIBRARY
NAMES z libz libz.so.1
HINTS ${COIN_ROOT_DIR}/lib
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES z libz libz.so.1
HINTS ${COIN_ROOT_DIR}/lib
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN ZLIB: ${COIN_ZLIB_LIBRARY}")

FIND_LIBRARY(COIN_BZ2_LIBRARY
NAMES bz2 libz2 libz2.so.1
HINTS ${COIN_ROOT_DIR}/lib
HINTS "${COIN_ROOT_DIR}/lib"
)
NAMES bz2 libz2 libz2.so.1
HINTS ${COIN_ROOT_DIR}/lib
HINTS "${COIN_ROOT_DIR}/lib"
)
MESSAGE("\tCOIN BZ2: ${COIN_BZ2_LIBRARY}")

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
COIN_INCLUDE_DIR
COIN_CBC_LIBRARY
COIN_CBC_SOLVER_LIBRARY
COIN_CGL_LIBRARY
COIN_CLP_LIBRARY
COIN_COIN_UTILS_LIBRARY
COIN_OSI_LIBRARY
# Not required by cbc v2.5, but required by later versions
# COIN_OSI_CBC_LIBRARY
COIN_OSI_CLP_LIBRARY
COIN_ZLIB_LIBRARY
COIN_BZ2_LIBRARY
)
COIN_INCLUDE_DIR
COIN_CBC_LIBRARY
COIN_CBC_SOLVER_LIBRARY
COIN_CGL_LIBRARY
COIN_CLP_LIBRARY
COIN_COIN_UTILS_LIBRARY
COIN_OSI_LIBRARY
# Not required by cbc v2.5, but required by later versions
# COIN_OSI_CBC_LIBRARY
COIN_OSI_CLP_LIBRARY
COIN_ZLIB_LIBRARY
COIN_BZ2_LIBRARY
)

#
# Set all required cmake variables based on our findings
#
IF(COIN_FOUND)
SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY}")
IF(COIN_ZLIB_LIBRARY)
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
ENDIF(COIN_ZLIB_LIBRARY)
IF(COIN_BZ2_LIBRARY)
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
ENDIF(COIN_BZ2_LIBRARY)
# Not required by cbc v2.5, but required by later versions in which case,
# the lower line should be commented out and this line used
#SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY}")
IF(COIN_ZLIB_LIBRARY)
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
ENDIF(COIN_ZLIB_LIBRARY)
IF(COIN_BZ2_LIBRARY)
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
ENDIF(COIN_BZ2_LIBRARY)
# Not required by cbc v2.5, but required by later versions in which case,
# the lower line should be commented out and this line used
#SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
ENDIF(COIN_FOUND)

#
# Report a synopsis of our findings
#
IF(COIN_INCLUDE_DIRS)
MESSAGE(STATUS "Found COIN Include Dirs: ${COIN_INCLUDE_DIRS}")
MESSAGE(STATUS "Found COIN Include Dirs: ${COIN_INCLUDE_DIRS}")
ELSE(COIN_INCLUDE_DIRS)
MESSAGE(STATUS "COIN Include Dirs NOT FOUND")
MESSAGE(STATUS "COIN Include Dirs NOT FOUND")
ENDIF(COIN_INCLUDE_DIRS)
Loading

0 comments on commit 8fbb7c0

Please sign in to comment.