Closed binarytrails closed 5 years ago
I suppose you have CMake 3.0 or older. Try to use CMake 3.1 or newer.
@eao197
Step 4/8 : RUN cmake --version
---> Running in 64d8dea1b424
cmake version 3.5.1
@eao197 If you wanna try it,
(note: I didn't filter the opendht dependencies out
and I clone your master since the 0.5.1
is not released yet but same logic):
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y build-essential cmake git wget libncurses5-dev libreadline-dev nettle-dev libgnutls28-dev libuv1-dev cython3 python3-dev libcppunit-dev libjsoncpp-dev libasio-dev libssl-dev python3-setuptools python3-pip && apt-get clean
#install conan
RUN pip3 install conan
#build restinio from source
RUN git clone https://github.com/Stiffstream/restinio-conan.git \
&& cd restinio-conan/ \
&& conan remote add stiffstream https://api.bintray.com/conan/stiffstream/public \
&& echo "[requires]" > conanfile.txt \
&& echo "restinio/0.5.0@stiffstream/stable" >> conanfile.txt \
&& git clone https://github.com/Stiffstream/restinio \
&& conan install . --build=missing \
&& conan package --package-folder /usr . \
&& git clone https://github.com/eao197/http-parser.git \
&& cd http-parser && make && make install PREFIX=/usr \
&& cd ../ && rm -rf restinio-conan/
Then, you can build with docker build . -t restinio -f Dockerfile
I'm doing this because we use Continuous Integration to run the tests with travis-ci.org
спасибо!!
Sorry, but I don't understand what you are trying to do.
The error with:
CMake Error at CMakeLists.txt:13 (set_target_properties): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "CXX_STANDARD" is not allowed.
Has been fixed in some CMake version after 3.5. So you can add the following lines in your Dockerfile to install the rather fresh version of CMake:
# install fresh version of cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.sh
RUN sh cmake-3.13.4-Linux-x86_64.sh --skip-license
RUN cmake --version
But why do you clone restinio-conan
repository? There is restinio-conan-example repo with an example of usage RESTinio via Conan.
@eao197
I posted the output of cmake --version
the it is way more recent than your suggestion of 3.13.4! Besides, I'm using restinio-conan as you can see in the docker file to build the first version of restinio with dependencies. However, I git clone the master because:
I clone your master since the 0.5.1 is not released yet but same logic
In what relates to:
Sorry, but I don't understand what you are trying to do.
My answer:
I'm doing this because we use Continuous Integration to run the tests with travis-ci.org
Finally, thank you for the link to your home-made docker using conan, I will give it a try right away!