Closed HerbertKoelman closed 6 years ago
Hi, declaring a setting None
in the settings.yml
, like (Windows: sdk: None
) file means "You allow the setting to be undefined". So pass -s os.sdk="None"
makes no sense. Just avoid passing the setting and it will be None
.
That's what I thought too, but this command returns:
$ conan create .. rcs/testing -s os=Linux
ERROR: cpp-pthread/1.8.0@rcs/testing: 'settings.os.sdk' value not defined
Any idea ?
Full output:
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=5
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]
ERROR: cpp-pthread/1.8.0@rcs/testing: 'settings.os.sdk' value not defined
Now, I know what is happening. If you want to allow None
value you have to declare it as a list:
os:
Linux:
sdk: [None]
But, you have to declare which values are also valid in that list. If you want to allow any value, use ANY:
os:
Linux:
sdk: ANY
But then the "None" value is not allowed. In other words, you can only allow None
if there is a known list of elements, something like sdk: [None, ANY]
is not working. Is this what are you looking for?
Thank you very much for your quick help.
Indeed, None
needs to be a list member.
I fixed my settings.yml
file and everything is fine.
Regards
I've taylored my
settings.yml
file (see attached file). As one can see I've added a SDK notion and for OSLinux
I mean to say that there is no known version (hence theNone
).With my settings I expected this to run just fine :
Obviously I was wrong.
I've searched the documentation, but failed to find some explanation on what's going on here.
Anyone ?
Settings.yml:
conanfile.py
Full display: