I am generating a .sln with CMake. I want to use Google Test and use that kind of code for adding a new tests:
add_executable(my_test test/my_test.cpp)
target_link_libraries(my_test gtest gmock_main)
add_test(NAME my_test COMMAND my_test)
It works fine, but when I open my .sln, I have all the targets appearing in the solution explorer: the libraries, the unit tests, etc.
Is there a way to hide these target?
CMake > Build Only
menu in VS2017 which is much more difficult to navigate. However, I suspect that list does draw from whatever is in the solution explorer, so if you could split that up it would probably clean up both. – Gaucherie