When I set an executable:
enable_language(CXX)
add_executable( MyProj_MyExe2 main.cc )
CMake populates CMAKE_DEPENDS_LANGUAGES
in DependInfo.cmake
:
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
"CXX"
)
for a custom target, it does not:
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
)
How can I set CMAKE_DEPENDS_LANGUAGES
? I tried by setting the Linker Language
add_custom_target( MyProj_MyExe1 ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/MyExe1
SOURCES main.cc
)
set_target_properties( MyProj_MyExe1 PROPERTIES
LINKER_LANGUAGE CXX
)
but it doesn’t work. Is CMAKE_DEPENDS_LANGUAGES
a directory property?