Compare commits
No commits in common. "meson" and "main" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
build/
|
build/
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
.cache
|
.cache
|
||||||
subprojects/*/
|
|
||||||
20
CMakeLists.txt
Normal file
20
CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
|
project(lfq)
|
||||||
|
|
||||||
|
find_package(GTest REQUIRED)
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} test.cc)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE gtest::gtest)
|
||||||
|
|
||||||
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
|
-O2
|
||||||
|
-fsanitize=thread
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
|
-fsanitize=thread
|
||||||
|
)
|
||||||
10
CMakeUserPresets.json
Normal file
10
CMakeUserPresets.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": 4,
|
||||||
|
"vendor": {
|
||||||
|
"conan": {}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"build/Release/generators/CMakePresets.json",
|
||||||
|
"build/Debug/generators/CMakePresets.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
10
conanfile.txt
Normal file
10
conanfile.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[requires]
|
||||||
|
gtest/1.16.0
|
||||||
|
glog/0.7.1
|
||||||
|
benchmark/1.9.1
|
||||||
|
|
||||||
|
[generators]
|
||||||
|
CMakeDeps
|
||||||
|
CMakeToolchain
|
||||||
|
[layout]
|
||||||
|
cmake_layout
|
||||||
8
main.cc
Normal file
8
main.cc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include "queue.hh"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
lfq::LockFreeQueue<int, 16> queue;
|
||||||
|
std::cout << "Hello!\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
15
meson.build
15
meson.build
@ -1,15 +0,0 @@
|
|||||||
project('lfq', 'cpp')
|
|
||||||
|
|
||||||
src = ['test.cc']
|
|
||||||
|
|
||||||
incdir = include_directories('include')
|
|
||||||
|
|
||||||
gtest = dependency('gtest')
|
|
||||||
|
|
||||||
exe = executable('lfq',
|
|
||||||
sources: src,
|
|
||||||
dependencies: [gtest],
|
|
||||||
include_directories: incdir
|
|
||||||
)
|
|
||||||
|
|
||||||
test('baseTest', exe, protocol : 'gtest')
|
|
||||||
Loading…
x
Reference in New Issue
Block a user