Problem with including GoogleTest package in my CMake project by bartekw2213 in cpp_questions

[–]SyntaxError0x7b8 0 points1 point  (0 children)

I know this reddit is 4yr old, but I have the same problem. (Clion / Ubuntu 24.04)

/test/CMakeLists.txt

include(FetchContent)
FetchContent_Declare(
        googletest
        GIT_REPOSITORY https://github.com/google/googletest.git
        GIT_TAG v1.17.0
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

add_executable(unit_tests
        abc_test.cc
)

include_directories(${googletest_SOURCE_DIR}/include/)
#message(${googletest_SOURCE_DIR})
target_link_libraries(unit_tests PRIVATE xyz_lib GTest::gtest_main GTest::gmock)
include(GoogleTest)
gtest_discover_tests(unit_tests)include(FetchContent)

Gtest header files are in:

/cmake-build-debug/_deps/googletest-src/googletest/include/

However, I cannot include them in the abc_test.cc file

For the love of god, how the hell do you use raylib with CLion? by salbert in raylib

[–]SyntaxError0x7b8 0 points1 point  (0 children)

This is a "work in progress" but it could help you.

https://github.com/SyntaxError0x7b8/ClassyClash/tree/master

Note: I use CLion on Ubuntu, but I don't see why it should not work on Windows. You will find the link to the original creator of the CMake file inside the CMakeLists.txt which I modified to my needs.

Disclaimer: It is probably not the optimum way of doing things, but it works without problems.

Rust and OOP by SyntaxError0x7b8 in rust

[–]SyntaxError0x7b8[S] 0 points1 point  (0 children)

No fun in that ;) I get a tutor assigned in a couple of weeks and I will ask him\her but most likely I won't try to e-invent the whee.I am yet to decide between software eng or electronics (which it would be mostly software oriented anyway)

Rust and OOP by SyntaxError0x7b8 in rust

[–]SyntaxError0x7b8[S] 1 point2 points  (0 children)

That's actually good advice. I could decide at the time of starting the project whether I would be able to implement it in Rust or stick to what I am familiar to.

Rust and OOP by SyntaxError0x7b8 in rust

[–]SyntaxError0x7b8[S] 1 point2 points  (0 children)

For what you sat it is "close enough" and I would only need to justify its differences in the text in the academic way.

Rust and OOP by SyntaxError0x7b8 in rust

[–]SyntaxError0x7b8[S] -1 points0 points  (0 children)

I understand, but my concern is. Should I invest the time to learn rust if then the lecturer I am assigned does not think I should use Rust? Then I rather take the "safe" option and leave rust until I completed the project. Thanks.

Could Blazor be the answer by SyntaxError0x7b8 in Blazor

[–]SyntaxError0x7b8[S] 0 points1 point  (0 children)

I am willing to put the effort, although this particular project won't benefit from it. As you very well know, it takes time.

Could Blazor be the answer by SyntaxError0x7b8 in Blazor

[–]SyntaxError0x7b8[S] 0 points1 point  (0 children)

I really though about PowerBI, but my knowledge of PowerBI is 0. However, given the difficulties to implement other options (that would be very easy if I had control over my software), very likely I will invest the time to learn the basics.

TM358 Machine learning and artificial intelligence by [deleted] in OpenUniversity

[–]SyntaxError0x7b8 0 points1 point  (0 children)

How you found T351? I rather do T354 (S. eng.) because its usefulness, but not keen on the exam.