Update CMakeLists.txt
This commit is contained in:
parent
55cca93d67
commit
ce335377e0
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
set(sourcedirs
|
set(sourcedirs
|
||||||
.
|
.
|
||||||
VectorAlgebra/src
|
VectorAlgebra/src
|
||||||
@ -14,3 +13,38 @@ idf_component_register(
|
|||||||
INCLUDE_DIRS ${includedirs}
|
INCLUDE_DIRS ${includedirs}
|
||||||
REQUIRES arduino
|
REQUIRES arduino
|
||||||
)
|
)
|
||||||
|
|
||||||
|
project(RoboidControl)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
|
add_compile_definitions(GTEST)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
googletest
|
||||||
|
URL https://github.com/google/googletest/archive/refs/heads/main.zip
|
||||||
|
)
|
||||||
|
|
||||||
|
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||||
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(googletest)
|
||||||
|
|
||||||
|
add_library(RoboidControl STATIC
|
||||||
|
"Roboid.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
RoboidControlTest
|
||||||
|
"test/Dummy_test.cc"
|
||||||
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
RoboidControlTest
|
||||||
|
gtest_main
|
||||||
|
RoboidControl
|
||||||
|
)
|
||||||
|
|
||||||
|
include(GoogleTest)
|
||||||
|
gtest_discover_tests(RoboidControlTest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user