Browse Source

Switch to using submodules.
Move vector.hpp into include/vector/ directory.

Sam Jaffe 5 years ago
parent
commit
3a56aa98fa

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "extern/expect"]
+	path = extern/expect
+	url = https://gogs.sjaffe.name/sjjaffe/cpp-expect.git

+ 1 - 0
extern/expect

@@ -0,0 +1 @@
+Subproject commit f096edddd9d8eb2ba07c2dd7ec385500c0576214

vector.hpp → include/vector/vector.hpp


+ 1 - 1
vector_test.cpp

@@ -7,7 +7,7 @@
 
 #include <gmock/gmock.h>
 
-#include "vector.hpp"
+#include "vector/vector.hpp"
 
 template <typename T, size_t N>
 math::vector::vector<T, N> iota() {

+ 2 - 4
vector_test/Info.plist

@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
@@ -13,11 +13,9 @@
 	<key>CFBundleName</key>
 	<string>$(PRODUCT_NAME)</string>
 	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
+	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 </dict>

+ 71 - 90
vector.xcodeproj/project.pbxproj

@@ -7,8 +7,8 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD0C59A420C31D2B00454F82 /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD0C598220C31CC300454F82 /* GoogleMock.framework */; };
-		CD0C59A520C31D3B00454F82 /* vector_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD0C598920C31CD300454F82 /* vector_test.cpp */; };
+		CD10426124E8380600C0DF2A /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD0C598220C31CC300454F82 /* GoogleMock.framework */; };
+		CD10426224E8382400C0DF2A /* vector_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CD10423624E836A700C0DF2A /* vector_test.cxx */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -40,29 +40,22 @@
 			remoteGlobalIDString = 05818F901A685AEA0072A469;
 			remoteInfo = GoogleMockTests;
 		};
