Closed preetishkakkar closed 1 year ago
fastgltf definitely supports C++20 and even includes a few additional things in the headers, if you should use the utilities it adds. Additionally, CMake should not have any issue with the C++ version of your project and fastgltf. Would you mind pasting the error message you encountered?
ahh never mind, looks like since there was no easy way to compile only parts of fastgltf, I added below to my cmake, add_library(fastgltf STATIC ${fastgltf_SOURCE_DIR}/src/base64_decode.cpp ${fastgltf_SOURCE_DIR}/src/fastgltf.cpp ${fastgltf_SOURCE_DIR}/simdjson/simdjson.cpp)
which somehow didn't pick the correct cxx flags set at project level, adding this target_compile_features(fastgltf PRIVATE cxx_std_20) works! thanks..
It will be good to have possibility to configuring it such that examples & test can be turned off when using FetchContent_Declare
Feel free to close this issue
I will keep it open to remind me about adding a FASTGLTF_TESTS and FASTGLTF_EXAMPLES that fully stops anything regarding tests and examples of running. But thank you.
I've now added this with e9e4c349311167f440237a10b5809f223e5ae4cc.
Currently, cmake seems to make sure that we can't use it with a C++ 20 project? Is there a reason to have this restricted to C++ 17, can this limit be removed?