Skip to content

Commit 6dfa9b0

Browse files
authored
Merge pull request #20 from Compaile/v103_performance
1.1 release
2 parents 7f98f1b + dbae67f commit 6dfa9b0

25 files changed

Lines changed: 13597 additions & 1889 deletions

.gitignore

Lines changed: 62 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,62 @@
1-
# Build directory
2-
/build/
3-
4-
# CMake generated files
5-
CMakeCache.txt
6-
CMakeFiles/
7-
cmake_install.cmake
8-
Makefile
9-
10-
# Compiled Object files
11-
*.slo
12-
*.lo
13-
*.o
14-
*.obj
15-
16-
# Precompiled Headers
17-
*.gch
18-
*.pch
19-
20-
# Compiled Dynamic libraries
21-
*.so
22-
*.dylib
23-
*.dll
24-
25-
# Fortran module files
26-
*.mod
27-
*.smod
28-
29-
# Compiled Static libraries
30-
*.lai
31-
*.la
32-
*.a
33-
*.lib
34-
35-
# Executables
36-
*.exe
37-
*.out
38-
*.app
39-
40-
# IDE-specific files (uncomment if needed)
41-
# .vscode/
42-
# .idea/
43-
# *.swp
44-
# *.swo
45-
46-
# OS generated files
47-
.DS_Store
48-
.DS_Store?
49-
._*
50-
.Spotlight-V100
51-
.Trashes
52-
ehthumbs.db
53-
Thumbs.db
1+
# Build directory
2+
/build/
3+
/build_wsl/
4+
5+
# CMake generated files
6+
CMakeCache.txt
7+
CMakeFiles/
8+
cmake_install.cmake
9+
Makefile
10+
11+
# Compiled Object files
12+
*.slo
13+
*.lo
14+
*.o
15+
*.obj
16+
17+
# Precompiled Headers
18+
*.gch
19+
*.pch
20+
21+
# Compiled Dynamic libraries
22+
*.so
23+
*.dylib
24+
*.dll
25+
26+
# Fortran module files
27+
*.mod
28+
*.smod
29+
30+
# Compiled Static libraries
31+
*.lai
32+
*.la
33+
*.a
34+
*.lib
35+
36+
# Executables
37+
*.exe
38+
*.out
39+
*.app
40+
41+
# IDE-specific files (uncomment if needed)
42+
# .vscode/
43+
# .idea/
44+
# *.swp
45+
# *.swo
46+
47+
# OS generated files
48+
.DS_Store
49+
.DS_Store?
50+
._*
51+
.Spotlight-V100
52+
.Trashes
53+
ehthumbs.db
54+
Thumbs.db
55+
56+
# Local documentation
57+
CLAUDE.local.md
58+
CLAUDE.md
59+
settings.json
60+
Testing/Temporary/LastTest.log
61+
Testing/Temporary/CTestCostData.txt
62+
.claude/settings.local.json

CMakeLists.txt