-		CD0C59A220C31D2600454F82 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = CD0C597A20C31CC300454F82 /* GoogleMock.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 05818F851A685AEA0072A469;
-			remoteInfo = GoogleMock;
-		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
 		CD0C597A20C31CC300454F82 /* GoogleMock.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GoogleMock.xcodeproj; path = "../../../gmock-xcode-master/GoogleMock.xcodeproj"; sourceTree = "<group>"; };
-		CD0C598920C31CD300454F82 /* vector_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = vector_test.cpp; sourceTree = "<group>"; };
-		CD0C599720C31D1900454F82 /* vector_test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = vector_test.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-		CD0C599B20C31D1900454F82 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = vector_test/Info.plist; sourceTree = "<group>"; };
-		CDFFC7A81D62296200E9528B /* vector.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = vector.hpp; sourceTree = "<group>"; };
+		CD10423624E836A700C0DF2A /* vector_test.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vector_test.cxx; sourceTree = "<group>"; };
+		CD10423E24E836BD00C0DF2A /* vector */ = {isa = PBXFileReference; lastKnownFileType = folder; name = vector; path = include/vector; sourceTree = "<group>"; };
+		CD10425824E837FB00C0DF2A /* vector-test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "vector-test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		CD10425C24E837FB00C0DF2A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
-		CD0C599420C31D1900454F82 /* Frameworks */ = {
+		CD10425524E837FB00C0DF2A /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD0C59A420C31D2B00454F82 /* GoogleMock.framework in Frameworks */,
+				CD10426124E8380600C0DF2A /* GoogleMock.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -73,16 +66,18 @@
 			isa = PBXGroup;
 			children = (
 				CD0C597A20C31CC300454F82 /* GoogleMock.xcodeproj */,
-				CD78202D1E44F40F001D22E5 /* src */,
-				CD78202E1E44F414001D22E5 /* test */,
+				CD10423E24E836BD00C0DF2A /* vector */,
+				CD10423524E836A700C0DF2A /* test */,
+				CD10425924E837FB00C0DF2A /* vector-test */,
 				0E5DFDF41BB4D5040063976E /* Products */,
+				CD10426024E8380600C0DF2A /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
 		0E5DFDF41BB4D5040063976E /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				CD0C599720C31D1900454F82 /* vector_test.xctest */,
+				CD10425824E837FB00C0DF2A /* vector-test.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -98,42 +93,47 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		CD78202D1E44F40F001D22E5 /* src */ = {
+		CD10423524E836A700C0DF2A /* test */ = {
+			isa = PBXGroup;
+			children = (
+				CD10423624E836A700C0DF2A /* vector_test.cxx */,
+			);
+			path = test;
+			sourceTree = "<group>";
+		};
+		CD10425924E837FB00C0DF2A /* vector-test */ = {
 			isa = PBXGroup;
 			children = (
-				CDFFC7A81D62296200E9528B /* vector.hpp */,
+				CD10425C24E837FB00C0DF2A /* Info.plist */,
 			);
-			name = src;
+			path = "vector-test";
 			sourceTree = "<group>";
 		};
-		CD78202E1E44F414001D22E5 /* test */ = {
+		CD10426024E8380600C0DF2A /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				CD0C598920C31CD300454F82 /* vector_test.cpp */,
-				CD0C599B20C31D1900454F82 /* Info.plist */,
 			);
-			name = test;
+			name = Frameworks;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		CD0C599620C31D1900454F82 /* vector_test */ = {
+		CD10425724E837FB00C0DF2A /* vector-test */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = CD0C599F20C31D1900454F82 /* Build configuration list for PBXNativeTarget "vector_test" */;
+			buildConfigurationList = CD10425D24E837FB00C0DF2A /* Build configuration list for PBXNativeTarget "vector-test" */;
 			buildPhases = (
-				CD0C599320C31D1900454F82 /* Sources */,
-				CD0C599420C31D1900454F82 /* Frameworks */,
-				CD0C599520C31D1900454F82 /* Resources */,
+				CD10425424E837FB00C0DF2A /* Sources */,
+				CD10425524E837FB00C0DF2A /* Frameworks */,
+				CD10425624E837FB00C0DF2A /* Resources */,
 			);
 			buildRules = (
 			);
 			dependencies = (
-				CD0C59A320C31D2600454F82 /* PBXTargetDependency */,
 			);
-			name = vector_test;
-			productName = vector_test;
-			productReference = CD0C599720C31D1900454F82 /* vector_test.xctest */;
+			name = "vector-test";
+			productName = "vector-test";
+			productReference = CD10425824E837FB00C0DF2A /* vector-test.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
 /* End PBXNativeTarget section */
@@ -144,8 +144,9 @@
 			attributes = {
 				LastUpgradeCheck = 1030;
 				TargetAttributes = {
-					CD0C599620C31D1900454F82 = {
-						CreatedOnToolsVersion = 7.2.1;
+					CD10425724E837FB00C0DF2A = {
+						CreatedOnToolsVersion = 11.3.1;
+						ProvisioningStyle = Automatic;
 					};
 				};
 			};
@@ -168,7 +169,7 @@
 			);
 			projectRoot = "";
 			targets = (
-				CD0C599620C31D1900454F82 /* vector_test */,
+				CD10425724E837FB00C0DF2A /* vector-test */,
 			);
 		};
 /* End PBXProject section */
@@ -205,7 +206,7 @@
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
-		CD0C599520C31D1900454F82 /* Resources */ = {
+		CD10425624E837FB00C0DF2A /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
@@ -215,24 +216,16 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
-		CD0C599320C31D1900454F82 /* Sources */ = {
+		CD10425424E837FB00C0DF2A /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD0C59A520C31D3B00454F82 /* vector_test.cpp in Sources */,
+				CD10426224E8382400C0DF2A /* vector_test.cxx in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
-/* Begin PBXTargetDependency section */
-		CD0C59A320C31D2600454F82 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = GoogleMock;
-			targetProxy = CD0C59A220C31D2600454F82 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
 /* Begin XCBuildConfiguration section */
 		0E5DFDD21BB4D3360063976E /* Debug */ = {
 			isa = XCBuildConfiguration;
@@ -267,7 +260,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = ../../paradigm/declarative/expect/include/;
+				USER_HEADER_SEARCH_PATHS = "include/ extern/expect/include/";
 				WARNING_CFLAGS = "-Wno-gnu-zero-variadic-macro-arguments";
 			};
 			name = Debug;
@@ -303,88 +296,76 @@
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = ../../paradigm/declarative/expect/include/;
+				USER_HEADER_SEARCH_PATHS = "include/ extern/expect/include/";
 				WARNING_CFLAGS = "-Wno-gnu-zero-variadic-macro-arguments";
 			};
 			name = Release;
 		};
-		CD0C59A020C31D1900454F82 /* Debug */ = {
+		CD10425E24E837FB00C0DF2A /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CODE_SIGN_IDENTITY = "-";
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
 				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUG=1",
 					"$(inherited)",
 				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				INFOPLIST_FILE = vector_test/Info.plist;
+				INFOPLIST_FILE = "vector-test/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
-				MTL_ENABLE_DEBUG_INFO = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.vector-test";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Debug;
 		};
-		CD0C59A120C31D1900454F82 /* Release */ = {
+		CD10425F24E837FB00C0DF2A /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CODE_SIGN_IDENTITY = "-";
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = NO;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				INFOPLIST_FILE = vector_test/Info.plist;
+				INFOPLIST_FILE = "vector-test/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
 				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.vector-test";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
@@ -402,11 +383,11 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		CD0C599F20C31D1900454F82 /* Build configuration list for PBXNativeTarget "vector_test" */ = {
+		CD10425D24E837FB00C0DF2A /* Build configuration list for PBXNativeTarget "vector-test" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				CD0C59A020C31D1900454F82 /* Debug */,
-				CD0C59A120C31D1900454F82 /* Release */,
+				CD10425E24E837FB00C0DF2A /* Debug */,
+				CD10425F24E837FB00C0DF2A /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;

+ 7 - 4
vector.xcodeproj/xcuserdata/samjaffe.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -4,12 +4,10 @@
 <dict>
 	<key>SchemeUserState</key>
 	<dict>
-		<key>vector_test.xcscheme</key>
+		<key>vector-test.xcscheme_^#shared#^_</key>
 		<dict>
-			<key>isShown</key>
-			<false/>
 			<key>orderHint</key>
-			<integer>36</integer>
+			<integer>51</integer>
 		</dict>
 	</dict>
 	<key>SuppressBuildableAutocreation</key>
@@ -34,6 +32,11 @@
 			<key>primary</key>
 			<true/>
 		</dict>
+		<key>CD10423F24E8373500C0DF2A</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
 	</dict>
 </dict>
 </plist>