3

I got the error during I used the CMake to compiler something. My GCC version: 5.4.0, CMake version: 3.17.3, Anyone can help to fix it?

CMake Error in CMakeLists.txt:
  Target "fvt_controller" requires the language dialect "CXX17" , but CMake
  does not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "cpu_check" requires the language dialect "CXX17" , but CMake does
  not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "utils" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "intel" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.
Kevin
  • 16,549
  • 8
  • 60
  • 74
xiaoma
  • 31
  • 1
  • 2
  • 1
    Does this answer your question? [Target requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it](https://stackoverflow.com/questions/47238577/target-requires-the-language-dialect-cxx17-with-compiler-extensions-but-cma) – Kevin Jun 12 '20 at 01:40
  • 1
    I think this one is also a good answer: https://stackoverflow.com/questions/45688522/how-to-enable-c17-in-cmake – Stewart Jun 12 '20 at 10:08
  • 1
    gcc-5.4.0 doesn't support C++17. You need to install a newer version. – Stephen Newell Jun 13 '20 at 13:03
  • I've seen this when I forgot to enable the proper dev tools software collection prior to invoking cmake, which left an improper configurationin my build directory that foiled future efforts to use cmake. The answer, in my case, was to delete everything in the build directory, enable the dev tools, and then re-invoke cmake. Oh, and to put "source scl_source enable " in my bashrc so that I don't have to remember to invoke it by hand :-). – Thagomizer Feb 03 '21 at 00:34

0 Answers0