Skip to content

Commit 3a5159a

Browse files
authored
Fix license email, update testing, enable sort using in lint (#6)
* Fix email address in license * Format CMakeLists.txt * Enable sort using * Update testing setup
1 parent 2482622 commit 3a5159a

23 files changed

+70
-59
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ NamespaceIndentation: All
4040
PenaltyBreakComment: 20
4141
PenaltyExcessCharacter: 5
4242
PointerAlignment: Middle
43-
SortUsingDeclarations: false
43+
SortUsingDeclarations: true
4444
SpaceAfterTemplateKeyword: false
4545
SpaceBeforeCpp11BracedList: true
4646
SpacesBeforeTrailingComments: 1

.github/workflows/ci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- synchronize
1313

1414
jobs:
15+
# Tests disabled because ci doesn't have opengl, need to find a fix for that
1516
# test:
1617
# runs-on: ubuntu-latest
1718

@@ -25,18 +26,18 @@ jobs:
2526
# run: pip install gcovr
2627

2728
# - name: Setup project
28-
# run: cmake -S ${TEST_DIR} -B ${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug
29+
# run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
2930

3031
# - name: Build
31-
# run: cmake --build ${BUILD_DIR}
32+
# run: cmake --build build
3233

33-
# # - name: Test
34-
# # working-directory: build
35-
# # run: ctest -V
36-
37-
# - name: Test with Coverage
34+
# - name: Test
3835
# working-directory: build
39-
# run: cmake --build ${BUILD_DIR} --target os_test_coverage
36+
# run: ctest -V
37+
38+
# # - name: Test with Coverage
39+
# # working-directory: build
40+
# # run: cmake --build ${BUILD_DIR} --target os_test_coverage
4041

4142
lint:
4243
runs-on: ubuntu-latest

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929
"ignoreFailures": true
3030
}
3131
]
32+
},
33+
// https://stackoverflow.com/a/76447033
34+
{
35+
"name": "(ctest) Launch",
36+
"type": "cppdbg",
37+
"cwd": "${cmake.testWorkingDirectory}",
38+
"request": "launch",
39+
"program": "${cmake.testProgram}",
40+
"args": [
41+
"${cmake.testArgs}"
42+
]
3243
}
3344
]
3445
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"cmake.ctest.testSuiteDelimiter": "\\.",
3+
"cmake.ctest.testExplorerIntegrationEnabled": true
4+
}

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ project(glpp
66
LANGUAGES CXX)
77

88
set(GLPP_IS_MASTER_PROJECT OFF)
9-
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
9+
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
1010
set(GLPP_IS_MASTER_PROJECT ON)
1111
endif()
12-
12+
1313
option(GLPP_BUILD_DOCS "Builds the glpp documentation" ${GLPP_IS_MASTER_PROJECT})
1414
option(GLPP_BUILD_EXAMPLES "Builds the glpp examples" ${GLPP_IS_MASTER_PROJECT})
1515
option(GLPP_BUILD_TESTS "Builds the glpp tests" ${GLPP_IS_MASTER_PROJECT})
@@ -43,7 +43,7 @@ endif()
4343
include(GNUInstallDirs)
4444

4545
# Create config.h with project version numbers
46-
configure_File(cmake/config.h.in include/config.h)
46+
configure_file(cmake/config.h.in include/config.h)
4747
include_directories(PRIVATE ${CMAKE_BINARY_DIR}/include)
4848

4949
find_package(OpenGL REQUIRED)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright 2021 Thomas Harrison <automas-dev@vt.edu>
3+
Copyright 2021 Thomas Harrison <theharrisoncrafter@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ lint:
2828
format:
2929
@find src include examples tests -name '*.c' -or -name '*.h' -or -name '*.cpp' -or -name '*.hpp' | xargs clang-format -i --Werror --sort-includes
3030

31-
.PHONY: config build install lint format
31+
test:
32+
cmake --build $(PWD)/build --target test
33+
34+
.PHONY: config build install lint format test

external/glm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include(FetchContent)
33
FetchContent_Declare(
44
glm
55
GIT_REPOSITORY https://github.com/g-truc/glm.git
6-
GIT_TAG 1.0.1
6+
GIT_TAG 1.0.2
77
)
88

99
set(USE_SYSTEM_GLM ON)

external/gtest.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
include(FetchContent)
12

23
FetchContent_Declare(
34
googletest
45
GIT_REPOSITORY https://github.com/google/googletest.git
5-
GIT_TAG release-1.12.1
6+
GIT_TAG v1.15.2
67
)
78

8-
# if(NOT glm_POPULATED)
99
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
1010
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
1111
set(BUILD_GTEST ON CACHE BOOL "" FORCE)

include/glpp/Buffer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include <vector>
1111

1212
namespace glpp {
13-
using std::vector;
1413
using std::shared_ptr;
14+
using std::vector;
1515

1616
/**
1717
* A single array buffer.

0 commit comments

Comments
 (0)