cmake: hide internal targets
Use imported library, which does not create additional rules, but still allows attaching arbitraty properties instead of custom targets. This allows the targets to not appear in the target list of IDEs such as CLion.
This commit is contained in:
parent
02c7c3885e
commit
72ddc940e0
2 changed files with 2 additions and 2 deletions
|
@ -129,7 +129,7 @@ endfunction()
|
||||||
#
|
#
|
||||||
function(__build_init idf_path)
|
function(__build_init idf_path)
|
||||||
# Create the build target, to which the ESP-IDF build properties, dependencies are attached to
|
# Create the build target, to which the ESP-IDF build properties, dependencies are attached to
|
||||||
add_custom_target(__idf_build_target)
|
add_library(__idf_build_target STATIC IMPORTED)
|
||||||
|
|
||||||
set_default(python "python")
|
set_default(python "python")
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ function(__component_add component_dir prefix)
|
||||||
# 'override' components added earlier.
|
# 'override' components added earlier.
|
||||||
if(NOT component_target IN_LIST component_targets)
|
if(NOT component_target IN_LIST component_targets)
|
||||||
if(NOT TARGET ${component_target})
|
if(NOT TARGET ${component_target})
|
||||||
add_custom_target(${component_target} EXCLUDE_FROM_ALL)
|
add_library(${component_target} STATIC IMPORTED)
|
||||||
endif()
|
endif()
|
||||||
idf_build_set_property(__COMPONENT_TARGETS ${component_target} APPEND)
|
idf_build_set_property(__COMPONENT_TARGETS ${component_target} APPEND)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue