From ee755589356f77ef0a01540ba464f9a87d16fce4 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 16 Jul 2020 16:55:31 -0400 Subject: Running generators as separate premake project step (#1441) * Put the running of generators into a separate project, to try and sure the generated products are available for other dependencies when compiling with multiple threads on linux. * Made paths Strings in slang-generate. Made paths use / for path separators (rather than \ on windows which causes some problems with #line). * Make the run-generators proj a utility step. * Made run-generators a StaticLib. * Fix problem with generating when not necessary. * Trying to get abspath to work on linux. * Add run-generator-main.cpp dummy file. * Add comment about the issues around linux and correct build triggering. * Add updated projects. * Remove the run-generators-main.cpp as no longer needed for 'run-generators' tool. Removed the adding of files by default from baseSlangProject Made the run generators project use slang-string.cpp as the file it builds from core. * Add the run-generators VS project. --- source/slang/run-generators.vcxproj | 203 ++++++++++++++++++++++++++++ source/slang/run-generators.vcxproj.filters | 27 ++++ source/slang/slang.vcxproj | 42 +----- source/slang/slang.vcxproj.filters | 14 +- 4 files changed, 240 insertions(+), 46 deletions(-) create mode 100644 source/slang/run-generators.vcxproj create mode 100644 source/slang/run-generators.vcxproj.filters (limited to 'source') diff --git a/source/slang/run-generators.vcxproj b/source/slang/run-generators.vcxproj new file mode 100644 index 000000000..620d43039 --- /dev/null +++ b/source/slang/run-generators.vcxproj @@ -0,0 +1,203 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {811F1997-6DDA-0843-1692-818D022C53D3} + true + Win32Proj + run-generators + + + + StaticLibrary + true + Unicode + v140 + + + StaticLibrary + true + Unicode + v140 + + + StaticLibrary + false + Unicode + v140 + + + StaticLibrary + false + Unicode + v140 + + + + + + + + + + + + + + + + + + + ..\..\bin\windows-x86\debug\ + ..\..\intermediate\windows-x86\debug\run-generators\ + run-generators + .lib + + + ..\..\bin\windows-x64\debug\ + ..\..\intermediate\windows-x64\debug\run-generators\ + run-generators + .lib + + + ..\..\bin\windows-x86\release\ + ..\..\intermediate\windows-x86\release\run-generators\ + run-generators + .lib + + + ..\..\bin\windows-x64\release\ + ..\..\intermediate\windows-x64\release\run-generators\ + run-generators + .lib + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + EditAndContinue + Disabled + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + EditAndContinue + Disabled + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + + + Windows + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + + + Windows + true + true + + + + + + + + Document + "../../bin/windows-x86/debug/slang-generate" %(Identity) + "../../bin/windows-x64/debug/slang-generate" %(Identity) + "../../bin/windows-x86/release/slang-generate" %(Identity) + "../../bin/windows-x64/release/slang-generate" %(Identity) + core.meta.slang.h + slang-generate %(Identity) + ../../bin/windows-x86/debug/slang-generate.exe + ../../bin/windows-x64/debug/slang-generate.exe + ../../bin/windows-x86/release/slang-generate.exe + ../../bin/windows-x64/release/slang-generate.exe + + + Document + "../../bin/windows-x86/debug/slang-generate" %(Identity) + "../../bin/windows-x64/debug/slang-generate" %(Identity) + "../../bin/windows-x86/release/slang-generate" %(Identity) + "../../bin/windows-x64/release/slang-generate" %(Identity) + hlsl.meta.slang.h + slang-generate %(Identity) + ../../bin/windows-x86/debug/slang-generate.exe + ../../bin/windows-x64/debug/slang-generate.exe + ../../bin/windows-x86/release/slang-generate.exe + ../../bin/windows-x64/release/slang-generate.exe + + + Document + "../../bin/windows-x86/debug/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields + "../../bin/windows-x64/debug/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields + "../../bin/windows-x86/release/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields + "../../bin/windows-x64/release/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields + slang-ast-generated.h;slang-ast-generated-macro.h + slang-cpp-extractor AST %(Identity) + ../../bin/windows-x86/debug/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h + ../../bin/windows-x64/debug/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h + ../../bin/windows-x86/release/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h + ../../bin/windows-x64/release/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h + + + + + + \ No newline at end of file diff --git a/source/slang/run-generators.vcxproj.filters b/source/slang/run-generators.vcxproj.filters new file mode 100644 index 000000000..45b6e00b1 --- /dev/null +++ b/source/slang/run-generators.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + + + + Source Files + + + Source Files + + + Header Files + + + \ No newline at end of file diff --git a/source/slang/slang.vcxproj b/source/slang/slang.vcxproj index b92fb5967..65e0ba4aa 100644 --- a/source/slang/slang.vcxproj +++ b/source/slang/slang.vcxproj @@ -198,6 +198,7 @@ + @@ -384,45 +385,8 @@ - - Document - "../../bin/windows-x86/debug/slang-generate" %(Identity) - "../../bin/windows-x64/debug/slang-generate" %(Identity) - "../../bin/windows-x86/release/slang-generate" %(Identity) - "../../bin/windows-x64/release/slang-generate" %(Identity) - ../../core.meta.slang.h - slang-generate %(Identity) - ../../bin/windows-x86/debug/slang-generate.exe - ../../bin/windows-x64/debug/slang-generate.exe - ../../bin/windows-x86/release/slang-generate.exe - ../../bin/windows-x64/release/slang-generate.exe - - - Document - "../../bin/windows-x86/debug/slang-generate" %(Identity) - "../../bin/windows-x64/debug/slang-generate" %(Identity) - "../../bin/windows-x86/release/slang-generate" %(Identity) - "../../bin/windows-x64/release/slang-generate" %(Identity) - ../../hlsl.meta.slang.h - slang-generate %(Identity) - ../../bin/windows-x86/debug/slang-generate.exe - ../../bin/windows-x64/debug/slang-generate.exe - ../../bin/windows-x86/release/slang-generate.exe - ../../bin/windows-x64/release/slang-generate.exe - - - Document - "../../bin/windows-x86/debug/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields - "../../bin/windows-x64/debug/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields - "../../bin/windows-x86/release/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields - "../../bin/windows-x64/release/slang-cpp-extractor" -d %(RootDir)%(Directory)/ slang-ast-base.h slang-ast-decl.h slang-ast-expr.h slang-ast-modifier.h slang-ast-stmt.h slang-ast-type.h slang-ast-val.h -strip-prefix slang-ast- -o slang-ast-generated -output-fields - slang-ast-generated.h;slang-ast-generated-macro.h - slang-cpp-extractor AST %(Identity) - ../../bin/windows-x86/debug/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h - ../../bin/windows-x64/debug/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h - ../../bin/windows-x86/release/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h - ../../bin/windows-x64/release/slang-cpp-extractor.exe;slang-ast-base.h;slang-ast-decl.h;slang-ast-expr.h;slang-ast-modifier.h;slang-ast-stmt.h;slang-ast-type.h;slang-ast-val.h - + + diff --git a/source/slang/slang.vcxproj.filters b/source/slang/slang.vcxproj.filters index 855b3fb7b..7b26d8ee1 100644 --- a/source/slang/slang.vcxproj.filters +++ b/source/slang/slang.vcxproj.filters @@ -45,6 +45,9 @@ Header Files + + Header Files + Header Files @@ -595,15 +598,12 @@ - + Source Files - - + + Source Files - - - Header Files - + -- cgit v1.2.3