Project setups

This commit is contained in:
Nils O. Selåsdal
2025-07-18 21:54:13 +02:00
parent abf430dabb
commit cfe647f85d
7 changed files with 54 additions and 3 deletions
+3
View File
@@ -8,3 +8,6 @@ log_subdir/
coverage/
install/
libucore-*
src/version.c
.cache/
compile_commands.json
+15
View File
@@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${default}",
"${workspaceFolder}/include"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"intelliSenseMode": "macos-clang-arm64"
}
],
"version": 4
}
+14
View File
@@ -0,0 +1,14 @@
{
"files.associations": {
"ringbuf.h": "c",
"seq.h": "c",
"stdint.h": "c",
"stdio.h": "c"
},
"C_Cpp.default.includePath": [
"/opt/homebrew/include/",
"$(workspaceFolder)/include/",
]
}
+19
View File
@@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": [
"all"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "CMake template build task"
}
]
}
+2 -2
View File
@@ -12,9 +12,9 @@ set(libucore_VERSION ${libucore_VERSION_MAJOR}.${libucore_VERSION_MINOR}.${libuc
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wundef -Wcast-qual -Wshadow -Wcast-align -pipe -Wno-unused-parameter -Werror=implicit-function-declaration -Winit-self -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wundef -Wcast-qual -Wshadow -Wcast-align -pipe -Wno-unused-parameter -Werror=implicit-function-declaration -Winit-self")
add_definitions(-D_FILE_OFFSET_BITS=64)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -O2 -pthread")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -O2")
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
option(CODE_COVERAGE "build with code coverage intrumentation" OFF)
+1 -1
View File
@@ -10,5 +10,5 @@ ${SOURCE_FILES}
"${PROJECT_BINARY_DIR}/src/version.c"
)
set_target_properties(ucore PROPERTIES SOVERSION 1 VERSION 1.0.0)
target_link_libraries(ucore pthread)
target_link_libraries(ucore Threads::Threads)
install (TARGETS ucore DESTINATION lib)
BIN
View File
Binary file not shown.