Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
Qt Creator 4.3.0-beta1
-
QtCreator 4.3 beta1 (4.2.82) / Buntu 16.04 LTS / cmake 3.5.1
Description
As described in QTCREATORBUG-17861: QtCrator 4.2 does not list header-only implementations in the project view if they are not mentioned in any CMakeLists.txt file.
New in QtCreator 4.3 beta 1: header files are listed in the project view even if they are not mentioned in the cmake files (as long as "hide generated files" is not checked).
A workaround for QtCreator 4.2 is to create a dummy target that collects all header files:
file(GLOB_RECURSE ALL_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") add_library(dummy_target_with_all_headers EXCLUDE_FROM_ALL ${ALL_HEADER_FILES}) target_link_libraries(dummy_target_with_all_headers) set_target_properties(dummy_target_with_all_headers PROPERTIES LINKER_LANGUAGE CXX)
Opening the project in QtCreator 4.3 with such a dummy target leads to doubled header files in the project view (if "hide generated files" is not checked).
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-17955 cmake importer duplicates header files
-
- Closed
-