Commit cb3bb8bc authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[CMake] Remove old checks, add fewer, new ones.

(reviewed by bernd)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10753 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent b43b9d96
......@@ -22,44 +22,3 @@ add_subdirectory("tutorial")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
# # constexpr
# CHECK_CXX_SOURCE_COMPILES(
# " int main(void) {
# constexpr double g = 9.81;
# return 0; }
# " HAVE_CONSTEXPR
# )
#
# # __attribute__((always_inline))
# CHECK_CXX_SOURCE_COMPILES(
# "
# void __attribute__((always_inline)) foo(void) {}
# int main(void) { foo(); return 0; };
# " HAVE_ATTRIBUTE_ALWAYS_INLINE
# )
# ##############
# # Check for patched DUNE-PDELab
# include(CMakePushCheckState)
# cmake_push_check_state()
# set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -DHAVE_NULLPTR=${HAVE_NULLPTR}")
# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${DumuxIncludeDirectories})
# set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${DumuxLinkLibraries})
#
# CHECK_CXX_SOURCE_COMPILES("
# #include <dune/pdelab/backend/istlvectorbackend.hh>
#
# int main(void)
# {
# Dune::PDELab::ISTLBlockVectorContainer
# <std::vector<double>, double, 3> blockVectorContainer;
# return blockVectorContainer.size();
# }
# " DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
# )
# cmake_pop_check_state()
......@@ -2,7 +2,7 @@
# nicely, the files for the CMake build system, some README files and
# a set of default .opts files for dunecontrol.
EXTRA_DIST = dune.module \
cmake/Modules/*.cmake \
cmake/modules/*.cmake \
bin/runTest.sh bin/fuzzycomparevtu.py \
CMakeLists.txt config.h.cmake \
CHANGELOG COPYING INSTALL.cmake README \
......
#############################################################
# This sets up the DumuxMacros for the current CMake module.
# Call DumuxSweep at the end of your CMake module in order to
# not pullute the namespace with unused variables
#############################################################
macro(DumuxSetup
CMakeModuleName
ModuleName
Framework)
#############
# Set some internal variables which are used within
# the current CMake Module
set(DumuxModule ${CMakeModuleName})
set(DumuxModuleName ${ModuleName})
set(DumuxFramework ${Framework})
set(DumuxLibsFound 1)
set(DumuxLibraryNames)
set(DumuxFound 0)
set(DumuxPathMessage
"Set the ${DumuxModule}_DIR cmake cache entry to the directory
where the ${DumuxModuleName} libraries reside. Alternatively you can set
the ${DumuxFramework}_DIR entry where all ${DumuxFramework} sub-modules have been compiled.")
# Base path to look for libraries and includes
if(${DumuxModule}_DIR)
list(APPEND DumuxModulePath ${${DumuxModule}_DIR})
endif(${DumuxModule}_DIR)
if(${DumuxFramework}_DIR)
list(APPEND DumuxModulePath "${${DumuxFramework}_DIR}/${DumuxModuleName}")
endif(${DumuxFramework}_DIR)
# Path to look for includes (->DumuxIncludePath) and libraries (-> DumuxLibraryPath)
foreach(tmp ${DumuxModulePath})
list(APPEND DumuxIncludePath "${tmp}" "${tmp}/include")
list(APPEND DumuxLibraryPath "${tmp}" "${tmp}/lib" "${tmp}/lib64")
endforeach(tmp)
list(APPEND DumuxIncludePath "/usr/include" "/usr/local/include")
list(APPEND DumuxLibraryPath "/usr/lib" "/usr/lib64" "/usr/local/lib" "/usr/local/lib64")
set(DumuxLibraries)
set(DumuxFailedLibraries)
endmacro(DumuxSetup)
#############################################################
# This adds some additional paths to the location where
# includes and libraries are searched
#############################################################
macro(DumuxAddPathSuffixes
IncludeSuffixes
LibSuffixes)
foreach(tmp ${DumuxModulePath})
# deal with the user defined library locations
foreach(foo ${LibSuffixes})
list(APPEND DumuxLibraryPath "${tmp}/${foo}")
endforeach(foo)
# deal with the user defined include locations
foreach(foo ${IncludeSuffixes})
list(APPEND DumuxIncludePath "${tmp}/${foo}")
endforeach(foo)
endforeach(tmp)
endmacro(DumuxAddPathSuffixes)
#############################################################
# Find a given library using some reasonable default
# search paths. Sets Dumux${LibName}_LIBRARY to the location
# where the library was found and extends the DumuxLibraries
# variable.
#############################################################
macro(DumuxFindLibrary LibName)
set(Lib ${DumuxModule}_${LibName}_LIBRARY)
find_library(${Lib}
${LibName}
PATHS ${DumuxLibraryPath}
PATH_SUFFIXES ".libs")
if(${Lib})
list(APPEND DumuxLibraries ${${Lib}})
list(APPEND DumuxLibraryNames ${LibName})
else(${Lib})
list(APPEND DumuxFailedLibraries ${LibName})
endif(${Lib})
endmacro(DumuxFindLibrary)
#############################################################
# Find a given header file using some reasonable default
# search paths.
#############################################################
macro(DumuxFindExtraIncludeDir VarName HeaderName)
set(Inc ${DumuxModule}_${VarName}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS ${${Inc}})
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindExtraIncludeDir)
macro(DumuxFindIncludeDir HeaderName)
set(Inc ${DumuxModule}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS "${${Inc}}")
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindIncludeDir)
macro(DumuxFindIncludeBaseDir HeaderName DirSuffix)
set(Inc ${DumuxModule}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS "${${Inc}}/${DirSuffix}")
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindIncludeBaseDir)
#############################################################
# Make sure the required libraries were found
#############################################################
macro(DumuxRequiredLibsFound)
set(DumuxLibsFound 1)
set(DumuxFailedLibsMessage "Could not find the required libraries ")
foreach(curLib ${ARGN})
set(curLibFound 0)
foreach(tmp ${DumuxLibraryNames})
if (tmp STREQUAL ${curLib})
set(curLibFound 1)
endif (tmp STREQUAL ${curLib})
endforeach(tmp)
if (NOT curLibFound)
set(DumuxLibsFound 0)
set(DumuxFailedLibsMessage "${DumuxFailedLibsMessage} '${curLib}'")
endif(NOT curLibFound)
endforeach(curLib)
endmacro(DumuxRequiredLibsFound)
#############################################################
# Make sure the required libraries were found
#############################################################
macro(DumuxIncludeDirsFound)
endmacro(DumuxIncludeDirsFound)
#############################################################
# Make sure everything required was found
#############################################################
macro(DumuxCheckFound)
# Set the global macros
set(DumuxFound 0)
if(DumuxLibsFound AND ${DumuxModule}_INCLUDE_DIR)
set(DumuxFound 1)
# log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determing location of ${DumuxModule} succeded:\n"
"Include directory: ${${DumuxModule}_INCLUDE_DIR}\n"
"Library directory: ${DumuxLibraries}\n\n")
else()
# log errornous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determing location of ${DumuxModule} failed:\n"
"Include directory: ${${DumuxModule}_INCLUDE_DIR}\n"
"Library directory: ${DumuxLibraries}\n\n")
endif(DumuxLibsFound AND ${DumuxModule}_INCLUDE_DIR)
set(${DumuxModule}_FOUND ${DumuxFound})
set(${DumuxModule}_LIBRARIES ${DumuxLibraries})
# print status message if requested
if(NOT ${DumuxModule}_FIND_QUIETLY)
if(DumuxFound)
message(STATUS "Found ${DumuxModule}")
else()
message(STATUS "Could not find ${DumuxModule}")
endif(DumuxFound)
endif(NOT ${DumuxModule}_FIND_QUIETLY)
if(NOT DumuxFound AND ${DumuxModule}_FIND_REQUIRED)
if(DumuxLibsFound)
message(FATAL_ERROR "${DumuxPathMessage}")
else(DumuxLibsFound)
message(FATAL_ERROR "${DumuxPathMessage} ${DumuxFailedLibsMessage}")
endif(DumuxLibsFound)
endif(NOT DumuxFound AND ${DumuxModule}_FIND_REQUIRED)
endmacro(DumuxCheckFound)
# -*-cmake-*-
# - Try to find the UG grid manager
# Once done this will define:
# ALUGrid_FOUND - system has dune-grid
# UG_INCLUDE_DIR - incude paths to use dune-grid
# UG_LIBRARIES - Link these to use dune-grid
Include(DumuxMacros)
DumuxSetup("ALUGrid" "ALUGrid" "ALUGrid")
set(MyIncludeSuffixes
"include/serial"
"include/parallel"
"include/duneinterface")
DumuxAddPathSuffixes("${MyIncludeSuffixes}" "")
DumuxFindIncludeDir("alugrid_2d.h")
DumuxFindExtraIncludeDir("ALU_SERIAL" "serialize.h")
DumuxFindExtraIncludeDir("ALU_PARALLEL" "gitter_pll_impl.h")
DumuxFindExtraIncludeDir("ALU_DUNE" "gitter_dune_impl.h")
DumuxFindLibrary("alugrid")
DumuxRequiredLibsFound("alugrid")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find the Alberta grid manager
# Once done this will define:
# Alberta_FOUND - system has dune-grid
# Alberta_INCLUDE_DIR - incude paths to use dune-grid
# Alberta_LIBRARIES - Link these to use dune-grid
Include(DumuxMacros)
DumuxSetup("Alberta" "Alberta" "Alberta")
#DumuxAddPathSuffixes("${MyIncludeSuffixes}" "")
DumuxFindIncludeDir("alberta.h")
DumuxFindLibrary("ALBERTA22_0")
DumuxFindLibrary("ALBERTA22_1")
DumuxFindLibrary("alberta_util")
DumuxRequiredLibsFound("ALBERTA22_0" "ALBERTA22_1" "alberta_util")
DumuxIncludeDirsFound()
DumuxCheckFound()
# this file is a copy from CMake git master
# last modification 2011-09-01 Alexey Ozeritsky
# this file should be from 2.8.6 on
# older versions than 2.8.4 require a fortran comipiler
##################################################
# - Find BLAS library
# This module finds an installed fortran library that implements the BLAS
# linear-algebra interface (see http://www.netlib.org/blas/).
# The list of libraries searched for is taken
# from the autoconf macro file, acx_blas.m4 (distributed at
# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
#
# This module sets the following variables:
# BLAS_FOUND - set to true if a library implementing the BLAS interface
# is found
# BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
# and -L).
# BLAS_LIBRARIES - uncached list of libraries (using full path name) to
# link against to use BLAS
# BLAS95_LIBRARIES - uncached list of libraries (using full path name)
# to link against to use BLAS95 interface
# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
# is found
# BLA_STATIC if set on this determines what kind of linkage we do (static)
# BLA_VENDOR if set checks only the specified vendor, if not set checks
# all the possibilities
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
##########
### List of vendors (BLA_VENDOR) valid in this module
## Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
## Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic
# C/CXX should be enabled to use Intel mkl
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(CheckFunctionExists)
include(CheckFortranFunctionExists)
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
# Check the language being used
get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
if( _LANGUAGES_ MATCHES Fortran )
set( _CHECK_FORTRAN TRUE )
elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )
set( _CHECK_FORTRAN FALSE )
else()
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
else(BLAS_FIND_REQUIRED)
message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)")
return()
endif(BLAS_FIND_REQUIRED)
endif( )
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
# This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the
# Check_Fortran_Function_Exists macro) whether can link against that library
# combination using the name of a routine given by _name using the linker
# flags given by _flags. If the combination of libraries is found and passes
# the link test, LIBRARIES is set to the list of complete library paths that
# have been found. Otherwise, LIBRARIES is set to FALSE.
# N.B. _prefix is the prefix applied to the names of all cached variables that
# are generated internally and marked advanced by this macro.
set(_libdir ${ARGN})
set(_libraries_work TRUE)
set(${LIBRARIES})
set(_combined_name)
if (NOT _libdir)
if (WIN32)
set(_libdir ENV LIB)
elseif (APPLE)
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
else ()
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
endif ()
endif ()
foreach(_library ${_list})
set(_combined_name ${_combined_name}_${_library})
if(_libraries_work)
if (BLA_STATIC)
if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif ( WIN32 )
if (APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
else (APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif (APPLE)
else (BLA_STATIC)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# for ubuntu's libblas3gf and liblapack3gf packages
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
endif ()
endif (BLA_STATIC)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
PATHS ${_libdir}
)
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
endif(_libraries_work)
endforeach(_library ${_list})
if(_libraries_work)
# Test this combination of libraries.
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads})
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
if (_CHECK_FORTRAN)
check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
else()
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
endif()
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
endif(_libraries_work)
if(NOT _libraries_work)
set(${LIBRARIES} FALSE)
endif(NOT _libraries_work)
#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
endmacro(Check_Fortran_Libraries)
set(BLAS_LINKER_FLAGS)
set(BLAS_LIBRARIES)
set(BLAS95_LIBRARIES)
if ($ENV{BLA_VENDOR} MATCHES ".+")
set(BLA_VENDOR $ENV{BLA_VENDOR})
else ($ENV{BLA_VENDOR} MATCHES ".+")
if(NOT BLA_VENDOR)
set(BLA_VENDOR "All")
endif(NOT BLA_VENDOR)
endif ($ENV{BLA_VENDOR} MATCHES ".+")
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"goto2"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
dgemm
""
"f77blas;atlas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"sgemm;dgemm;blas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
# BLAS in Alpha CXML library?
if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"cxml"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
# BLAS in Alpha DXML library? (now called CXML, see above)
if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"dxml"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
# BLAS in Sun Performance library?
if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
"-xlic_lib=sunperf"
"sunperf;sunmath"
""
)
if(BLAS_LIBRARIES)
set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
endif(BLAS_LIBRARIES)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
# BLAS in SCSL library? (SGI/Cray Scientific Library)
if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"scsl"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
# BLAS in SGIMATH library?
if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"complib.sgimath"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"essl;blas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
#BLAS in acml library?
if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS))
)
# try to find acml in "standard" paths
if( WIN32 )
file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
else()
file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" )
endif()
if( WIN32 )
file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" )
else()
file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" )
endif()
list(GET _ACML_ROOT 0 _ACML_ROOT)
list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
if( _ACML_ROOT )
get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
if( SIZEOF_INTEGER EQUAL 8 )
set( _ACML_PATH_SUFFIX "_int64" )
else()
set( _ACML_PATH_SUFFIX "" )
endif()
if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" )
set( _ACML_COMPILER32 "ifort32" )
set( _ACML_COMPILER64 "ifort64" )
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" )
set( _ACML_COMPILER32 "sun32" )
set( _ACML_COMPILER64 "sun64" )
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" )
set( _ACML_COMPILER32 "pgi32" )
if( WIN32 )
set( _ACML_COMPILER64 "win64" )
else()