Skip to content

Commit 1fcd951

Browse files
Merge remote-tracking branch 'clone-repo/main'
2 parents e6da56c + 51495b5 commit 1fcd951

File tree

218 files changed

+16706
-68174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+16706
-68174
lines changed

.gitignore

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ __pycache__/
55

66
# Distribution / packaging
77
.Python
8-
build/
98
develop-eggs/
109
dist/
1110
downloads/
@@ -160,21 +159,25 @@ cython_debug/
160159
*.nbi
161160
*.nbc
162161

163-
# PMMA temporary directory
164-
temporary
162+
# PMMA
165163

166-
# PMMA log directory
167-
logs
164+
# IGNORE temporary directory
165+
pmma/temporary/
168166

169-
# PMMA runtime generated binaries
170-
bin
171-
/*.so
172-
/*.pyd
167+
# IGNORE everything in cython directory EXCEPT pyx files
168+
pmma/core/pyx_src/*
169+
!pmma/core/pyx_src/*.pyx
170+
!pmma/core/pyx_src/*.pxd
173171

174-
# PMMA Cython PYX -> C conversion
175-
cython_src/*.c
176-
cython_src/utility/*.c
172+
# Ignore everything in pmma/build except .pyi files
173+
pmma/build/*
174+
!pmma/build/*.pyi
177175

178-
# PMMA passports directory
179-
passports
180-
/configuration
176+
# Ignore everything in pmma/lib
177+
pmma/lib/*
178+
179+
# annotations
180+
*.html
181+
182+
# Ignore everything in build_tools
183+
build_tools/*

.vscode/c_cpp_properties.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
{
44
"name": "Win32",
55
"includePath": [
6-
"${workspaceFolder}/**"
6+
"${workspaceFolder}/**",
7+
"D:\\Visual Studio C++ Extensions\\glfw-3.4.bin.WIN64\\include",
8+
"D:\\Visual Studio C++ Extensions\\SFML-2.6.1\\include"
79
],
810
"defines": [
911
"_DEBUG",
1012
"UNICODE",
1113
"_UNICODE"
1214
],
13-
"windowsSdkVersion": "10.0.22621.0",
15+
"windowsSdkVersion": "10.0.26100.0",
1416
"cStandard": "c17",
1517
"cppStandard": "c++17",
1618
"intelliSenseMode": "windows-msvc-x64"

.vscode/settings.json

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,73 @@
11
{
2+
"C_Cpp.default.compilerPath": "cl.exe",
23
"cSpell.words": [
3-
"borderwidth",
4-
"focuscolor",
5-
"focusthickness",
6-
"globaltrace",
7-
"gradians",
8-
"localtrace",
9-
"nessasary",
10-
"nparray",
11-
"Numba",
12-
"PMMA",
13-
"PYADL",
14-
"Pyrr",
15-
"pythag"
16-
]
4+
"lacunarity",
5+
"nullptr"
6+
],
7+
"files.associations": {
8+
"*.py": "python",
9+
"algorithm": "cpp",
10+
"array": "cpp",
11+
"atomic": "cpp",
12+
"bit": "cpp",
13+
"cctype": "cpp",
14+
"charconv": "cpp",
15+
"chrono": "cpp",
16+
"clocale": "cpp",
17+
"cmath": "cpp",
18+
"compare": "cpp",
19+
"complex": "cpp",
20+
"concepts": "cpp",
21+
"cstddef": "cpp",
22+
"cstdint": "cpp",
23+
"cstdio": "cpp",
24+
"cstdlib": "cpp",
25+
"cstring": "cpp",
26+
"ctime": "cpp",
27+
"cwchar": "cpp",
28+
"exception": "cpp",
29+
"format": "cpp",
30+
"forward_list": "cpp",
31+
"initializer_list": "cpp",
32+
"iomanip": "cpp",
33+
"ios": "cpp",
34+
"iosfwd": "cpp",
35+
"iostream": "cpp",
36+
"istream": "cpp",
37+
"iterator": "cpp",
38+
"limits": "cpp",
39+
"locale": "cpp",
40+
"memory": "cpp",
41+
"mutex": "cpp",
42+
"new": "cpp",
43+
"optional": "cpp",
44+
"ostream": "cpp",
45+
"random": "cpp",
46+
"ratio": "cpp",
47+
"sstream": "cpp",
48+
"stdexcept": "cpp",
49+
"stop_token": "cpp",
50+
"streambuf": "cpp",
51+
"string": "cpp",
52+
"system_error": "cpp",
53+
"thread": "cpp",
54+
"tuple": "cpp",
55+
"type_traits": "cpp",
56+
"typeinfo": "cpp",
57+
"utility": "cpp",
58+
"vector": "cpp",
59+
"xfacet": "cpp",
60+
"xiosbase": "cpp",
61+
"xlocale": "cpp",
62+
"xlocbuf": "cpp",
63+
"xlocinfo": "cpp",
64+
"xlocmes": "cpp",
65+
"xlocmon": "cpp",
66+
"xlocnum": "cpp",
67+
"xloctime": "cpp",
68+
"xmemory": "cpp",
69+
"xstring": "cpp",
70+
"xtr1common": "cpp",
71+
"xutility": "cpp"
72+
}
1773
}

CMakeLists.txt

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
project(PMMA_Core LANGUAGES CXX)
3+
4+
# Set C++ standard
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
8+
# Core library name
9+
set(LIB_NAME PMMA_Core)
10+
11+
# Source and header directories
12+
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pmma/core/cpp_src")
13+
set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pmma/core/hpp_src")
14+
15+
# Output directory for the library
16+
set(LIB_OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pmma/lib")
17+
file(MAKE_DIRECTORY ${LIB_OUTPUT_DIR})
18+
19+
# Collect source files
20+
set(SOURCES
21+
"${SRC_DIR}/PMMA_Core.cpp"
22+
"${SRC_DIR}/AdvancedMathematics.cpp"
23+
"${SRC_DIR}/Display.cpp"
24+
"${SRC_DIR}/Events.cpp"
25+
"${SRC_DIR}/FractalBrownianMotion.cpp"
26+
"${SRC_DIR}/InternalEventsManager.cpp"
27+
"${SRC_DIR}/NumberConverter.cpp"
28+
"${SRC_DIR}/PerlinNoise.cpp")
29+
30+
# Add shared library
31+
add_library(
32+
${LIB_NAME} SHARED ${SOURCES})
33+
target_compile_definitions(${LIB_NAME} PRIVATE PMMA_CORE_EXPORTS)
34+
35+
# GLFW settings (platform-specific)
36+
if (WIN32)
37+
# Compiler flags
38+
add_compile_options(/O2 /fp:fast /GL /GF /GS- /std:c++17 /wd4551 /wd4251)
39+
40+
# Linker flags
41+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LTCG")
42+
43+
target_include_directories(${LIB_NAME}
44+
PRIVATE
45+
${INCLUDE_DIR}
46+
)
47+
48+
find_package(glfw3 CONFIG REQUIRED)
49+
find_package(OpenGL REQUIRED)
50+
51+
target_link_libraries(${LIB_NAME}
52+
PRIVATE
53+
glfw
54+
OpenGL::GL
55+
)
56+
elseif(APPLE)
57+
add_compile_options(-O3 -ffast-math -funroll-loops -fstrict-aliasing -fomit-frame-pointer -std=c++17)
58+
59+
target_include_directories(${LIB_NAME}
60+
PRIVATE ${INCLUDE_DIR}
61+
)
62+
63+
find_package(glfw3 REQUIRED)
64+
target_link_libraries(${LIB_NAME} PRIVATE glfw)
65+
66+
find_library(OpenGL_LIBRARY OpenGL)
67+
target_link_libraries(${LIB_NAME} PRIVATE glfw ${OpenGL_LIBRARY})
68+
69+
elseif(UNIX)
70+
add_compile_options(-O3 -ffast-math -funroll-loops -fstrict-aliasing -fomit-frame-pointer -std=c++17)
71+
72+
target_include_directories(${LIB_NAME}
73+
PRIVATE ${INCLUDE_DIR}
74+
)
75+
76+
find_package(glfw3 REQUIRED)
77+
find_package(OpenGL REQUIRED)
78+
target_link_libraries(${LIB_NAME} PRIVATE glfw)
79+
target_link_libraries(${LIB_NAME} PRIVATE glfw OpenGL::GL)
80+
endif()
81+
82+
# Set output path
83+
set_target_properties(${LIB_NAME} PROPERTIES
84+
LIBRARY_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
85+
RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
86+
ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
87+
)

0 commit comments

Comments
 (0)