diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-10-26 17:27:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 17:27:45 -0400 |
| commit | 56c9de0ae0f0b37d0c5f50f2b39d6c18362642bb (patch) | |
| tree | 96fd5e73670631b275ea16aba8f638e0ae31ac11 | |
| parent | 36742ae0ad8b11e5ae6c2c0c7531b272800e5ff6 (diff) | |
Premake improvements (#696)
* Make CacheFileSystem dtor virtual.
* Fixing problems around build.linux and windows intermediate files being placed in obj.
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | premake5.lua | 24 | ||||
| -rw-r--r-- | source/slang/slang-file-system.h | 2 |
3 files changed, 18 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index ad99e1d70..206dfca5e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ *.sdf bin/ intermediate/ -obj/ +build.*/ # Files generated by test runner. # diff --git a/premake5.lua b/premake5.lua index 7f83c8904..b1992cc79 100644 --- a/premake5.lua +++ b/premake5.lua @@ -53,19 +53,15 @@ workspace "slang" configurations { "Debug", "Release" } platforms { "x86", "x64" } - --filter { "system:linux" } - -- location("build.linux") + if os.target() == "windows" then + else + location("build." .. os.target()) + end -- The output binary directory will be derived from the OS -- and configuration options, e.g. `bin/windows-x64/debug/` targetdir "bin/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}" - -- The intermediate ("object") directory will use a similar - -- naming scheme to the output directory, but will also use - -- the project name to avoid cases where multiple projects - -- have source files with the same name. - objdir "intermediate/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}/%{prj.name}" - -- Statically link to the C/C++ runtime rather than create a DLL dependency. flags { "StaticRuntime" } @@ -199,7 +195,19 @@ function baseSlangProject(name, baseDir) -- TODO: consider only setting this for examples, since -- it is less relevant to other projects. -- + location(projectDir) + + if os.target() == "windows" then + else + location "intermediate/project/%{prj.name}" + end + + -- The intermediate ("object") directory will use a similar + -- naming scheme to the output directory, but will also use + -- the project name to avoid cases where multiple projects + -- have source files with the same name. + objdir "intermediate/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}/%{prj.name}" -- All of our projects are written in C++. -- diff --git a/source/slang/slang-file-system.h b/source/slang/slang-file-system.h index c1358654a..aa216e6b0 100644 --- a/source/slang/slang-file-system.h +++ b/source/slang/slang-file-system.h @@ -105,7 +105,7 @@ class CacheFileSystem: public ISlangFileSystemExt /// Ctor CacheFileSystem(ISlangFileSystem* fileSystem, bool useSimplifyForCanonicalPath = false); /// Dtor - ~CacheFileSystem(); + virtual ~CacheFileSystem(); static CompressedResult toCompressedResult(Result res); static Result toResult(CompressedResult compRes) { return s_compressedResultToResult[int(compRes)]; } |
