From 436ae56df19f462d1cc09e50541d1a04ee333f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pol=C3=A1k?= <456647@muni.cz> Date: Mon, 25 Mar 2024 15:50:36 +0100 Subject: [PATCH] Fix Xcode defines that contain quotes Without this change defines that contain quotes (for example #define "some/path") are handled incorrectly in Xcode. Xcode would interpret the quotes and they would not appear in the define, breaking the build. This seems to work correctly in Linux and on Windows. --- src/actions/xcode/xcode8.lua | 7 ++++++- src/host/scripts.c | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/actions/xcode/xcode8.lua b/src/actions/xcode/xcode8.lua index c03c499f..cafc0d69 100644 --- a/src/actions/xcode/xcode8.lua +++ b/src/actions/xcode/xcode8.lua @@ -118,6 +118,11 @@ end end + local defines = {} + for k, v in pairs(cfg.defines or {}) do + defines[k] = v:gsub('[\'"\\\n\r\t ]', function (c) return ({ ['\n'] = '\\n', ['\r'] = '\\r', ['\t'] = '\\t' })[c] or '\\'..c end) + end + -- options table to return local options = { ARCHS = archs[cfg.platform], @@ -135,7 +140,7 @@ ENABLE_TESTABILITY = "YES", GCC_C_LANGUAGE_STANDARD = "gnu99", GCC_NO_COMMON_BLOCKS = "YES", - GCC_PREPROCESSOR_DEFINITIONS = cfg.defines, + GCC_PREPROCESSOR_DEFINITIONS = defines, GCC_SYMBOLS_PRIVATE_EXTERN = "NO", GCC_WARN_64_TO_32_BIT_CONVERSION = "YES", GCC_WARN_ABOUT_RETURN_TYPE = "YES", diff --git a/src/host/scripts.c b/src/host/scripts.c index 0dd7de74..563fd57e 100644 --- a/src/host/scripts.c +++ b/src/host/scripts.c @@ -441,13 +441,13 @@ const char* builtin_scripts[] = { /* actions/xcode/xcode8.lua */ "local premake = premake\npremake.xcode8 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nfunction xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal installpaths = {\nConsoleApp = \"/usr/local/bin\",\nWindowedApp = \"$(HOME)/Applications\",\nSharedLib = \"/usr/local/lib\",\nStaticLib = \"/usr/local/lib\",\nBundle = \"$(LOCAL_LIBRARY_DIR)/Bundles\",\n}\nlocal options = {\nALWAYS_SEARCH_USER_PATHS = \"NO\",\nGCC_DYNAMIC_NO_PIC = \"NO\",\nGCC_MODEL_TUNING = \"G5\",\nINSTALL_PATH = installpaths[cfg.kind],\nPRODUCT_NAME = cfg.buildtarget.basename,\n}\nif not cfg.flags.Symbols then\noptions.DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\noptions.EXECUTABLE_PREFIX = cfg.buildtarget.prefix\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\noptions.EXECUTABLE_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nend\nif cfg.flags.ObjcARC then\noptions.CLA" "NG_ENABLE_OBJC_ARC = \"YES\"\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = outdir\nend\nif tr.infoplist then\noptions.INFOPLIST_FILE = tr.infoplist.cfg.name\nend\nlocal infoplist_file = nil\nfor _, v in ipairs(cfg.files) do\nif (string.find (string.lower (v), 'info.plist') ~= nil) then\ninfoplist_file = string.format('$(SRCROOT)/%s', v)\nend\nend\nif infoplist_file ~= nil then\noptions.INFOPLIST_FILE = infoplist_file\nend\nlocal action = premake.action.current()\nxcode.setdeploymenttarget(cfg, action.xcode, options)\nif cfg.kind == \"Bundle\" and not cfg.options.SkipBundling then\noptions.PRODUCT_BUNDLE_IDENTIFIER = \"genie.\" .. cfg.buildtarget.basename:gsub(\"%s+\", \".\") --replace spaces with .\nlocal ext = cfg.targetextension\nif ext then\noptions.WRAPPER_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nelse\noptions.WRAPPER_EXTENSION = \"bundle\"\nend\nend\nreturn options\nend\nfunction xcode8.XCBuildConfiguration_Pr" - "oject(tr, prj, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal archs = {\nNative = nil,\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal cflags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(cflags, flag)\nend\nend\nlocal ldflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(ldflags, \"-l\" .. lib)\nend\nend\nlocal options = {\nARCHS = archs[cfg.platform],\nCLANG_WARN__DUPLICATE_METHOD_MATCH = \"YES\",\nCLANG_WARN_BOOL_CONVERSION = \"YES\",\nCLANG_WARN_CONSTANT_CONVERSION = \"YES\",\nCLANG_WARN_EMPTY_BODY = \"YES\",\nCLANG_WARN" - "_ENUM_CONVERSION = \"YES\",\nCLANG_WARN_INFINITE_RECURSION = \"YES\",\nCLANG_WARN_INT_CONVERSION = \"YES\",\nCLANG_WARN_SUSPICIOUS_MOVE = \"YES\",\nCLANG_WARN_UNREACHABLE_CODE = \"YES\",\nCONFIGURATION_TEMP_DIR = \"$(OBJROOT)\",\nENABLE_STRICT_OBJC_MSGSEND = \"YES\",\nENABLE_TESTABILITY = \"YES\",\nGCC_C_LANGUAGE_STANDARD = \"gnu99\",\nGCC_NO_COMMON_BLOCKS = \"YES\",\nGCC_PREPROCESSOR_DEFINITIONS = cfg.defines,\nGCC_SYMBOLS_PRIVATE_EXTERN = \"NO\",\nGCC_WARN_64_TO_32_BIT_CONVERSION = \"YES\",\nGCC_WARN_ABOUT_RETURN_TYPE = \"YES\",\nGCC_WARN_UNDECLARED_SELECTOR = \"YES\",\nGCC_WARN_UNINITIALIZED_AUTOS = \"YES\",\nGCC_WARN_UNUSED_FUNCTION = \"YES\",\nGCC_WARN_UNUSED_VARIABLE = \"YES\",\nHEADER_SEARCH_PATHS = table.join(cfg.includedirs, cfg.systemincludedirs),\nLIBRARY_SEARCH_PATHS = cfg.libdirs,\nOBJROOT =" - " cfg.objectsdir,\nONLY_ACTIVE_ARCH = \"YES\",\nOTHER_CFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_c),\nOTHER_CPLUSPLUSFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_cpp),\nOTHER_LDFLAGS = table.join(ldflags, cfg.linkoptions),\nSDKROOT = xcode.toolset,\nUSER_HEADER_SEARCH_PATHS = cfg.userincludedirs,\n}\nif tr.entitlements then\noptions.CODE_SIGN_ENTITLEMENTS = tr.entitlements.cfg.name\nend\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\"\noptions.SYMROOT = targetdir\nend\nif cfg.flags.Symbols then\noptions.COPY_PHASE_STRIP = \"NO\"\nend\nlocal excluded = xcode.cfg_excluded_files(prj, cfg)\nif #excluded > 0 then\noptions.EXCLUDED_SOURCE_FILE_NAMES = excluded\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_CPP_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.NoRTTI then\noptions" - ".GCC_ENABLE_CPP_RTTI = \"NO\"\nend\nif cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\noptions.GCC_ENABLE_FIX_AND_CONTINUE = \"YES\"\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_OBJC_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\noptions.GCC_OPTIMIZATION_LEVEL = \"s\"\nelseif cfg.flags.OptimizeSpeed then\noptions.GCC_OPTIMIZATION_LEVEL = 3\nelse\noptions.GCC_OPTIMIZATION_LEVEL = 0\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\noptions.GCC_PRECOMPILE_PREFIX_HEADER = \"YES\"\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\noptions.GCC_PREFIX_HEADER = pch\nend\nif cfg.flags.FatalWarnings then\noptions.GCC_TREAT_WARNINGS_AS_ERRORS = \"YES\"\nend\nif cfg.kind == \"Bundle\" then\noptions.MACH_O_TYPE = \"mh_bundle\"\nend\nif" - " cfg.flags.StaticRuntime then\noptions.STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = \"static\"\nend\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\noptions.WARNING_CFLAGS = \"-Wall\"\nend\nif cfg.flags.Cpp11 then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++11\"\nelseif cfg.flags.Cpp14 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++14\"\nelseif cfg.flags.Cpp17 then\nif premake.action.current() == premake.action.get(\"xcode8\") then\nerror(\"XCode8 does not support C++17.\")\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\nlocal eqpos = string.find(val, \"=\")\nif eqpos ~= nil then\nlocal key = string.trim(string.sub(val, 1, eqpos - 1))\nlocal value = string.trim(string.sub(val, eqpos + 1))\noptions[key] = value\nend\nend\nreturn options\nend\nfunction xcode8.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(t" - "r)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode8.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode8\",\nshortname = \"Xcode 8\",\ndescription = \"Generate Apple Xcode 8 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(s" - "ln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode8.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n", + "oject(tr, prj, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal archs = {\nNative = nil,\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal cflags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(cflags, flag)\nend\nend\nlocal ldflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(ldflags, \"-l\" .. lib)\nend\nend\nlocal defines = {}\nfor k, v in pairs(cfg.defines or {}) do\ndefines[k] = v:gsub('[\\'\"\\\\\\n\\r\\t ]', function (c) return ({ ['\\n'] = '\\\\n', ['\\r'] = '\\\\r', ['\\t'] = '\\\\t' })[c] or '\\\\'..c end)\nend\nlocal options = {\nARCHS = archs" + "[cfg.platform],\nCLANG_WARN__DUPLICATE_METHOD_MATCH = \"YES\",\nCLANG_WARN_BOOL_CONVERSION = \"YES\",\nCLANG_WARN_CONSTANT_CONVERSION = \"YES\",\nCLANG_WARN_EMPTY_BODY = \"YES\",\nCLANG_WARN_ENUM_CONVERSION = \"YES\",\nCLANG_WARN_INFINITE_RECURSION = \"YES\",\nCLANG_WARN_INT_CONVERSION = \"YES\",\nCLANG_WARN_SUSPICIOUS_MOVE = \"YES\",\nCLANG_WARN_UNREACHABLE_CODE = \"YES\",\nCONFIGURATION_TEMP_DIR = \"$(OBJROOT)\",\nENABLE_STRICT_OBJC_MSGSEND = \"YES\",\nENABLE_TESTABILITY = \"YES\",\nGCC_C_LANGUAGE_STANDARD = \"gnu99\",\nGCC_NO_COMMON_BLOCKS = \"YES\",\nGCC_PREPROCESSOR_DEFINITIONS = defines,\nGCC_SYMBOLS_PRIVATE_EXTERN = \"NO\",\nGCC_WARN_64_TO_32_BIT_CONVERSION = \"YES\",\nGCC_WARN_ABOUT_RETURN_TYPE = \"YES\",\nGCC_WARN_UNDECLARED_SELECTOR = \"YES\",\nGCC_WARN_UNINITIALIZED_AUTOS = \"YES\",\nGCC_WARN_UNUSED_FUNCTION = \"YES\",\nGCC_WARN_UNUS" + "ED_VARIABLE = \"YES\",\nHEADER_SEARCH_PATHS = table.join(cfg.includedirs, cfg.systemincludedirs),\nLIBRARY_SEARCH_PATHS = cfg.libdirs,\nOBJROOT = cfg.objectsdir,\nONLY_ACTIVE_ARCH = \"YES\",\nOTHER_CFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_c),\nOTHER_CPLUSPLUSFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_cpp),\nOTHER_LDFLAGS = table.join(ldflags, cfg.linkoptions),\nSDKROOT = xcode.toolset,\nUSER_HEADER_SEARCH_PATHS = cfg.userincludedirs,\n}\nif tr.entitlements then\noptions.CODE_SIGN_ENTITLEMENTS = tr.entitlements.cfg.name\nend\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\"\noptions.SYMROOT = targetdir\nend\nif cfg.flags.Symbols then\noptions.COPY_PHASE_STRIP = \"NO\"\nend\nlocal excluded = xcode.cfg_excl" + "uded_files(prj, cfg)\nif #excluded > 0 then\noptions.EXCLUDED_SOURCE_FILE_NAMES = excluded\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_CPP_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.NoRTTI then\noptions.GCC_ENABLE_CPP_RTTI = \"NO\"\nend\nif cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\noptions.GCC_ENABLE_FIX_AND_CONTINUE = \"YES\"\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_OBJC_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\noptions.GCC_OPTIMIZATION_LEVEL = \"s\"\nelseif cfg.flags.OptimizeSpeed then\noptions.GCC_OPTIMIZATION_LEVEL = 3\nelse\noptions.GCC_OPTIMIZATION_LEVEL = 0\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\noptions.GCC_PRECOMPILE_PREFIX_HEADER = \"YES\"\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak" + "\nend\nend\noptions.GCC_PREFIX_HEADER = pch\nend\nif cfg.flags.FatalWarnings then\noptions.GCC_TREAT_WARNINGS_AS_ERRORS = \"YES\"\nend\nif cfg.kind == \"Bundle\" then\noptions.MACH_O_TYPE = \"mh_bundle\"\nend\nif cfg.flags.StaticRuntime then\noptions.STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = \"static\"\nend\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\noptions.WARNING_CFLAGS = \"-Wall\"\nend\nif cfg.flags.Cpp11 then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++11\"\nelseif cfg.flags.Cpp14 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++14\"\nelseif cfg.flags.Cpp17 then\nif premake.action.current() == premake.action.get(\"xcode8\") then\nerror(\"XCode8 does not support C++17.\")\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\nlocal eqpos = string.find(val, \"=\")\nif eqpos ~= nil then\nlocal key = string.trim(string.sub(val, 1, eqpos - 1))\nlocal value = string.trim(string.sub(val, eqpos + 1))\noptions[key] = value\nend\nend\nreturn options\nend\nfunction xcode8." + "project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode8.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode8\",\nshortname = \"Xcode 8\",\ndescription = \"Generate Apple Xcode 8 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = " + "{\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode8.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n", /* actions/xcode/xcode9.lua */ "local premake = premake\npremake.xcode9 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nfunction xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode8.XCBuildConfiguration_Project(tr, prj, cfg)\nif cfg.flags.Cpp17 then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++17\"\nelseif cfg.flags.Cpp20 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++20\"\nend\nreturn table.merge(options, {\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode9.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(t"