diff --git a/CMakeLists.txt b/CMakeLists.txt index 6745893352..4e1e2ea0b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,10 @@ include(CPack) set(CPACK_PACKAGE_FILE_NAME lpython-${LFORTRAN_VERSION}-${CMAKE_SYSTEM_NAME}) -set(CMAKE_CXX_STANDARD 17 - CACHE STRING "C++ standard" FORCE) +if (NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17 + CACHE STRING "C++ standard" FORCE) +endif () set(CMAKE_POSITION_INDEPENDENT_CODE ON)