Browse Source

chore: fix includes, flags

Sam Jaffe 1 year ago
parent
commit
a41327180c

+ 5 - 5
include/math/matrix/matrix.hpp

@@ -7,12 +7,12 @@
 
 #pragma once
 
-#include "expect/expect.hpp"
-#include "math/vector/vector.hpp"
+#include <expect/expect.hpp>
+#include <math/vector/vector.hpp>
 
-#include "forward.h"
-#include "row_reference.hpp"
-#include "traits.hpp"
+#include "math/matrix/forward.h"
+#include "math/matrix/row_reference.hpp"
+#include "math/matrix/traits.hpp"
 
 #define MATRIX_DISABLE_IF_MATRIX(_type, t, r, c)                               \
   typename std::enable_if<!is_matrix<_type>::value, matrix<t, r, c>>::type

+ 1 - 1
include/math/matrix/matrix_helpers.hpp

@@ -7,7 +7,7 @@
 
 #pragma once
 
-#include "matrix.hpp"
+#include "math/matrix/matrix.hpp"
 
 namespace math { namespace matrix {
 

+ 2 - 2
include/math/matrix/row_reference.hpp

@@ -3,8 +3,8 @@
 #include <cstdlib>
 #include <stdexcept>
 
-#include "expect/expect.hpp"
-#include "math/vector/vector.hpp"
+#include <expect/expect.hpp>
+#include <math/vector/vector.hpp>
 
 namespace math { namespace matrix {
   template <typename T, size_t C> class row_reference {

+ 1 - 1
include/math/matrix/traits.hpp

@@ -1,6 +1,6 @@
 #pragma once
 
-#include "forward.h"
+#include "math/matrix/forward.h"
 
 namespace math { namespace matrix {
 

+ 233 - 2
matrix.xcodeproj/project.pbxproj

@@ -49,6 +49,48 @@
 			remoteGlobalIDString = 05818F851A685AEA0072A469;
 			remoteInfo = GoogleMock;
 		};
+		CDAE62532B77B8DF00551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = CD10425824E837FB00C0DF2A;
+			remoteInfo = "vector-test";
+		};
+		CDAE62552B77B8DF00551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = CDAE62452B77B8A800551FB8;
+			remoteInfo = vector;
+		};
+		CDAE62572B77B8E600551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = CDAE62442B77B8A800551FB8;
+			remoteInfo = vector;
+		};
+		CDAE62DB2B77BAAB00551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = CDD476BD29C5423B00BDB829;
+			remoteInfo = expect;
+		};
+		CDAE62DD2B77BAAB00551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = CDEC1E8A235248390091D9F2;
+			remoteInfo = "expect-test";
+		};
+		CDAE62DF2B77BAB900551FB8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = CDD476BC29C5423B00BDB829;
+			remoteInfo = expect;
+		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
@@ -58,6 +100,9 @@
 		CD0C59E020C4314B00454F82 /* matrix_helper_test.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = matrix_helper_test.cxx; sourceTree = "<group>"; };
 		CD10426E24E8756100C0DF2A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		CD10426F24E8757B00C0DF2A /* math */ = {isa = PBXFileReference; lastKnownFileType = folder; name = math; path = include/math; sourceTree = "<group>"; };
+		CDAE62392B77B88A00551FB8 /* libmatrix.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmatrix.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = vector.xcodeproj; path = ../vector/vector.xcodeproj; sourceTree = "<group>"; };
+		CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = expect.xcodeproj; path = ../expect/expect.xcodeproj; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -69,6 +114,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		CDAE62372B77B88A00551FB8 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
@@ -86,6 +138,8 @@
 		CD0E42701D9B38A9002FFED1 = {
 			isa = PBXGroup;
 			children = (
+				CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */,
+				CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */,
 				CD0C59BD20C4127400454F82 /* GoogleMock.xcodeproj */,
 				CD10426F24E8757B00C0DF2A /* math */,
 				CD7820301E44F42B001D22E5 /* test */,
@@ -98,6 +152,7 @@
 			isa = PBXGroup;
 			children = (
 				CD0C59D120C412AD00454F82 /* matrix-test.xctest */,
+				CDAE62392B77B88A00551FB8 /* libmatrix.a */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -119,8 +174,36 @@
 			path = test;
 			sourceTree = "<group>";
 		};
+		CDAE624F2B77B8DF00551FB8 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				CDAE62542B77B8DF00551FB8 /* vector-test.xctest */,
+				CDAE62562B77B8DF00551FB8 /* libvector.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		CDAE62D72B77BAAB00551FB8 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				CDAE62DC2B77BAAB00551FB8 /* libexpect.a */,
+				CDAE62DE2B77BAAB00551FB8 /* expect-test.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
+/* Begin PBXHeadersBuildPhase section */
+		CDAE62352B77B88A00551FB8 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
 /* Begin PBXNativeTarget section */
 		CD0C59D020C412AD00454F82 /* matrix-test */ = {
 			isa = PBXNativeTarget;
@@ -140,6 +223,26 @@
 			productReference = CD0C59D120C412AD00454F82 /* matrix-test.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
+		CDAE62382B77B88A00551FB8 /* matrix */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = CDAE623F2B77B88A00551FB8 /* Build configuration list for PBXNativeTarget "matrix" */;
+			buildPhases = (
+				CDAE62352B77B88A00551FB8 /* Headers */,
+				CDAE62362B77B88A00551FB8 /* Sources */,
+				CDAE62372B77B88A00551FB8 /* Frameworks */,
+				CDAE62402B77B89700551FB8 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				CDAE62E02B77BAB900551FB8 /* PBXTargetDependency */,
+				CDAE62582B77B8E600551FB8 /* PBXTargetDependency */,
+			);
+			name = matrix;
+			productName = matrix;
+			productReference = CDAE62392B77B88A00551FB8 /* libmatrix.a */;
+			productType = "com.apple.product-type.library.static";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -152,6 +255,10 @@
 					CD0C59D020C412AD00454F82 = {
 						CreatedOnToolsVersion = 7.2.1;
 					};
+					CDAE62382B77B88A00551FB8 = {
+						CreatedOnToolsVersion = 13.4.1;
+						ProvisioningStyle = Automatic;
+					};
 				};
 			};
 			buildConfigurationList = CD0E42741D9B38A9002FFED1 /* Build configuration list for PBXProject "matrix" */;
