diff --git a/shared/config.gradle b/shared/config.gradle index fe50f192d6..d5ac9b17da 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -8,7 +8,7 @@ def windowsDebugCompilerArgs = ['/Od', '/MDd'] def windowsLinkerArgs = ['/DEBUG:FULL'] def windowsReleaseLinkerArgs = ['/OPT:REF', '/OPT:ICF'] -def linuxCrossCompilerArgs = ['-std=c++14', '-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', +def linuxCrossCompilerArgs = ['-std=c++17', '-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', '-Wno-unused-parameter', '-Wno-error=deprecated-declarations', '-fPIC', '-rdynamic', '-pthread'] def linuxCrossCCompilerArgs = ['-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', @@ -17,7 +17,7 @@ def linuxCrossLinkerArgs = ['-rdynamic', '-pthread', '-ldl'] def linuxCrossReleaseCompilerArgs = ['-O2'] def linuxCrossDebugCompilerArgs = ['-Og'] -def linuxCompilerArgs = ['-std=c++14', '-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', +def linuxCompilerArgs = ['-std=c++17', '-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', '-Wno-unused-parameter', '-Wno-error=deprecated-declarations', '-fPIC', '-rdynamic', '-pthread'] def linuxCCompilerArgs = ['-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', @@ -27,12 +27,12 @@ def linuxReleaseCompilerArgs = ['-O2'] def linuxDebugCompilerArgs = ['-O0'] def linux32BitArg = '-m32' -def macCompilerArgs = ['-std=c++14', '-Wall', '-Wextra', '-Werror', '-pedantic-errors', '-fPIC', '-g', +def macCompilerArgs = ['-std=c++17', '-Wall', '-Wextra', '-Werror', '-pedantic-errors', '-fPIC', '-g', '-Wno-unused-parameter', '-Wno-error=deprecated-declarations', '-Wno-missing-field-initializers', '-Wno-unused-private-field', '-Wno-unused-const-variable', '-pthread'] def macCCompilerArgs = ['-Wall', '-Wextra', '-Werror', '-pedantic-errors', '-fPIC', '-g', '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-Wno-unused-private-field'] -def macObjCLinkerArgs = ['-std=c++14', '-stdlib=libc++','-fobjc-arc', '-g', '-fPIC', '-Wall', '-Wextra', '-Werror'] +def macObjCLinkerArgs = ['-std=c++17', '-stdlib=libc++','-fobjc-arc', '-g', '-fPIC', '-Wall', '-Wextra', '-Werror'] def macReleaseCompilerArgs = ['-O2'] def macDebugCompilerArgs = ['-O0'] def macLinkerArgs = ['-framework', 'CoreFoundation', '-framework', 'AVFoundation', '-framework', 'Foundation', '-framework', 'CoreMedia', '-framework', 'CoreVideo'] diff --git a/wpiutil/CMakeLists.txt b/wpiutil/CMakeLists.txt index bcb8d7c76a..1f379895a2 100644 --- a/wpiutil/CMakeLists.txt +++ b/wpiutil/CMakeLists.txt @@ -77,13 +77,12 @@ set_target_properties(wpiutil PROPERTIES DEBUG_POSTFIX "d") set_property(TARGET wpiutil PROPERTY FOLDER "libraries") +target_compile_features(wpiutil PUBLIC cxx_std_17) if (NOT MSVC) target_compile_options(wpiutil PUBLIC $) - target_compile_features(wpiutil PUBLIC cxx_std_14) else() target_compile_options(wpiutil PUBLIC /wd4244 /wd4267 /wd4146) target_compile_options(wpiutil PUBLIC $) - target_compile_features(wpiutil PUBLIC cxx_std_17) target_compile_options(wpiutil PRIVATE -D_CRT_SECURE_NO_WARNINGS) endif()