OrangeC icon indicating copy to clipboard operation
OrangeC copied to clipboard

Update CMake support for new C++ versions

Open yh15kla9 opened this issue 7 months ago • 2 comments

I'm using the latest version of CMake. It keeps saying it doesn't know how to set the switches for C++17 for Orange C. Yes, I know C++17 support is not there yet. But at least you know how the switches would look like already. Please add the switches for C++17 and C++20 to CMake (even though the actual support is not available yet). CMake needs to be able to setup the build scripts before I could test the compatibility of the compiler.

yh15kla9 avatar May 29 '25 03:05 yh15kla9

I've seen similar experiences. If you want to fix this temporarily (You can also send these patches into CMake directly and save some trouble):

set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=c++17")
set(CMAKE_CXX17_STANDARD_HAS_FULL_SUPPORT ON)

Add those three lines to OrangeC-CXX.cmake starting on line 23.

chuggafan avatar May 29 '25 12:05 chuggafan

yeah this is on my list... I also want to add C23 support and someone said something about supporting orc.... as part of #1063 I have to do the prelim work anyway because one of the projects I want to work with is c++17..... the main holdup for cmake releases is that their process is to test my submission against the latest release of orange c so I have to have a release before we can update cmake... and i don't want to have a formal release until it is more stable...

LADSoft avatar May 29 '25 16:05 LADSoft