Disable old patch from v2
This commit is contained in:
parent
9c29b3b4f1
commit
9d4235a534
|
@ -1,14 +1,12 @@
|
|||
# $NetBSD: Makefile,v 1.5 2012/11/11 23:33:19 outpaddling Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2012/11/13 23:56:10 outpaddling Exp $
|
||||
|
||||
# DISTNAME= armadillo-2.2.1
|
||||
# PKGREVISION= 1
|
||||
DISTNAME= armadillo-3.4.4
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=arma/}
|
||||
|
||||
MAINTAINER= jwbacon@tds.net
|
||||
HOMEPAGE= http://sourceforge.net/projects/arma/
|
||||
COMMENT= C++ template matrix library
|
||||
COMMENT= C++ linear algebra library
|
||||
LICENSE= gnu-lgpl-v3
|
||||
|
||||
USE_LANGUAGES+= c c++
|
||||
|
@ -16,8 +14,8 @@ USE_CMAKE= yes
|
|||
|
||||
CMAKE_ARGS+= -DINSTALL_LIB_DIR=${PREFIX}/lib
|
||||
|
||||
pre-configure:
|
||||
cp -f ${FILESDIR}/CMakeLists.txt.native-find ${WRKSRC}
|
||||
#pre-configure:
|
||||
#cp -f ${FILESDIR}/CMakeLists.txt.native-find ${WRKSRC}
|
||||
|
||||
.include "../../math/blas/buildlink3.mk"
|
||||
.include "../../math/lapack/buildlink3.mk"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.3 2012/07/02 13:37:54 moubctez Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.4 2012/11/13 23:56:10 outpaddling Exp $
|
||||
|
||||
BUILDLINK_TREE+= armadillo
|
||||
|
||||
.if !defined(ARMADILLO_BUILDLINK3_MK)
|
||||
ARMADILLO_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.armadillo+= armadillo>=2.2.1
|
||||
BUILDLINK_ABI_DEPENDS.armadillo?= armadillo>=2.2.1nb1
|
||||
BUILDLINK_PKGSRCDIR.armadillo?= ../../wip/armadillo
|
||||
BUILDLINK_API_DEPENDS.armadillo+= armadillo>=3.4.4
|
||||
BUILDLINK_ABI_DEPENDS.armadillo?= armadillo>=3.4.4
|
||||
BUILDLINK_PKGSRCDIR.armadillo?= ../../math/armadillo
|
||||
|
||||
.include "../../math/blas/buildlink3.mk"
|
||||
.include "../../math/lapack/buildlink3.mk"
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# - Find a BLAS library (no includes)
|
||||
# This module defines
|
||||
# BLAS_LIBRARIES, the libraries needed to use BLAS.
|
||||
# BLAS_FOUND, If false, do not try to use BLAS.
|
||||
# also defined, but not for general use are
|
||||
# BLAS_LIBRARY, where to find the BLAS library.
|
||||
|
||||
SET(BLAS_NAMES ${BLAS_NAMES} blas)
|
||||
FIND_LIBRARY(BLAS_LIBRARY
|
||||
NAMES ${BLAS_NAMES}
|
||||
PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc-v2/lib
|
||||
)
|
||||
|
||||
IF (BLAS_LIBRARY)
|
||||
SET(BLAS_LIBRARIES ${BLAS_LIBRARY})
|
||||
SET(BLAS_FOUND "YES")
|
||||
ELSE (BLAS_LIBRARY)
|
||||
SET(BLAS_FOUND "NO")
|
||||
ENDIF (BLAS_LIBRARY)
|
||||
|
||||
|
||||
IF (BLAS_FOUND)
|
||||
IF (NOT BLAS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found a BLAS library: ${BLAS_LIBRARIES}")
|
||||
ENDIF (NOT BLAS_FIND_QUIETLY)
|
||||
ELSE (BLAS_FOUND)
|
||||
IF (BLAS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find a BLAS library")
|
||||
ENDIF (BLAS_FIND_REQUIRED)
|
||||
ENDIF (BLAS_FOUND)
|
||||
|
||||
# Deprecated declarations.
|
||||
GET_FILENAME_COMPONENT (NATIVE_BLAS_LIB_PATH ${BLAS_LIBRARY} PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
BLAS_LIBRARY
|
||||
)
|
|
@ -1,44 +0,0 @@
|
|||
# - Find CBLAS (includes and library)
|
||||
# This module defines
|
||||
# CBLAS_INCLUDE_DIR
|
||||
# CBLAS_LIBRARIES
|
||||
# CBLAS_FOUND
|
||||
# also defined, but not for general use are
|
||||
# CBLAS_LIBRARY, where to find the library.
|
||||
|
||||
FIND_PATH(CBLAS_INCLUDE_DIR cblas.h
|
||||
/sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc
|
||||
)
|
||||
|
||||
SET(CBLAS_NAMES ${CBLAS_NAMES} cblas)
|
||||
FIND_LIBRARY(CBLAS_LIBRARY
|
||||
NAMES ${CBLAS_NAMES}
|
||||
PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc
|
||||
)
|
||||
|
||||
IF (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
|
||||
SET(CBLAS_LIBRARIES ${CBLAS_LIBRARY})
|
||||
SET(CBLAS_FOUND "YES")
|
||||
ELSE (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
|
||||
SET(CBLAS_FOUND "NO")
|
||||
ENDIF (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (CBLAS_FOUND)
|
||||
IF (NOT CBLAS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found a CBLAS library: ${CBLAS_LIBRARIES}")
|
||||
ENDIF (NOT CBLAS_FIND_QUIETLY)
|
||||
ELSE (CBLAS_FOUND)
|
||||
IF (CBLAS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find a CBLAS library")
|
||||
ENDIF (CBLAS_FIND_REQUIRED)
|
||||
ENDIF (CBLAS_FOUND)
|
||||
|
||||
# Deprecated declarations.
|
||||
SET (NATIVE_CBLAS_INCLUDE_PATH ${CBLAS_INCLUDE_DIR} )
|
||||
GET_FILENAME_COMPONENT (NATIVE_CBLAS_LIB_PATH ${CBLAS_LIBRARY} PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CBLAS_LIBRARY
|
||||
CBLAS_INCLUDE_DIR
|
||||
)
|
|
@ -1,37 +0,0 @@
|
|||
# - Find a LAPACK library (no includes)
|
||||
# This module defines
|
||||
# LAPACK_LIBRARIES, the libraries needed to use LAPACK.
|
||||
# LAPACK_FOUND, If false, do not try to use LAPACK.
|
||||
# also defined, but not for general use are
|
||||
# LAPACK_LIBRARY, where to find the LAPACK library.
|
||||
|
||||
SET(LAPACK_NAMES ${LAPACK_NAMES} lapack)
|
||||
FIND_LIBRARY(LAPACK_LIBRARY
|
||||
NAMES ${LAPACK_NAMES}
|
||||
PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc-v2/lib
|
||||
)
|
||||
|
||||
IF (LAPACK_LIBRARY)
|
||||
SET(LAPACK_LIBRARIES ${LAPACK_LIBRARY})
|
||||
SET(LAPACK_FOUND "YES")
|
||||
ELSE (LAPACK_LIBRARY)
|
||||
SET(LAPACK_FOUND "NO")
|
||||
ENDIF (LAPACK_LIBRARY)
|
||||
|
||||
|
||||
IF (LAPACK_FOUND)
|
||||
IF (NOT LAPACK_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found a LAPACK library: ${LAPACK_LIBRARIES}")
|
||||
ENDIF (NOT LAPACK_FIND_QUIETLY)
|
||||
ELSE (LAPACK_FOUND)
|
||||
IF (LAPACK_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find a LAPACK library")
|
||||
ENDIF (LAPACK_FIND_REQUIRED)
|
||||
ENDIF (LAPACK_FOUND)
|
||||
|
||||
# Deprecated declarations.
|
||||
GET_FILENAME_COMPONENT (NATIVE_LAPACK_LIB_PATH ${LAPACK_LIBRARY} PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LAPACK_LIBRARY
|
||||
)
|
|
@ -1,376 +0,0 @@
|
|||
# Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
|
||||
# Copyright (C) 2008-2011 Conrad Sanderson
|
||||
# Copyright (C) 2011 Clement Creusot
|
||||
#
|
||||
# This file is part of the Armadillo C++ library.
|
||||
# It is provided without any warranty of fitness
|
||||
# for any purpose. You can redistribute this file
|
||||
# and/or modify it under the terms of the GNU
|
||||
# Lesser General Public License (LGPL) as published
|
||||
# by the Free Software Foundation, either version 3
|
||||
# of the License or (at your option) any later version.
|
||||
# (see http://www.opensource.org/licenses for more info)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
|
||||
set(ARMA_MAJOR 2)
|
||||
set(ARMA_MINOR 2)
|
||||
set(ARMA_PATCH 1)
|
||||
|
||||
message(STATUS "Configuring Armadillo ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH}")
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build_aux/cmake/Modules/")
|
||||
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckLibraryExists)
|
||||
include(FindBoost)
|
||||
include(ARMA_CheckProto)
|
||||
include(ARMA_CheckMathProto)
|
||||
|
||||
project(armadillo C CXX)
|
||||
|
||||
#CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
#CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
#CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
|
||||
set(ARMA_USE_LAPACK false)
|
||||
set(ARMA_USE_BLAS false)
|
||||
set(ARMA_USE_ATLAS false)
|
||||
set(ARMA_USE_BOOST false)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
message(STATUS "")
|
||||
message(STATUS "WARNING:")
|
||||
message(STATUS "Automatic installation is currently not available for this platform.")
|
||||
message(STATUS "Please use the manual installation, as described in the README.txt file.")
|
||||
message(STATUS "You can also use the 'include' folder directly, but you may want to edit")
|
||||
message(STATUS "'include/armadillo_bits/config.hpp' if you have LAPACK installed.")
|
||||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Find LAPACK and BLAS libraries, or their optimised versions
|
||||
#
|
||||
|
||||
if(APPLE)
|
||||
set(ARMA_OS macos)
|
||||
|
||||
set(ARMA_USE_LAPACK true)
|
||||
set(ARMA_USE_BLAS true)
|
||||
|
||||
# Under MacOS, the current version of ARMA_FindCLAPACK can get confused between
|
||||
# two incompatible versions of "clapack.h" (one provided by the system and one
|
||||
# provided by ATLAS). As such, use of ATLAS under MacOS is disabled for now.
|
||||
|
||||
else()
|
||||
set(ARMA_OS unix)
|
||||
|
||||
include(ARMA_FindMKL)
|
||||
include(ARMA_FindACMLMP)
|
||||
include(ARMA_FindACML)
|
||||
|
||||
message(STATUS "MKL_FOUND = ${MKL_FOUND}")
|
||||
message(STATUS "ACMLMP_FOUND = ${ACMLMP_FOUND}")
|
||||
message(STATUS "ACML_FOUND = ${ACML_FOUND}")
|
||||
|
||||
if(MKL_FOUND OR ACMLMP_FOUND OR ACML_FOUND)
|
||||
|
||||
set(ARMA_USE_BLAS true)
|
||||
set(ARMA_USE_LAPACK true)
|
||||
|
||||
message(STATUS "*** If the MKL or ACML libraries are installed in a non-standard location,")
|
||||
message(STATUS "*** make sure the run-time linker can find them.")
|
||||
message(STATUS "*** On Linux systems this can be done by editing /etc/ld.so.conf")
|
||||
message(STATUS "*** or modifying the LD_LIBRARY_PATH environment variable.")
|
||||
message(STATUS "*** On systems with SELinux enabled (e.g. Fedora, RHEL),")
|
||||
message(STATUS "*** you may need to change the SELinux type of all MKL/ACML libraries")
|
||||
message(STATUS "*** to fix permission problems that may occur during run-time.")
|
||||
message(STATUS "*** See README.txt for more information")
|
||||
|
||||
else()
|
||||
|
||||
include(ARMA_FindLAPACK)
|
||||
include(ARMA_FindBLAS)
|
||||
include(ARMA_FindCLAPACK)
|
||||
include(ARMA_FindCBLAS)
|
||||
|
||||
message(STATUS "LAPACK_FOUND = ${LAPACK_FOUND}")
|
||||
message(STATUS "BLAS_FOUND = ${BLAS_FOUND}")
|
||||
message(STATUS "CLAPACK_FOUND = ${CLAPACK_FOUND}")
|
||||
message(STATUS "CBLAS_FOUND = ${CBLAS_FOUND}")
|
||||
|
||||
if(LAPACK_FOUND)
|
||||
set(ARMA_USE_LAPACK true)
|
||||
endif()
|
||||
|
||||
if(BLAS_FOUND)
|
||||
set(ARMA_USE_BLAS true)
|
||||
endif()
|
||||
|
||||
if(CLAPACK_FOUND AND CBLAS_FOUND)
|
||||
message(STATUS "CLAPACK_INCLUDE_DIR = ${CLAPACK_INCLUDE_DIR}")
|
||||
message(STATUS "CBLAS_INCLUDE_DIR = ${CBLAS_INCLUDE_DIR}")
|
||||
if(${CLAPACK_INCLUDE_DIR} STREQUAL ${CBLAS_INCLUDE_DIR})
|
||||
set(ARMA_USE_ATLAS true)
|
||||
set(ARMA_ATLAS_INCLUDE_DIR ${CLAPACK_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
if(MKL_FOUND OR ACMLMP_FOUND OR ACML_FOUND)
|
||||
|
||||
if(MKL_FOUND)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${MKL_LIBRARIES})
|
||||
|
||||
if(ACMLMP_FOUND OR ACML_FOUND)
|
||||
message(STATUS "*** Intel MKL as well as AMD ACML libraries were found.")
|
||||
message(STATUS "*** Using only the MKL library to avoid linking conflicts.")
|
||||
message(STATUS "*** If you wish to use ACML instead, please link manually with")
|
||||
message(STATUS "*** acml or acml_mp instead of the armadillo run-time component.")
|
||||
message(STATUS "*** Alternatively, remove MKL from your system and rerun")
|
||||
message(STATUS "*** Armadillo's configuration using ./configure")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
if(ACMLMP_FOUND)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${ACMLMP_LIBRARIES})
|
||||
|
||||
message(STATUS "*** Both single-core and multi-core ACML libraries were found.")
|
||||
message(STATUS "*** Using only the multi-core library to avoid linking conflicts.")
|
||||
else()
|
||||
if(ACML_FOUND)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${ACML_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
if(ARMA_USE_BLAS STREQUAL true)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${BLAS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ARMA_USE_LAPACK STREQUAL true)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ARMA_USE_ATLAS STREQUAL true)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${CBLAS_LIBRARIES})
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${CLAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate") # or "-framework accelerate" ?
|
||||
message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
|
||||
endif()
|
||||
|
||||
message(STATUS "*** ")
|
||||
message(STATUS "*** The Armadillo run-time library component will be an alias for the following libraries:")
|
||||
message(STATUS "*** ARMA_LIBS = ${ARMA_LIBS}")
|
||||
message(STATUS "*** ")
|
||||
|
||||
find_package(Boost)
|
||||
|
||||
if(Boost_FOUND)
|
||||
|
||||
message(STATUS "Boost_MAJOR_VERSION = ${Boost_MAJOR_VERSION}")
|
||||
message(STATUS "Boost_MINOR_VERSION = ${Boost_MINOR_VERSION}")
|
||||
|
||||
if(Boost_MAJOR_VERSION GREATER 0)
|
||||
if(Boost_MINOR_VERSION GREATER 33)
|
||||
set(ARMA_USE_BOOST true)
|
||||
message(STATUS "Boost_INCLUDE_DIR = ${Boost_INCLUDE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(ARMA_USE_BOOST STREQUAL false)
|
||||
message(STATUS "Boost libraries either not found or their version is too low (version 1.34 or later is good).")
|
||||
message(STATUS "( It's possible that CMake didn't find the particular version of Boost you may have. )")
|
||||
message(STATUS "( If that's the case, please edit include/armadillo_bits/config.hpp manually. )")
|
||||
endif()
|
||||
|
||||
|
||||
# If Boost libraries were found, explicitly check if Boost's date_time library is also present.
|
||||
# This is due to the non-standard packaging of Boost libraries on Debian and Ubuntu systems,
|
||||
# where certain individual Boost libraries are packaged separately.
|
||||
|
||||
if(ARMA_USE_BOOST STREQUAL true)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Boost_INCLUDE_DIR})
|
||||
CHECK_INCLUDE_FILE_CXX("boost/date_time/posix_time/posix_time.hpp" ARMA_USE_BOOST_DATE)
|
||||
endif()
|
||||
|
||||
ARMA_CHECK_MATH_PROTO("isfinite" "std" "cmath" ARMA_HAVE_STD_ISFINITE)
|
||||
ARMA_CHECK_MATH_PROTO("isinf" "std" "cmath" ARMA_HAVE_STD_ISINF)
|
||||
ARMA_CHECK_MATH_PROTO("isnan" "std" "cmath" ARMA_HAVE_STD_ISNAN)
|
||||
ARMA_CHECK_MATH_PROTO("log1p" "" "cmath" ARMA_HAVE_LOG1P)
|
||||
|
||||
ARMA_CHECK_PROTO("snprintf" "std" "cstdio" ARMA_HAVE_STD_SNPRINTF)
|
||||
ARMA_CHECK_PROTO("gettimeofday" "" "sys/time.h" ARMA_HAVE_GETTIMEOFDAY)
|
||||
|
||||
|
||||
message(STATUS "Generating 'include/armadillo_bits/config.hpp'")
|
||||
configure_file(include/armadillo_bits/config.hpp.cmake include/armadillo_bits/config.hpp)
|
||||
|
||||
message(STATUS "Generating 'examples/Makefile'")
|
||||
configure_file(examples/Makefile.cmake examples/Makefile)
|
||||
|
||||
|
||||
if(ARMA_USE_BOOST STREQUAL true)
|
||||
include_directories(include ${Boost_INCLUDE_DIR})
|
||||
else()
|
||||
include_directories(include)
|
||||
endif()
|
||||
|
||||
|
||||
## For any library that is not in a default location,
|
||||
## embed its path into the Armadillo runtime library.
|
||||
## Examples of default locations are "/lib", "/usr/lib",
|
||||
## or as specified in "/etc/ld.so.conf".
|
||||
##
|
||||
## Path embedding is not recommended unless you know
|
||||
## what you're doing. It might be better to add the
|
||||
## path to the "/etc/ld.so.conf" file and then run "ldconfig".
|
||||
##
|
||||
#set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
#set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
|
||||
add_library( armadillo SHARED src/pull_libs )
|
||||
target_link_libraries( armadillo ${ARMA_LIBS} )
|
||||
|
||||
set_target_properties(armadillo PROPERTIES VERSION ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH} SOVERSION 2)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# INSTALL CONFIGURATION
|
||||
|
||||
|
||||
# As Red Hat Enterprise Linux (and related systems such as Fedora)
|
||||
# does not search /usr/local/lib by default, we need to place the
|
||||
# library in /usr
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr")
|
||||
endif()
|
||||
|
||||
# Allow for the "lib" directory to be specified on the command line
|
||||
if(NOT INSTALL_LIB_DIR)
|
||||
if(UNIX AND NOT APPLE) # I don't know how Mac OS handles 64 bit systems
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Detected 64 bit system")
|
||||
set(INSTALL_LIB_DIR "lib64")
|
||||
else()
|
||||
set(INSTALL_LIB_DIR "lib")
|
||||
endif()
|
||||
else()
|
||||
set(INSTALL_LIB_DIR "lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Allow for the "include" directory to be specified on the command line
|
||||
|
||||
if(NOT INSTALL_INCLUDE_DIR)
|
||||
set(INSTALL_INCLUDE_DIR "include")
|
||||
endif()
|
||||
|
||||
# We use data dir to store files shared with other programs
|
||||
# like the ArmadilloConfig.cmake file.
|
||||
if(NOT INSTALL_DATA_DIR)
|
||||
set(INSTALL_DATA_DIR "share")
|
||||
endif()
|
||||
|
||||
# Make relative paths absolute so we can write them in Config.cmake files
|
||||
foreach(p LIB INCLUDE DATA)
|
||||
set(var INSTALL_${p}_DIR)
|
||||
if(NOT IS_ABSOLUTE "${${var}}")
|
||||
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "INSTALL_LIB_DIR = ${INSTALL_LIB_DIR}" )
|
||||
message(STATUS "INSTALL_INCLUDE_DIR = ${INSTALL_INCLUDE_DIR}" )
|
||||
message(STATUS "INSTALL_DATA_DIR = ${INSTALL_DATA_DIR}" )
|
||||
|
||||
|
||||
# Note that the trailing / character in "include/" is critical
|
||||
|
||||
install(DIRECTORY include/ DESTINATION ${INSTALL_INCLUDE_DIR}
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "*.cmake" EXCLUDE
|
||||
PATTERN "*~" EXCLUDE
|
||||
PATTERN "*orig" EXCLUDE
|
||||
)
|
||||
|
||||
install(TARGETS armadillo
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
EXPORT ArmadilloLibraryDepends)
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
if(CMAKE_VERSION VERSION_GREATER "2.7")
|
||||
export(PACKAGE armadillo)
|
||||
endif()
|
||||
|
||||
## LOCAL FILES
|
||||
# Create ArmadilloConfig.cmake file for the use from the build tree
|
||||
set(ARMADILLO_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
|
||||
set(ARMADILLO_LIB_DIR "${PROJECT_BINARY_DIR}")
|
||||
set(ARMADILLO_CMAKE_DIR "${PROJECT_BINARY_DIR}")
|
||||
|
||||
|
||||
message(STATUS "Generating '${PROJECT_BINARY_DIR}/ArmadilloConfig.cmake'")
|
||||
# copy/change config and configVersion file (modify only the @xyz@ variables)
|
||||
configure_file(build_aux/cmake/InstallFiles/ArmadilloConfig.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/ArmadilloConfig.cmake" @ONLY)
|
||||
|
||||
message(STATUS "Generating '${PROJECT_BINARY_DIR}/ArmadilloConfigVersion.cmake'")
|
||||
configure_file(build_aux/cmake/InstallFiles/ArmadilloConfigVersion.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/ArmadilloConfigVersion.cmake" @ONLY)
|
||||
|
||||
|
||||
# Install the export set for use with the install-tree
|
||||
install(EXPORT ArmadilloLibraryDepends DESTINATION
|
||||
"${INSTALL_DATA_DIR}/Armadillo/CMake"
|
||||
COMPONENT dev)
|
||||
|
||||
|
||||
## GLOBAL INSTALL FILES
|
||||
# Create ArmadilloConfig.cmake file for the use from the install tree
|
||||
# and install it
|
||||
set(ARMADILLO_INCLUDE_DIRS "${INSTALL_INCLUDE_DIR}")
|
||||
set(ARMADILLO_LIB_DIR "${INSTALL_LIB_DIR}")
|
||||
set(ARMADILLO_CMAKE_DIR "${INSTALL_DATA_DIR}/Armadillo/CMake")
|
||||
|
||||
|
||||
message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake'")
|
||||
# copy/change config and configVersion file (modify only the @xyz@ variables)
|
||||
configure_file(build_aux/cmake/InstallFiles/ArmadilloConfig.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake" @ONLY)
|
||||
|
||||
message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfigVersion.cmake'")
|
||||
configure_file(build_aux/cmake/InstallFiles/ArmadilloConfigVersion.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfigVersion.cmake" @ONLY)
|
||||
|
||||
# Install files to be found by cmake users with find_package()
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake"
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfigVersion.cmake"
|
||||
DESTINATION "${ARMADILLO_CMAKE_DIR}" COMPONENT dev)
|
|
@ -1,11 +0,0 @@
|
|||
--- ARMA_FindBLAS.cmake.orig 2011-08-14 10:03:54.000000000 -0500
|
||||
+++ ARMA_FindBLAS.cmake 2011-08-14 10:04:43.000000000 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
SET(BLAS_NAMES ${BLAS_NAMES} blas)
|
||||
FIND_LIBRARY(BLAS_LIBRARY
|
||||
NAMES ${BLAS_NAMES}
|
||||
- PATHS /usr/lib64/atlas /usr/lib/atlas /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
|
||||
+ PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc-v2/lib
|
||||
)
|
||||
|
||||
IF (BLAS_LIBRARY)
|
|
@ -1,21 +0,0 @@
|
|||
--- ARMA_FindCBLAS.cmake.orig 2011-08-14 10:06:31.000000000 -0500
|
||||
+++ ARMA_FindCBLAS.cmake 2011-08-14 10:07:46.000000000 -0500
|
||||
@@ -7,16 +7,13 @@
|
||||
# CBLAS_LIBRARY, where to find the library.
|
||||
|
||||
FIND_PATH(CBLAS_INCLUDE_DIR cblas.h
|
||||
-/usr/include/atlas/
|
||||
-/usr/local/include/atlas/
|
||||
-/usr/include/
|
||||
-/usr/local/include/
|
||||
+/sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc
|
||||
)
|
||||
|
||||
SET(CBLAS_NAMES ${CBLAS_NAMES} cblas)
|
||||
FIND_LIBRARY(CBLAS_LIBRARY
|
||||
NAMES ${CBLAS_NAMES}
|
||||
- PATHS /usr/lib64/atlas /usr/lib/atlas /usr/local/lib64/atlas /usr/local/lib/atlas /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
|
||||
+ PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc
|
||||
)
|
||||
|
||||
IF (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
|
|
@ -1,11 +0,0 @@
|
|||
--- ARMA_FindLAPACK.cmake.orig 2011-08-14 10:04:05.000000000 -0500
|
||||
+++ ARMA_FindLAPACK.cmake 2011-08-14 10:05:20.000000000 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
SET(LAPACK_NAMES ${LAPACK_NAMES} lapack)
|
||||
FIND_LIBRARY(LAPACK_LIBRARY
|
||||
NAMES ${LAPACK_NAMES}
|
||||
- PATHS /usr/lib64/atlas /usr/lib/atlas /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
|
||||
+ PATHS /sharedapps/uwm/ceas/gcc-4.4.3/pkgsrc-v2/lib
|
||||
)
|
||||
|
||||
IF (LAPACK_LIBRARY)
|
|
@ -1,11 +0,0 @@
|
|||
--- CMakeLists.txt.orig 2011-08-14 10:03:01.000000000 -0500
|
||||
+++ CMakeLists.txt 2011-08-14 10:02:04.000000000 -0500
|
||||
@@ -27,7 +27,7 @@
|
||||
include(ARMA_CheckProto)
|
||||
include(ARMA_CheckMathProto)
|
||||
|
||||
-project(armadillo CXX)
|
||||
+project(armadillo C CXX)
|
||||
|
||||
#CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
#CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
Loading…
Reference in New Issue