Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

enable_cxx11.cmake 1.46 KB
Newer Older
1 2 3 4
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
include(CheckIncludeFileCXX)

5
if (ENABLE_CXX11)
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
  check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)

  if (NOT COMPILER_SUPPORTS_CXX11)
    set(CMAKE_REQUIRED_FLAGS "-std=c++11")
    check_cxx_source_compiles("int main(){decltype(1) vec[]={1,2,3}; for(auto&& x:vec);}" CXX_COMPILES_WITH_CXX11)
    set(CMAKE_REQUIRED_FLAGS "")
  endif ()

  if (COMPILER_SUPPORTS_CXX11 OR CXX_COMPILES_WITH_CXX11)
    add_definitions("-std=c++11")
  else ()
    check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
    if (NOT COMPILER_SUPPORTS_CXX0X)
      set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
      check_cxx_source_compiles("int main(){decltype(1) vec[]={1,2,3}; for(auto&& x:vec);}" CXX_COMPILES_WITH_CXX0X)
      set(CMAKE_REQUIRED_FLAGS "")
    endif ()

    if (COMPILER_SUPPORTS_CXX0X OR CXX_COMPILES_WITH_CXX0X)
      add_definitions("-std=c++0x")
    else ()
      check_cxx_source_compiles("int main(){decltype(1) vec[]={1,2,3}; for(auto&& x:vec);}" CXX11_COMPILES)
      check_include_file_cxx("array" CXX11_INCLUDES)

      if (CXX11_COMPILES AND CXX11_INCLUDES)
        set(${RESULT_VAR} true CACHE BOOL "Enable C++11 compiler features")
      else ()
        message (FATAL_ERROR "Compiler does not support C++11.")
      endif ()
    endif ()
  endif ()
37

38
  list(APPEND COMPILEFLAGS "-DHAS_CXX11=1")
39
else ()
40
  list(APPEND COMPILEFLAGS "-DHAS_CXX11=0")
41
endif (ENABLE_CXX11)