From c84e7c0fa526de51f380227a6667f723af36aea2 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 25 Apr 2019 08:51:12 -0400 Subject: Fixed building on CygWin with clang gcc (#953) * * Make Path:: use lowerCamel method names as per coding standard * Small improvements to make closer to standard * GetDirectoryName -> getParentDirectory - previous method name's action was somewhat unclear, hopefully this is better * * Can build on clang and gcc on CygWin * Fix problem on cygwin loading shared libraries * Renamed Path::isRelative to ::hasRelativeElement because isRelative implies the path is 'relative to the current path' and which isn't quite what it does * Documented how to build for CygWin * * Fix small bug creating platform shared library name. * Small typo fixes in building.md --- tools/slang-test/unit-test-path.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/tools/slang-test/unit-test-path.cpp b/tools/slang-test/unit-test-path.cpp index 2ad66792f..35462f703 100644 --- a/tools/slang-test/unit-test-path.cpp +++ b/tools/slang-test/unit-test-path.cpp @@ -38,21 +38,21 @@ static void pathUnitTest() SLANG_CHECK(Path::simplify("tests/preprocessor/.\\pragma-once-a.h") == "tests/preprocessor/pragma-once-a.h"); - SLANG_CHECK(Path::isRelative(".")); - SLANG_CHECK(Path::isRelative("..")); - SLANG_CHECK(Path::isRelative("blah/..")); + SLANG_CHECK(Path::hasRelativeElement(".")); + SLANG_CHECK(Path::hasRelativeElement("..")); + SLANG_CHECK(Path::hasRelativeElement("blah/..")); - SLANG_CHECK(Path::isRelative("blah/.././a")); - SLANG_CHECK(Path::isRelative("a") == false); - SLANG_CHECK(Path::isRelative("blah/a") == false); - SLANG_CHECK(Path::isRelative("a:\\blah/a") == false); + SLANG_CHECK(Path::hasRelativeElement("blah/.././a")); + SLANG_CHECK(Path::hasRelativeElement("a") == false); + SLANG_CHECK(Path::hasRelativeElement("blah/a") == false); + SLANG_CHECK(Path::hasRelativeElement("a:\\blah/a") == false); - SLANG_CHECK(Path::isRelative("a:/what/.././../is/./../this/.")); + SLANG_CHECK(Path::hasRelativeElement("a:/what/.././../is/./../this/.")); - SLANG_CHECK(Path::isRelative("a:/what/.././../is/./../this/./")); + SLANG_CHECK(Path::hasRelativeElement("a:/what/.././../is/./../this/./")); - SLANG_CHECK(Path::isRelative("a:\\what\\..\\.\\..\\is\\.\\..\\this\\.\\")); + SLANG_CHECK(Path::hasRelativeElement("a:\\what\\..\\.\\..\\is\\.\\..\\this\\.\\")); } -- cgit v1.2.3