diff --git a/CMakeLists.txt b/CMakeLists.txt index d4b49fc6..9e011c53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,14 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES Clang) else() message(FATAL_ERROR "No C++11 support for Clang version. Please upgrade Clang to a version supporting C++11.") endif() +elseif(${CMAKE_CXX_COMPILER_ID} MATCHES XL) + # NOTE: This branch is not tested yet (in theory it should work) + check_cxx_compiler_flag(-qlanglvl=extended0x HAVE_STD11) + if(HAVE_STD11) + add_to_string_list("${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS "-qlanglvl=extended0x -qwarn0x") + else() + message(FATAL_ERROR "No advanced standard C++ support of your IBM XL C/C++ compiler (-qlanglvl=extended0x not defined).") + endif() else() message(FATAL_ERROR "Don't know how to check C++11 compatibility with compiler '${CMAKE_CXX_COMPILER_ID}'") endif()