Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable cmake compiler check language=None #4276

Merged

Conversation

Projects
None yet
3 participants
@memsharded
Copy link
Contributor

commented Jan 10, 2019

Changelog: Bugfix: conanbuildinfo.cmake won't fail if project() LANGUAGE is None, but the user defines CONAN_DISABLE_CHECK_COMPILER.

Docs: Omit

Close #4268

@ghost ghost assigned memsharded Jan 10, 2019

@ghost ghost added the stage: review label Jan 10, 2019

@memsharded memsharded added this to the 1.12 milestone Jan 10, 2019

@memsharded memsharded assigned lasote and unassigned memsharded Jan 10, 2019

@ghost ghost assigned memsharded Jan 11, 2019

if(CONAN_DISABLE_CHECK_COMPILER)
conan_message(STATUS "WARN: Disabled conan compiler checks")
return()
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER_ID)

This comment has been minimized.

Copy link
@SSE4

SSE4 Jan 13, 2019

Contributor

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

This comment has been minimized.

Copy link
@memsharded

memsharded Jan 13, 2019

Author Contributor

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.

This comment has been minimized.

Copy link
@SSE4

SSE4 Jan 14, 2019

Contributor

yeah, raising an error might be a good strategy in this case.

@lasote

lasote approved these changes Jan 14, 2019

@memsharded memsharded merged commit a707730 into conan-io:develop Jan 16, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@memsharded memsharded deleted the memsharded:feature/disable_cmake_compiler_check branch Jan 16, 2019

@ghost ghost removed the stage: review label Jan 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.