• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

C++ Your C++ compiler does not support C++11.

MorganaSacani

Active Member
Joined
Sep 20, 2022
Messages
78
Solutions
1
Reaction score
28
When I open the TFS 0.4 project in Visual Studio, the following message appears:
Your C++ compiler does not support C++11.

FindCXX11.cmake:
C++:
if(__FIND_CXX11_CMAKE__)
    return()
endif()
set(__FIND_CXX11_CMAKE__ TRUE)

include(CheckCXXCompilerFlag)
enable_language(CXX)

check_cxx_compiler_flag("-std=c++11" COMPILER_KNOWS_CXX11)
if(COMPILER_KNOWS_CXX11)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

    # Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
    # Clang requires this to find the correct c++11 headers
    check_cxx_compiler_flag("-stdlib=libc++" COMPILER_KNOWS_STDLIB)
    if(COMPILER_KNOWS_STDLIB)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
    endif()
else()
    check_cxx_compiler_flag("-std=c++0x" COMPILER_KNOWS_CXX0X)
    if(COMPILER_KNOWS_CXX0X)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
    else()
        message(FATAL_ERROR "Your C++ compiler does not support C++11.")
    endif()
endif()
 

amatria

Well-Known Member
Joined
May 15, 2021
Messages
74
Solutions
6
Reaction score
78
Location
Spain
GitHub
amatria
Provided that you are using a C11-enabled Visual Studio, just remove the line include(FindCXX11) in your top-level CMakeLists.txt file and everything should work just fine.
 
Last edited:
Top