Skip to content

Commit 101a9ea

Browse files
committed
clang format
1 parent e9f31d8 commit 101a9ea

File tree

7 files changed

+1581
-1776
lines changed

7 files changed

+1581
-1776
lines changed

.clang-format

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
BasedOnStyle: Google
3+
4+
...

.gitignore

+40-38
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
# Prerequisites
2-
*.d
3-
4-
# Compiled Object files
5-
*.slo
6-
*.lo
7-
*.o
8-
*.obj
9-
10-
# Precompiled Headers
11-
*.gch
12-
*.pch
13-
14-
# Compiled Dynamic libraries
15-
*.so
16-
*.dylib
17-
*.dll
18-
19-
# Fortran module files
20-
*.mod
21-
*.smod
22-
23-
# Compiled Static libraries
24-
*.lai
25-
*.la
26-
*.a
27-
*.lib
28-
29-
# Executables
30-
*.exe
31-
*.out
32-
*.app
33-
*.sqlite
34-
*.db
35-
*.opendb
36-
*.ipch
37-
38-
.vs
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
*.sqlite
34+
*.db
35+
*.opendb
36+
*.ipch
37+
38+
.vs
39+
build/
40+
ipch/

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cmake.configureOnOpen": true
3+
}

CMakeLists.txt

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Copyright (C) 2018 Tommy Hinks <tommy.hinks@gmail.com>
2-
# This file is subject to the license terms in the LICENSE file
3-
# found in the top-level directory of this distribution.
4-
5-
cmake_minimum_required(VERSION 3.1)
6-
project(obj_io)
7-
8-
set(header_files
9-
${CMAKE_CURRENT_SOURCE_DIR}/include/thinks/obj_io/obj_io.h
10-
)
11-
add_library(thinks_obj_io INTERFACE)
12-
target_sources(thinks_obj_io INTERFACE ${header_files})
13-
target_include_directories(thinks_obj_io INTERFACE include)
14-
#if(MSVC)
15-
# target_compile_definitions(thinks_obj_io INTERFACE "-D_SCL_SECURE_NO_WARNINGS")
16-
#endif()
17-
18-
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
19-
enable_testing()
20-
add_subdirectory(test)
21-
add_subdirectory(examples)
1+
# Copyright (C) 2018 Tommy Hinks <tommy.hinks@gmail.com>
2+
# This file is subject to the license terms in the LICENSE file
3+
# found in the top-level directory of this distribution.
4+
5+
cmake_minimum_required(VERSION 3.1)
6+
project(obj_io)
7+
8+
set(header_files
9+
${CMAKE_CURRENT_SOURCE_DIR}/include/thinks/obj_io/obj_io.h
10+
)
11+
add_library(thinks_obj_io INTERFACE)
12+
target_sources(thinks_obj_io INTERFACE ${header_files})
13+
target_include_directories(thinks_obj_io INTERFACE include)
14+
15+
string(TOLOWER "${CMAKE_CURRENT_SOURCE_DIR}" current_source_dir_lower)
16+
string(TOLOWER "${CMAKE_SOURCE_DIR}" source_dir_lower)
17+
if(current_source_dir_lower STREQUAL source_dir_lower)
18+
message(STATUS "obj-io: enable testing")
19+
enable_testing()
20+
add_subdirectory(test)
21+
add_subdirectory(examples)
2222
endif()

examples/main.cc

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
// Copyright(C) 2018 Tommy Hinks <tommy.hinks@gmail.com>
2-
// This file is subject to the license terms in the LICENSE file
3-
// found in the top-level directory of this distribution.
4-
5-
#include <iostream>
6-
7-
#include <index_group_example.h>
8-
#include <polygon_example.h>
9-
#include <simple_example.h>
10-
11-
int main(int argc, char* argv[])
12-
{
13-
examples::IndexGroupExample("./index_group_example.obj");
14-
examples::PolygonExample("./polygon_example.obj");
15-
examples::SimpleExample("./simple_example.obj");
16-
17-
return 0;
18-
}
1+
// Copyright(C) 2018 Tommy Hinks <tommy.hinks@gmail.com>
2+
// This file is subject to the license terms in the LICENSE file
3+
// found in the top-level directory of this distribution.
4+
5+
#include <index_group_example.h>
6+
#include <polygon_example.h>
7+
#include <simple_example.h>
8+
9+
int main(int argc, char* argv[])
10+
{
11+
examples::IndexGroupExample("./index_group_example.obj");
12+
examples::PolygonExample("./polygon_example.obj");
13+
examples::SimpleExample("./simple_example.obj");
14+
15+
return 0;
16+
}

0 commit comments

Comments
 (0)