@@ -166,14 +273,23 @@
 			productRefGroup = CD0E427A1D9B38A9002FFED1 /* Products */;
 			projectDirPath = "";
 			projectReferences = (
+				{
+					ProductGroup = CDAE62D72B77BAAB00551FB8 /* Products */;
+					ProjectRef = CDAE62D62B77BAAB00551FB8 /* expect.xcodeproj */;
+				},
 				{
 					ProductGroup = CD0C59BE20C4127400454F82 /* Products */;
 					ProjectRef = CD0C59BD20C4127400454F82 /* GoogleMock.xcodeproj */;
 				},
+				{
+					ProductGroup = CDAE624F2B77B8DF00551FB8 /* Products */;
+					ProjectRef = CDAE624E2B77B8DF00551FB8 /* vector.xcodeproj */;
+				},
 			);
 			projectRoot = "";
 			targets = (
 				CD0C59D020C412AD00454F82 /* matrix-test */,
+				CDAE62382B77B88A00551FB8 /* matrix */,
 			);
 		};
 /* End PBXProject section */
@@ -207,6 +323,34 @@
 			remoteRef = CD0C59CA20C4127400454F82 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
+		CDAE62542B77B8DF00551FB8 /* vector-test.xctest */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.cfbundle;
+			path = "vector-test.xctest";
+			remoteRef = CDAE62532B77B8DF00551FB8 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDAE62562B77B8DF00551FB8 /* libvector.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libvector.a;
+			remoteRef = CDAE62552B77B8DF00551FB8 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDAE62DC2B77BAAB00551FB8 /* libexpect.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libexpect.a;
+			remoteRef = CDAE62DB2B77BAAB00551FB8 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDAE62DE2B77BAAB00551FB8 /* expect-test.xctest */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.cfbundle;
+			path = "expect-test.xctest";
+			remoteRef = CDAE62DD2B77BAAB00551FB8 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
@@ -220,6 +364,26 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
+/* Begin PBXShellScriptBuildPhase section */
+		CDAE62402B77B89700551FB8 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+			);
+			outputFileListPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "mkdir -p ${BUILT_PRODUCTS_DIR}/usr/local/include/\ncp -r ${PROJECT_DIR}/include/* ${BUILT_PRODUCTS_DIR}/usr/local/include/\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
 /* Begin PBXSourcesBuildPhase section */
 		CD0C59CD20C412AD00454F82 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
@@ -230,6 +394,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		CDAE62362B77B88A00551FB8 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
@@ -238,6 +409,16 @@
 			name = GoogleMock;
 			targetProxy = CD0C59DC20C412BF00454F82 /* PBXContainerItemProxy */;
 		};
+		CDAE62582B77B8E600551FB8 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = vector;
+			targetProxy = CDAE62572B77B8E600551FB8 /* PBXContainerItemProxy */;
+		};
+		CDAE62E02B77BAB900551FB8 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = expect;
+			targetProxy = CDAE62DF2B77BAB900551FB8 /* PBXContainerItemProxy */;
+		};
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
@@ -311,11 +492,12 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/include";
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "include/ extern/vector/include/ extern/expect/include/";
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include";
 				WARNING_CFLAGS = "-Wno-gnu-zero-variadic-macro-arguments";
 			};
 			name = Debug;
@@ -362,14 +544,54 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/include";
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "include/ extern/vector/include/ extern/expect/include/";
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include";
 				WARNING_CFLAGS = "-Wno-gnu-zero-variadic-macro-arguments";
 			};
 			name = Release;
 		};
+		CDAE623A2B77B88A00551FB8 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				EXECUTABLE_PREFIX = lib;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				MACOSX_DEPLOYMENT_TARGET = 12.3;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		CDAE623B2B77B88A00551FB8 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				EXECUTABLE_PREFIX = lib;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				MACOSX_DEPLOYMENT_TARGET = 12.3;
+				MTL_FAST_MATH = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -391,6 +613,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		CDAE623F2B77B88A00551FB8 /* Build configuration list for PBXNativeTarget "matrix" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				CDAE623A2B77B88A00551FB8 /* Debug */,
+				CDAE623B2B77B88A00551FB8 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = CD0E42711D9B38A9002FFED1 /* Project object */;