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

Fix uninitialized variable errors / warnings #414

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

lukasmoellerch
Copy link

A build of mine was failing when configuring using the following preset:

 {
      "name": "dev",
      "binaryDir": "${sourceDir}/build",
      "generator": "Unix Makefiles",
      "warnings": {
        "dev": true,
        "deprecated": true,
        "uninitialized": true,
        "unusedCli": true,
        "systemVars": false
      },
      "errors": {
        "dev": true,
        "deprecated": true
      },
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Release",
      }
    }

this was caused mainly due to uninitialized variables in the conan cmake module, which should be fixed here.

I am using the find_package generator and it uses the following function:

function(conan_message MESSAGE_OUTPUT)
    if(NOT CONAN_CMAKE_SILENT_OUTPUT)
        message(${ARGV${0}})
    endif()
endfunction()

in this case ${0} is undefined (I am also not sure where it would be defined), thus I defined it here - shall I create a PR to the main cmake repo instead?

I am new to cmake - any feedback is greatly appreciated!

@CLAassistant
Copy link

CLAassistant commented Apr 21, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants