Comments (1)
Hello again,
Today, I found a relatively easy fix with an custom override, but certain conditions must be met for it to work. I've set objdir
globally under the solution (workspace) with this value "%{wks.location}/Cache/%{prj.name}/%{cfg.buildcfg}"
. So I don't need to set it per project anyway.
Than, I tried to set Output Files
under Project Properties
and realized that they are stored separately under the global ClCompile
.
It looks like this in the project file:
Notice that Premake updates these properties in the project file:
So it seems that the settings don't interfere, which is nice.
It also looks like that Premake with this new approach doesn't generate the numbered object files, which is also a nice side effect.
--
-- @brief Visual Studio: Bugfix for C++ Modules (same module file name per project)
--
require("vstudio")
premake.override(premake.vstudio.vc2010.elements, "clCompile", function(base, prj)
local m = premake.vstudio.vc2010
local calls = base(prj)
if premake.project.iscpp(prj) then
table.insertafter(calls, premake.xmlDeclaration, function()
premake.w('<ModuleDependenciesFile>$(IntDir)\\%%(RelativeDir)</ModuleDependenciesFile>')
premake.w('<ModuleOutputFile>$(IntDir)\\%%(RelativeDir)</ModuleOutputFile>')
premake.w('<ObjectFileName>$(IntDir)\\%%(RelativeDir)</ObjectFileName>')
end)
end
return calls
end)
from premake-core.
Related Issues (20)
- XCode does not show linked Libraries HOT 8
- Premake 6
- [VS] Source Build Help HOT 4
- Error while building Premake 5 on CentOS 7 HOT 6
- xcode4 bug with generated file with same name, but different path
- How to handle conflicting API (in external modules)?
- Issue trying to fix x86 Linux build
- configmap for externalproject does not map correctly HOT 1
- The Makefile generated by `premake5 gmake2` calls `sh.exe` HOT 9
- Api in _preload.lua inaccessible HOT 6
- It would be nice to have better error identification. HOT 3
- Make failing Command Tokens fail the build HOT 1
- Visual Studio "Previous IPDB not found, fall back to full compilation." HOT 3
- Premake system toolset selection issue HOT 5
- Configuration filters don't work correctly for postbuildcommands in C# projects HOT 1
- Linking ".a" archive file is unsupported. HOT 2
- startproject ignored if workspace is set to the same name as another project within the workspace HOT 2
- Deprecation language in docs is not clear. HOT 1
- Is CodeCoverage Flags working for gmake2 g++ HOT 1
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 premake-core.