disable cmake compiler check language=None - #4276
memsharded merged 3 commits into
Conversation
| conan_message(STATUS "WARN: Disabled conan compiler checks") | ||
| return() | ||
| endif() | ||
| if(NOT DEFINED CMAKE_CXX_COMPILER_ID) |
There was a problem hiding this comment.
I suppose we also have to check ENABLED_LANGUAGES property (obviously, after the CONAN_DISABLE_CHECK_COMPILER check)
(to obtain a list use get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES))
and execute checks only if it has C or CXX in the list (potentially, also Objective-C and Objective-C++?),
otherwise skip (no language at all / Fortran / D / Rust / Go / C# / Whatever else)
see also:
https://cmake.org/cmake/help/v3.3/command/project.htm
https://cmake.org/cmake/help/v3.3/prop_gbl/ENABLED_LANGUAGES.html
There was a problem hiding this comment.
I guess that if someone is using conan for those languages, they are already setting CONAN_DISABLE_CHECK_COMPILER. And if for some other reason the language is not set, maybe it is better to raise an error early.
There was a problem hiding this comment.
yeah, raising an error might be a good strategy in this case.
Changelog: Bugfix: conanbuildinfo.cmake won't fail if
project()LANGUAGE is None, but the user definesCONAN_DISABLE_CHECK_COMPILER.Docs: Omit
Close #4268