Lines changed: 111 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,112 @@
1-
cmake_minimum_required(VERSION 3.12)
2-
project(ctrack VERSION 1.0.2 LANGUAGES CXX)
3-
4-
set(CMAKE_CXX_STANDARD 17)
5-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6-
7-
# Option to disable parallel processing
8-
option(DISABLE_PAR "Disable parallel processing" OFF)
9-
10-
# Option to disable building examples
11-
option(DISABLE_EXAMPLES "Disable building examples" OFF)
12-
13-
option(ENABLE_WARNINGS "Enable warnings" OFF)
14-
15-
# Check for TBB
16-
if(NOT MSVC AND NOT DISABLE_PAR)
17-
find_package(TBB QUIET)
18-
if(TBB_FOUND)
19-
message(STATUS "TBB found. Enabling parallel execution.")
20-
else()
21-
message(STATUS "TBB not found. Disabling parallel execution.")
22-
set(DISABLE_PAR ON)
23-
endif()
24-
elseif(DISABLE_PAR)
25-
message(STATUS "DISABLE_PAR set. Disabling parallel execution.")
26-
endif()
27-
28-
# Create the ctrack library
29-
add_library(ctrack INTERFACE)
30-
target_include_directories(ctrack INTERFACE
31-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
32-
$<INSTALL_INTERFACE:include>
33-
)
34-
35-
# Configure ctrack based on TBB availability
36-
if(DISABLE_PAR)
37-
target_compile_definitions(ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
38-
elseif(NOT MSVC AND TBB_FOUND)
39-
target_link_libraries(ctrack INTERFACE TBB::tbb)
40-
endif()
41-
42-
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
43-
if(ENABLE_WARNINGS)
44-
if (NOT MSVC)
45-
include(cmake/add_warning.cmake)
46-
include(cmake/warnings.cmake)
47-
endif()
48-
endif()
49-
50-
# Add the examples subdirectory if not disabled
51-
if(NOT DISABLE_EXAMPLES)
52-
add_subdirectory(examples)
53-
else()
54-
message(STATUS "Building examples disabled.")
55-
endif()
56-
57-
# Installation
58-
include(GNUInstallDirs)
59-
include(CMakePackageConfigHelpers)
60-
61-
install(TARGETS ctrack
62-
EXPORT ctrackTargets
63-
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
64-
)
65-
66-
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
67-
68-
install(EXPORT ctrackTargets
69-
FILE ctrackTargets.cmake
70-
NAMESPACE ctrack::
71-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
72-
)
73-
74-
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
75-
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
76-
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
77-
)
78-
79-
write_basic_package_version_file(
80-
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
81-
VERSION ${PROJECT_VERSION}
82-
COMPATIBILITY SameMajorVersion
83-
)
84-
85-
install(FILES
86-
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
87-
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
88-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
1+
cmake_minimum_required(VERSION 3.12)
2+
project(ctrack VERSION 1.0.2 LANGUAGES CXX)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6+
7+
# Option to disable parallel processing
8+
option(DISABLE_PAR "Disable parallel processing" OFF)
9+
10+
# Option to disable building examples
11+
option(DISABLE_EXAMPLES "Disable building examples" OFF)
12+
13+
# Option to build benchmark (default OFF)
14+
option(BUILD_BENCHMARK "Build benchmark" OFF)
15+
16+
# Option to build tests (default OFF)
17+
option(BUILD_TESTS "Build tests" OFF)
18+
19+
option(ENABLE_WARNINGS "Enable warnings" OFF)
20+
21+
# Check for TBB
22+
if(NOT MSVC AND NOT DISABLE_PAR)
23+
find_package(TBB QUIET)
24+
if(TBB_FOUND)
25+
message(STATUS "TBB found. Enabling parallel execution.")
26+
else()
27+
message(STATUS "TBB not found. Disabling parallel execution.")
28+
set(DISABLE_PAR ON)
29+
endif()
30+
elseif(DISABLE_PAR)
31+
message(STATUS "DISABLE_PAR set. Disabling parallel execution.")
32+
endif()
33+
34+
# Create the ctrack library
35+
add_library(ctrack INTERFACE)
36+
target_include_directories(ctrack INTERFACE
37+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
38+
$<INSTALL_INTERFACE:include>
39+
)
40+
41+
# Configure ctrack based on TBB availability
42+
if(DISABLE_PAR)
43+
target_compile_definitions(ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
44+
elseif(NOT MSVC AND TBB_FOUND)
45+
target_link_libraries(ctrack INTERFACE TBB::tbb)
46+
endif()
47+
48+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
49+
if(ENABLE_WARNINGS)
50+
if (NOT MSVC)
51+
include(cmake/add_warning.cmake)
52+
include(cmake/warnings.cmake)
53+
endif()
54+
endif()
55+
56+
# Add the examples subdirectory if not disabled
57+
if(NOT DISABLE_EXAMPLES)
58+
add_subdirectory(examples)
59+
else()
60+
message(STATUS "Building examples disabled.")
61+
endif()
62+
63+
# Add the benchmark subdirectory if enabled
64+
if(BUILD_BENCHMARK)
65+
add_subdirectory(benchmark)
66+
message(STATUS "Building benchmark enabled.")
67+
else()
68+
message(STATUS "Building benchmark disabled.")
69+
endif()
70+
71+
# Add the test subdirectory if enabled
72+
if(BUILD_TESTS)
73+
add_subdirectory(test)
74+
enable_testing()
75+
message(STATUS "Building tests enabled.")
76+
else()
77+
message(STATUS "Building tests disabled.")
78+
endif()
79+
80+
# Installation
81+
include(GNUInstallDirs)
82+
include(CMakePackageConfigHelpers)
83+
84+
install(TARGETS ctrack
85+
EXPORT ctrackTargets
86+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
87+
)
88+
89+
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
90+
91+
install(EXPORT ctrackTargets
92+
FILE ctrackTargets.cmake
93+
NAMESPACE ctrack::
94+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
95+
)
96+
97+
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
98+
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
99+
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
100+
)
101+
102+
write_basic_package_version_file(
103+
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
104+
VERSION ${PROJECT_VERSION}
105+
COMPATIBILITY SameMajorVersion
106+
)
107+
108+
install(FILES
109+
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
110+
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
111+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
89112
)

Config.cmake.in

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
@PACKAGE_INIT@
2-
3-
include("${CMAKE_CURRENT_LIST_DIR}/ctrackTargets.cmake")
4-
5-
if(NOT MSVC AND NOT CTRACK_DISABLE_EXECUTION_POLICY)
6-
include(CMakeFindDependencyMacro)
7-
find_dependency(TBB QUIET)
8-
if(NOT TBB_FOUND)
9-
message(STATUS "TBB not found. Disabling parallel execution for ctrack.")
10-
set(CTRACK_DISABLE_EXECUTION_POLICY ON)
11-
endif()
12-
endif()
13-
14-
if(CTRACK_DISABLE_EXECUTION_POLICY)
15-
target_compile_definitions(ctrack::ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
16-
endif()
17-
1+
@PACKAGE_INIT@
2+
3+
include("${CMAKE_CURRENT_LIST_DIR}/ctrackTargets.cmake")
4+
5+
if(NOT MSVC AND NOT CTRACK_DISABLE_EXECUTION_POLICY)
6+
include(CMakeFindDependencyMacro)
7+
find_dependency(TBB QUIET)
8+
if(NOT TBB_FOUND)
9+
message(STATUS "TBB not found. Disabling parallel execution for ctrack.")
10+
set(CTRACK_DISABLE_EXECUTION_POLICY ON)
11+
endif()
12+
endif()
13+
14+
if(CTRACK_DISABLE_EXECUTION_POLICY)
15+
target_compile_definitions(ctrack::ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
16+
endif()
17+
1818
check_required_components(ctrack)

LICENSE

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2024 COMPAILE Solutions GmbH - Grischa Hauser
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
1+
MIT License
2+
3+
Copyright (c) 2024 COMPAILE Solutions GmbH - Grischa Hauser
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
2121
SOFTWARE.

0 commit comments

Comments
 (0)