Commit 2a097b69 authored by Max Lyon's avatar Max Lyon

find blas on Windows

parent 43b3dd10
Pipeline #7629 failed with stages
in 7 minutes and 13 seconds
cmake_minimum_required (VERSION 2.6)
#Only set project name if CoMISo is built as stand-alone library
if("${PROJECT_NAME}" STREQUAL "")
project(CoMISo)
endif()
# add our macro directory to cmake search path
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set (CMAKE_DEBUG_POSTFIX "d")
include (ACGCommon)
# Flag to enable or disable QT widgets in CoMISo
set( WANT_COMISO_QT ON CACHE BOOL "Enable Qt support in CoMISo" )
if( WANT_COMISO_QT )
acg_qt5 ()
......@@ -40,7 +36,7 @@ set(COMISO_LINK_DIRECTORIES "")
set(COMISO_LINK_LIBRARIES "")
set(NEED_LAPACK "")
FIND_PACKAGE( Boost 1.42.0 COMPONENTS system filesystem regex QUIET)
FIND_PACKAGE( Boost 1.59.0 COMPONENTS system filesystem regex QUIET)
if(Boost_FOUND)
set (COMISO_BOOST_CONFIG_FILE_SETTINGS "#define COMISO_BOOST_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
......@@ -73,8 +69,8 @@ else()
message (FATAL_ERROR "GMM not found!")
endif ()
set(TMP_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
set(CMAKE_FIND_LIBRARY_PREFIXES lib "") #Our blas librariy is called libblas.lib. Is there a better way to find it than this?
find_package (BLAS)
if (BLAS_FOUND )
set (COMISO_BLAS_CONFIG_FILE_SETTINGS "#define COMISO_BLAS_AVAILABLE 1" )
......@@ -86,6 +82,7 @@ else()
set (COMISO_BLAS_CONFIG_FILE_SETTINGS "#define COMISO_BLAS_AVAILABLE 0" )
message (STATUS "BLAS not found!")
endif ()
set(CMAKE_FIND_LIBRARY_PREFIXES "${TMP_CMAKE_FIND_LIBRARY_PREFIXES}")
find_package (ADOLC)
if (ADOLC_FOUND)
......
......@@ -982,3 +982,40 @@ function (generate_qhp_file files_loc plugin_name)
endif()
endforeach()
endfunction()
# Set path to libraries VS_SEARCH_PATH
if (WIN32)
if ( CMAKE_GENERATOR MATCHES ".*Win64" )
SET( DIRSUFFIX "lib64" )
else ()
SET( DIRSUFFIX "lib" )
endif()
# Check if the base path is set
if ( NOT CMAKE_WINDOWS_LIBS_DIR )
# This is the base directory for windows library search used in the finders we shipp.
set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows." )
endif()
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif()
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${VS_SEARCH_PATH}" "${VS_SEARCH_PATH}/lapack_blas_windows")
endif(WIN32)
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