Architectures.txt 1.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#Set the default build type to Release
if (NOT CMAKE_BUILD_TYPE)
   message("-DCMAKE_BUILD_TYPE was not provided, using Release as default")
   set(CMAKE_BUILD_TYPE "Release")
endif()

#Try to guess the architecture used
site_name(sitename)
set (configfile "NOTFOUND")
if (${Fleur_custom_toolchain})
   set (configfile "cmake/cmake.config")
12 13
elseif ($ENV{FC} MATCHES "pgf.*")
   set (configfile "cmake/cmake.pgfortran.config")
14 15
elseif ($ENV{FC} MATCHES "gfortran.*")
   set (configfile "cmake/cmake.gfortran.config")
16 17
elseif ($ENV{FC} MATCHES "ifort.*")
   set (configfile "cmake/cmake.ifort.config")
18 19 20
elseif (${sitename} MATCHES "iff.*")
   set (configfile "cmake/cmake.iff.config")
elseif (${sitename} MATCHES "jrl.*")
21 22 23 24 25 26
   message("Identified jureca machine. Set GPU=yes if you want to use GPU version")
   if ($ENV{GPU} MATCHES "yes")
      set (configfile "cmake/cmake.jurecaGPU.config")
   else()
	set (configfile "cmake/cmake.jureca.config")
   endif()
27 28 29 30 31 32 33 34 35 36
elseif (${sitename} MATCHES "jj2.*")
   set (configfile "cmake/cmake.juropa.config")
elseif (${sitename} MATCHES "j3.*")
   set (configfile "cmake/cmake.juropatest.config")
elseif (${sitename} MATCHES "juquee.*")
   set (configfile "cmake/cmake.juqueen.config")
elseif (${sitename} MATCHES "cluster")
   set (configfile "cmake/cmake.rwth.config")
elseif (${sitename} MATCHES "judge")
   set (configfile "cmake/cmake.judge.config")
37 38
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set (configfile "cmake/cmake.darwin.config")
39 40 41 42 43 44 45
endif ()

if (${configfile} MATCHES "NOTFOUND")
    message(FATAL_ERROR "No configuration file found\nYou should create a toolchain file" )
else ()
    include(${configfile})
endif ()