We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was trying to extend this, by adding a directory and a cpp file in that directory and a test_*.cpp file in that directory and add it.
I used the add_subdirectory(another_dir) directive, and inside that, I added lines
1 include_directories(${CMAKE_SOURCE_DIR}) 2 include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR}) 3 add_library(another_dir test_project2.cpp)
It compiles fine.
On the toplevel CMakeLists.txt I added, target_link_library(.... , another_dir).
This was not linking the library from the subdirectory.
Can you update this git-repo on how to handle subdirectories.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was trying to extend this, by adding a directory and a cpp file in that directory and a test_*.cpp file in that directory and add it.
I used the add_subdirectory(another_dir) directive, and inside that, I added lines
1 include_directories(${CMAKE_SOURCE_DIR})
2 include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
3 add_library(another_dir test_project2.cpp)
It compiles fine.
On the toplevel CMakeLists.txt I added, target_link_library(.... , another_dir).
This was not linking the library from the subdirectory.
Can you update this git-repo on how to handle subdirectories.
The text was updated successfully, but these errors were encountered: