Merge pull request #1894 from Jarod42/OpenMPForXcode

Fix openmp for xcode.
This commit is contained in:
Samuel Surtees 2022-06-21 13:18:44 +10:00 committed by GitHub
commit 1c22240cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View File

@ -2693,6 +2693,32 @@
]]
end
function suite.XCBuildConfigurationProject_OnOpenMP()
openmp "On"
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
A14350AC4595EE5E57CE36EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = (
"-fopenmp",
);
SYMROOT = bin/Debug;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationProject_OnFloatStrict()
floatingpoint "Strict"

View File

@ -1556,6 +1556,7 @@
["-ffast-math"] = cfg.floatingpoint == "Fast",
["-fomit-frame-pointer"] = cfg.omitframepointer == "On",
["-fno-omit-frame-pointer"] = cfg.omitframepointer == "Off",
["-fopenmp"] = cfg.openmp == "On"
}
local flags = { }

View File

@ -21,7 +21,7 @@ Project configurations.
### Availability ###
Premake 5.0-beta1 or later for Visual Studio 2010+ and the MSC toolset.
Premake 5.0-beta2 or later for the GCC and Clang toolsets.
Premake 5.0-beta2 or later for the GCC and Clang toolsets and for xcode.
## Examples ##