diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-06-14 12:20:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-14 12:20:12 -0400 |
| commit | 8c56d83506ef92b15b15bdb5969008dd69c8d2a6 (patch) | |
| tree | b58218a85c108b49c2ce74f77e1f3de8c668ef21 /tools/slang-test | |
| parent | 7461e95210e7420d0ddf681279813f394a6fd0d8 (diff) | |
CPPCompiler improvements (#984)
* Removed the need for VisualStudio specific CPPCompiler
Improved the version parsing for gcc/clang
Removed need for slang-unix-cpp-compiler-util.cpp/.h
Remove binary before compiling in the compile c tests
* Moved VisualStudio calcArgs into CPPCompilerUtil - as code is not windows specific.
* Set up compile time version for gcc and clang
* Fix compilation on OSX - use remove instead of unlink for file deletion.
* On OSX - clang uses different string format.
* Removed /bin/sh invoking as not required for OSX.
Diffstat (limited to 'tools/slang-test')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index fdd5cd13d..0777c31f2 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -20,12 +20,6 @@ using namespace Slang; #include "../../source/core/slang-cpp-compiler.h" -#ifdef _WIN32 -# include "../../source/core/windows/slang-win-visual-studio-util.h" -#else -# include "../../source/core/unix/slang-unix-cpp-compiler-util.h" -#endif - #include "../../source/core/slang-process-util.h" #define STB_IMAGE_IMPLEMENTATION @@ -1120,6 +1114,15 @@ static TestResult runExecuteC(TestContext* context, TestInput& input) String modulePath = Path::combine(directory, moduleName); + // Remove the binary.. + { + StringBuilder moduleExePath; + moduleExePath << modulePath; + moduleExePath << ProcessUtil::getExecutableSuffix(); + File::remove(moduleExePath); + } + + // Set up the compilation options CPPCompiler::CompileOptions options; // Compile this source |
