meson: switch to 0.57.0

- The intent behind this commit is switch meson version to 0.57.0
  and switch C++ version to 20.

- Also, Because the meson call `source_root` is deprecated
  since 0.56.0, switch to `project_source_root` and is the correct
  replacement for the deprecated `source_root`.

Tested: built ledManager repo successfully and worked.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I5ef0569df0be22470104aea493812efa24516639
diff --git a/gen/xyz/openbmc_project/Led/Fru/Monitor/meson.build b/gen/xyz/openbmc_project/Led/Fru/Monitor/meson.build
index 5339b24..eb1ac73 100644
--- a/gen/xyz/openbmc_project/Led/Fru/Monitor/meson.build
+++ b/gen/xyz/openbmc_project/Led/Fru/Monitor/meson.build
@@ -1,13 +1,13 @@
 # Generated file; do not modify.
 generated_sources += custom_target(
     'xyz/openbmc_project/Led/Fru/Monitor__cpp'.underscorify(),
-    input: [ meson.source_root() / 'xyz/openbmc_project/Led/Fru/Monitor.errors.yaml',  ],
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Led/Fru/Monitor.errors.yaml',  ],
     output: [ 'error.cpp', 'error.hpp',  ],
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         'xyz/openbmc_project/Led/Fru/Monitor',
     ],
 )
diff --git a/gen/xyz/openbmc_project/Led/Fru/meson.build b/gen/xyz/openbmc_project/Led/Fru/meson.build
index f5310fb..047a8fd 100644
--- a/gen/xyz/openbmc_project/Led/Fru/meson.build
+++ b/gen/xyz/openbmc_project/Led/Fru/meson.build
@@ -2,13 +2,13 @@
 subdir('Monitor')
 generated_others += custom_target(
     'xyz/openbmc_project/Led/Fru/Monitor__markdown'.underscorify(),
-    input: [ meson.source_root() / 'xyz/openbmc_project/Led/Fru/Monitor.errors.yaml',  ],
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Led/Fru/Monitor.errors.yaml',  ],
     output: [ 'Monitor.md' ],
     command: [
         sdbuspp_gen_meson_prog, '--command', 'markdown',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         'xyz/openbmc_project/Led/Fru/Monitor',
     ],
     build_by_default: true,
diff --git a/gen/xyz/openbmc_project/Led/Mapper/meson.build b/gen/xyz/openbmc_project/Led/Mapper/meson.build
index 89f0354..483ee26 100644
--- a/gen/xyz/openbmc_project/Led/Mapper/meson.build
+++ b/gen/xyz/openbmc_project/Led/Mapper/meson.build
@@ -1,13 +1,13 @@
 # Generated file; do not modify.
 generated_sources += custom_target(
     'xyz/openbmc_project/Led/Mapper__cpp'.underscorify(),
-    input: [ meson.source_root() / 'xyz/openbmc_project/Led/Mapper.errors.yaml',  ],
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Led/Mapper.errors.yaml',  ],
     output: [ 'error.cpp', 'error.hpp',  ],
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         'xyz/openbmc_project/Led/Mapper',
     ],
 )
diff --git a/gen/xyz/openbmc_project/Led/meson.build b/gen/xyz/openbmc_project/Led/meson.build
index ce0db60..305c3f5 100644
--- a/gen/xyz/openbmc_project/Led/meson.build
+++ b/gen/xyz/openbmc_project/Led/meson.build
@@ -3,13 +3,13 @@
 subdir('Mapper')
 generated_others += custom_target(
     'xyz/openbmc_project/Led/Mapper__markdown'.underscorify(),
-    input: [ meson.source_root() / 'xyz/openbmc_project/Led/Mapper.errors.yaml',  ],
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Led/Mapper.errors.yaml',  ],
     output: [ 'Mapper.md' ],
     command: [
         sdbuspp_gen_meson_prog, '--command', 'markdown',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         'xyz/openbmc_project/Led/Mapper',
     ],
     build_by_default: true,
diff --git a/meson.build b/meson.build
index 6412a4c..387c469 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,11 @@
 project(
     'phosphor-ledmanager', 'cpp',
     version : '1.0.0',
-    meson_version: '>=0.54.1',
+    meson_version: '>=0.57.0',
     default_options: [
         'warning_level=3',
         'werror=true',
-        'cpp_std=c++17',
+        'cpp_std=c++20',
         'buildtype=debugoptimized'
     ]
 )
@@ -116,8 +116,8 @@
         'led-gen.hpp',
         command : [
             prog_python,
-            meson.source_root() + '/parse_led.py',
-            '-i', meson.source_root(),
+            meson.project_source_root() + '/parse_led.py',
+            '-i', meson.project_source_root(),
             '-o', meson.current_build_dir(),
         ],
         output : 'led-gen.hpp')