CMake: can't find header files
问题 I have a directory main, which has the following subdirectories: A, B, C, D, Test. In Test, I have a CMakeLists file with the following content: cmake_minimum_required(VERSION 2.8) enable_testing() set(TEST_EXE_NAME test) add_executable(${TEST_EXE_NAME} test.cpp) add_test(NAME "testDatabase" COMMAND ${TEST_EXE_NAME}) target_include_directories(Test PUBLIC ./) target_include_directories(Test A B C D) target_link_libraries(Test A B C D) In Test, I have an executable which #includes several