Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
librelaxisloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klemm, Carl Philipp
librelaxisloader
Commits
e901be5b
Commit
e901be5b
authored
Jun 18, 2024
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
add version information function
parent
4ff75825
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+11
-2
11 additions, 2 deletions
CMakeLists.txt
relaxisloader.c
+6
-5
6 additions, 5 deletions
relaxisloader.c
relaxisloader/relaxisloader.h
+16
-0
16 additions, 0 deletions
relaxisloader/relaxisloader.h
with
33 additions
and
7 deletions
CMakeLists.txt
+
11
−
2
View file @
e901be5b
...
...
@@ -7,6 +7,13 @@ set(SRC_FILES
utils.c
)
set
(
CMAKE_PROJECT_VERSION_MAJOR 1
)
set
(
CMAKE_PROJECT_VERSION_MINOR 1
)
set
(
CMAKE_PROJECT_VERSION_PATCH 4
)
add_compile_definitions
(
VERSION_MAJOR=
${
CMAKE_PROJECT_VERSION_MAJOR
}
)
add_compile_definitions
(
VERSION_MINOR=
${
CMAKE_PROJECT_VERSION_MINOR
}
)
add_compile_definitions
(
VERSION_PATCH=
${
CMAKE_PROJECT_VERSION_PATCH
}
)
set
(
API_HEADERS_DIR relaxisloader/
)
set
(
API_HEADERS_C
...
...
@@ -28,10 +35,12 @@ if(WIN32)
${
PROJECT_SOURCE_DIR
}
/strptime/strptime.c
)
set
(
SQL_LIBRARIES sqlite3.a
)
else
()
endif
(
WIN32
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
SRC_FILES
}
${
API_HEADERS_C
}
)
set
(
LIBTYPE SHARED
)
add_library
(
${
PROJECT_NAME
}
${
LIBTYPE
}
${
SRC_FILES
}
${
API_HEADERS_C
}
)
target_link_libraries
(
${
PROJECT_NAME
}
${
SQL_LIBRARIES
}
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC ./
${
API_HEADERS_DIR
}
${
SQL_INCLUDE_DIRS
}
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES COMPILE_FLAGS
"-Wall -O2 -march=native -g"
LINK_FLAGS
"-flto -pthread"
)
...
...
...
...
This diff is collapsed.
Click to expand it.
relaxisloader.c
+
6
−
5
View file @
e901be5b
...
...
@@ -33,11 +33,12 @@ struct rlxfile
sqlite3
*
db
;
};
/**
* @brief Frees a project struct
*
* @param proj project struct to be freed, or NULL
*/
const
struct
rlx_version_fixed
rlx_get_version
(
void
)
{
static
struct
rlx_version_fixed
version
=
{
VERSION_MAJOR
,
VERSION_MINOR
,
VERSION_PATCH
};
return
version
;
}
void
rlx_project_free
(
struct
rlx_project
*
proj
)
{
if
(
!
proj
)
...
...
...
...
This diff is collapsed.
Click to expand it.
relaxisloader/relaxisloader.h
+
16
−
0
View file @
e901be5b
...
...
@@ -40,6 +40,22 @@ enum {
RLX_ERR_FMT
=
-
104
,
};
struct
rlx_version_fixed
{
int
major
;
int
minor
;
int
patch
;
};
/**
* @brief Gets the version of librelaxisloader
*
* This function must always be used for every singular rlx_project struct to avoid memory leaks.
* It is safe to pass NULL to this function.
*
* @return a rlx_version_fixed struct with the version, owned by librelaxisloader do not free.
*/
const
struct
rlx_version_fixed
rlx_get_version
(
void
);
struct
rlxfile
;
/**
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment