CLion next step on pit CMake, just reload does not work?

He stepped down at CLion Interactive Computer Graphics source pit,

CMakeLists.txt in your home directory which has an option option, select the sub-projects added to the main project.

option(BUILD_CHAP_02 "Build Chap 02 subproject." OFF)
option(BUILD_CHAP_03 "Build Chap 03 subproject." ON)
option(BUILD_CHAP_04 "Build Chap 04 subproject." OFF)
option(BUILD_CHAP_05 "Build Chap 05 subproject." OFF)
option(BUILD_CHAP_07 "Build Chap 07 subproject." OFF)
option(BUILD_CHAP_08 "Build Chap 08 subproject." OFF)
option(BUILD_CHAP_09 "Build Chap 09 subproject." OFF)
option(BUILD_CHAP_10 "Build Chap 10 subproject." OFF)
option(BUILD_APPEN_A "Build Appendix A subproject." OFF)

I will begin the second chapter of the sub-project set ON, the other set OFF. Happily debug source code.

To the third chapter I have only to open the third chapter, other sections off. This time on the problem, no matter how I reload cmake project, the third chapter of cpp file does not belong to any goal of the project, and I was OFF the sub-chapter project also good.

This file does not belong to any project target, code insight features might not work properly.

This can be a worry bad obsessive-compulsive disorder.

After accidentally on the sub-projects and new construction, I accidentally discovered that engineering information in the cmake-build-debug directory is generated after the load cmake. Chapter I ON sub-projects, sub-projects after OFF the second chapter, no matter reload cmake several times, in the cmake-build-debug directory is only the second sub-chapter project without sub-chapter project.

Solve the case.

delelte cmake-build-debug directory, reload cmake project, the main project cmake successfully updated information.

 

Guess you like

Origin www.cnblogs.com/Kiritsugu/p/11655894.html