Refactoring with multiple cmake add_subdirectory

已回答

I have main CMakeLists wich includes other Cmake via add_subdirectory

each included CmakeLists has own project(uniq_name) and uses 

target_include_directories(${PROJECT_NAME} PRIVATE
${GPL_SOURCE_DIR}/common
${PROJECT_SOURCE_DIR}
)

 

Each included project in its own sub-directory and each  has file and class for ex. Database

_search for usage_ works fine and shouws usage in class-owner project

but there are 2 problems:

1.  Jump between  declaration to definitions in .h and .c selects wrong file from other project

2. When I Refactor-Rename this class its renamed in all sub-projects. If refactoring pop-ups  'show usage' dialog than I could exclude not-related cmke-projects but some times it silently renames ALL classes in All cmake-subrojects

 

It there are ways to limit refactoring scopes for such use-cases?

 

 

 

0

Hello!

Thanks for the detailed description. The first problem looks related to the following issue in our tracker: https://youtrack.jetbrains.com/issue/CPP-8264. For the second problem I've created https://youtrack.jetbrains.com/issue/CPP-13686. Feel free to comment or upvote the issues, please follow them to get updates.

0

请先登录再写评论。