Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Commit 2d9d903

Browse files
committed
Initial commit
0 parents commit 2d9d903

File tree

6 files changed

+1402
-0
lines changed

6 files changed

+1402
-0
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = false
8+
insert_final_newline = false

.gitignore

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# node-waf configuration
28+
.lock-wscript
29+
30+
# Compiled binary addons (https://nodejs.org/api/addons.html)
31+
build/Release
32+
33+
# Dependency directories
34+
node_modules/
35+
jspm_packages/
36+
37+
# TypeScript v1 declaration files
38+
typings/
39+
40+
# Optional npm cache directory
41+
.npm
42+
43+
# Optional eslint cache
44+
.eslintcache
45+
46+
# Optional REPL history
47+
.node_repl_history
48+
49+
# Output of 'npm pack'
50+
*.tgz
51+
52+
# dotenv environment variables file
53+
.env
54+
.env.test
55+
56+
# CMake
57+
58+
CMakeLists.txt.user
59+
CMakeCache.txt
60+
CMakeFiles
61+
CMakeScripts
62+
Testing
63+
Makefile
64+
cmake_install.cmake
65+
install_manifest.txt
66+
compile_commands.json
67+
CTestTestfile.cmake
68+
_deps

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
3+
project (teraflop)
4+
5+
include_directories(${CMAKE_JS_INC})
6+
file(GLOB SOURCE_FILES "src/*.cpp" "src/*.h")
7+
8+
# Include N-API wrappers
9+
execute_process(COMMAND node -p "require('node-addon-api').include"
10+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
11+
OUTPUT_VARIABLE NODE_ADDON_API_DIR
12+
)
13+
string(REPLACE "\"" "" NODE_ADDON_API_DIR ${NODE_ADDON_API_DIR})
14+
15+
# Target Library
16+
17+
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
18+
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
19+
20+
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_JS_INC})
21+
target_include_directories(${PROJECT_NAME} PRIVATE ${NODE_ADDON_API_DIR})
22+
23+
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Chance Snow
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)