Comments (15)
he reproduced the problem and has a fix. this should be merged pretty soon
from sharpmake.
Hi,
There was lots of changes recently for xcode. Could you try some other old versions to see if the problem is the same?
from sharpmake.
I tried downgrading to 0.26 and then 0.24 and the issue occurs on all of them, do you need me to go further back or does that rule out the recent changes?
from sharpmake.
no, the changes are more recent than that.
from sharpmake.
How are you compiling? are you compiling with fastbuild ?
from sharpmake.
Nope, not using fastbuild.
from sharpmake.
I collapsed my project into a single project definition below so that you can see everything it does for Xcode/Mac:
using Sharpmake;
using System.IO;
using System.Xml.Linq;
[Generate]
public class SpirvTools : Project
{
public SpirvTools()
: base(typeof(CustomTarget))
{
AddTargets(new CustomTarget
{
Platform = Platform.mac,
DevEnv = DevEnv.xcode,
BuildConfig = BuildConfig.Debug | BuildConfig.Release | BuildConfig.Distribution
});
Name = "SpirvTools";
IsFileNameToLower = false;
IsTargetFileNameToLower = false;
if(Sharpmake.Util.GetExecutingPlatform() == Platform.mac)
{
SourceFilesExtensions.Add(".m", ".mm", ".metal", ".plist", ".storyboard", ".xcassets");
SourceFilesCompileExtensions.Add(".m", ".mm", ".metal", ".storyboard", ".xcassets");
ResourceFilesExtensions.Add(".storyboard", ".xcassets");
}
SourceRootPath = Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-tools");
SourceFilesExcludeRegex.Add(Sharpmake.Util.RegexPathCombine("spirv-tools", "source", "link"));
SourceFilesExcludeRegex.Add(Sharpmake.Util.RegexPathCombine("spirv-tools", "source", "lint"));
SourceFilesExcludeRegex.Add(Sharpmake.Util.RegexPathCombine("spirv-tools", "source", "diff"));
// Custom registration for ObjectFileName redirects across all configurations
AddObjFileRedirect(Path.Combine("source", "val", "basic_block.cpp"), "basic_block_val.obj");
AddObjFileRedirect(Path.Combine("source", "val", "function.cpp"), "function_val.obj");
AddObjFileRedirect(Path.Combine("source", "val", "instruction.cpp"), "instruction_val.obj");
}
[Configure]
public void ConfigureGeneral(Configuration conf, CustomTarget target)
{
base.ConfigureGeneral(conf, target);
conf.ProjectPath = "[project.SharpmakeCsPath]";
conf.SolutionFolder = "Tools";
conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-tools"));
conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-tools/source"));
conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-tools/include"));
conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-tools/include/generated"));
conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "vendor/spirv-headers/include"));
conf.Output = Configuration.OutputType.Lib;
conf.TargetPath = Path.Combine(Globals.RootDir, Util.LibBinDir, "[project.Name]");
conf.IntermediatePath = Path.Combine(Globals.RootDir, Util.LibIntDir, "[project.Name]");
}
[Configure(DevEnv.xcode)]
public void ConfigureXCode(Configuration conf, CustomTarget target)
{
conf.Options.Add(Options.XCode.Compiler.CppLanguageStandard.CPP14);
conf.Options.Add(Options.XCode.Compiler.OnlyActiveArch.Enable);
}
}
from sharpmake.
can you paste AddObjFileRedirect code ?
from sharpmake.
Ah yeah sorry, that function looks like this:
protected void AddObjFileRedirect(string from, string to)
{
ObjectFileRedirects[from] = to;
}
And then it is applied in the base class of a general [Configure] method in the non flattened version of my project by calling this function:
private void ApplyObjFileRedirects(Configuration conf)
{
conf.ObjectFileName = delegate (string from)
{
return ObjectFileRedirects.ContainsKey(from) ? Path.Combine("[conf.IntermediatePath]", ObjectFileRedirects[from]) : "";
};
}
from sharpmake.
I tried commenting those redirects out and it didn't have any impact on the generated Xcode project.
from sharpmake.
the coworker that does most of the xcode changes is fixing this right now.
from sharpmake.
Awesome, thanks for the speedy response!
from sharpmake.
please try this locally:
private class ProjectBuildFile : ProjectItem
{
public ProjectBuildFile(ProjectFileBase file, string settings = @"")
: base(ItemSection.PBXBuildFile, file.FullPath, settings)
{
File = file;
}
from sharpmake.
Yep, after applying that patch to XCodeProj.cs the file is included correctly.
from sharpmake.
no official version generated yet but fix has been commited in 4872ee1
from sharpmake.
Related Issues (20)
- Question: How to copy files into a sub-dir of TargetCopyFilesPath HOT 5
- Comparison with Cake? HOT 1
- Will you add the ability to generate cmake? HOT 1
- Having Project Dependencies visible on Visual Studio? HOT 5
- Compile.ps1 does not work on Windows (Powershell 5.1 Desktop) HOT 1
- Unable to parse clang version HOT 3
- Unable to setup OutputType per target HOT 1
- Avoid duplication of targets in Solution and Project class
- CustomTargets wiki (Quick change) HOT 2
- Platform and Optimization extensibility HOT 6
- Is there a way to get the name of a custom platform, given its Sharpmake.Platform enum value? HOT 2
- Custom argument doesn't work HOT 4
- [Question] Is there support for clang compilation database? HOT 1
- Compilation Database Generation HOT 2
- IncludeSystemPaths are ignored in Makefile generator
- Publish to Nuget HOT 1
- CSharp project configuration name ignored
- Custom fragments causing issues when Target `Name` string is overriden HOT 2
- Solution<->Project configuration and target connection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpmake.