To help us debug your issue please explain:
When trying to run CMake from Conan. I consistently get the following error:
$ conan install . --install-folder build
$ conan build . --build-folder build
conanfile.py: Running build()
conanfile.py: WARN: This conanfile has no build step
The content of conanfile.py is as follows:
from conans import ConanFile, CMake
class LibConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "gflags/2.2.2@bincrafters/stable", "qt/5.13.0@bincrafters/stable", "zlib/1.2.11@conan/stable"
generators = "cmake"
default_options = {"qt:opengl": "desktop", "qt:with_mysql": False}
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
I'm using Conan 1.16.1 on Fedora 30.
Hi @wouterbeek
There is a bad indention there. def build is part of LibConan, you need to add one indentation level:
from conans import ConanFile, CMake
class LibConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "gflags/2.2.2@bincrafters/stable", "qt/5.13.0@bincrafters/stable", "zlib/1.2.11@conan/stable"
generators = "cmake"
default_options = {"qt:opengl": "desktop", "qt:with_mysql": False}
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
Thanks for the fix!
Most helpful comment
Hi @wouterbeek
There is a bad indention there.
def buildis part ofLibConan, you need to add one indentation level: