Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix openmp for xcode. #1894

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions modules/xcode/tests/test_xcode_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions modules/xcode/xcode_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = { }
Expand Down
2 changes: 1 addition & 1 deletion website/docs/openmp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##

Expand Down