Skip to content

Commit 18fbf22

Browse files
authored
Unpublished changes from develop branch (#967)
* Adds github settings file for portable labels (#951) * Adds github settings file for portable labels * make it generic * improve seealso in android studio * stettings * #3883 Update inspect command (#940) * #3883 Update inspect command Signed-off-by: Uilian Ries <[email protected]> * #3883 Update Inspect command output Signed-off-by: Uilian Ries <[email protected]> * #3883 Update default options for inspect Signed-off-by: Uilian Ries <[email protected]> * Added entry in the MSBuild reference. (#854) * Added entry in the MSBuild reference. * Update output_binary_log and get_version() * typo readme * fix default * clarification * review * undocumented parameter * fix * Make generator documentation (#955) * Make generator documentation * updated example * Added toctrees * review text * review * add missing variables for reference * Updated with information of the test and with new table * Get tool new parameters (#961) * Add `include_prerelease` and `loose` option to version range expression (#938) * Add `prerelease` and `strict` option to version range expression * Update version_ranges.rst * Change to `loose` and `include_prerelease` option * Update version_ranges.rst * Add example with both parameters * Added CONAN_CMAKE_SILENT_OUTPUT description to the cmake generator (#962) * Update attributes.rst (#966) Fixing typo
1 parent da8afcc commit 18fbf22

File tree

14 files changed

+423
-30
lines changed

14 files changed

+423
-30
lines changed

.github/settings.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# https://github.com/apps/settings
2+
3+
repository:
4+
has_wiki: false
5+
default_branch: develop
6+
7+
# Labels: define labels for Issues and Pull Requests
8+
# colors from: https://htmlcolorcodes.com/color-chart/
9+
labels:
10+
- name: "type: question"
11+
color: FADBD8
12+
old_name: "question"
13+
- name: "type: engineering"
14+
color: F5B7B1
15+
- name: "type: feature"
16+
color: EC7063
17+
old_name: "feature"
18+
- name: "type: look into"
19+
color: CB4335
20+
old_name: "look into"
21+
- name: "type: bug"
22+
color: 943126
23+
old_name: "bug"
24+
25+
- name: "complex: low"
26+
color: A3E4D7
27+
- name: "complex: medium"
28+
color: 48C9B0
29+
- name: "complex: high"
30+
color: 17A589
31+
- name: "complex: huge"
32+
color: 117864
33+
34+
- name: "priority: low"
35+
color: F9E79F
36+
- name: "priority: medium"
37+
color: F4D03F
38+
- name: "priority: high"
39+
color: D4AC0D
40+
- name: "priority: critical"
41+
color: 9A7D0A
42+
43+
- name: "component: artifactory"
44+
color: F4ECF7
45+
- name: "component: bintray"
46+
color: E8DAEF
47+
- name: "component: docker"
48+
color: D2B4DE
49+
- name: "component: CI"
50+
description: Only affects CI
51+
color: BB8FCE
52+
- name: "component: server"
53+
color: A569BD
54+
- name: "component: hook"
55+
color: 8E44AD
56+
- name: "component: build"
57+
color: 7D3C98
58+
old_name: "component: Build"
59+
description: Build helpers, build systems...
60+
- name: "component: scm"
61+
color: 6C3483
62+
- name: "component: UX"
63+
color: 5B2C6F
64+
old_name: "UX"
65+
description: No change in business logic
66+
67+
- name: "stage: triaging"
68+
color: E5E7E9
69+
- name: "stage: queue"
70+
color: CACFD2
71+
- name: "stage: in-progress"
72+
color: A6ACAF
73+
old_name: "in progress"
74+
- name: "stage: review"
75+
color: 797D7F
76+
old_name: "in review"
77+
78+
- name: "good first issue"
79+
color: ABEBC6
80+
- name: "help wanted"
81+
color: 58D68D
82+
- name: "Feedback please!"
83+
color: 28B463
84+
- name: "feature approved"
85+
color: 1D8348
86+
- name: "whiteboard"
87+
color: FDFEFE
88+
description: Needs discussion
89+
90+
- name: "duplicate"
91+
color: ABB2B9
92+
description: This was already reported
93+
- name: "inactive"
94+
color: 566573
95+
description: No comments for a long time
96+
- name: "obsolete"
97+
color: 273746
98+
description: Implementation will follow another direction

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ To add a reference to the `conan export-pkg` command from another text:
198198

199199
```
200200
Read more about the :ref:`conan export-pkg<conan_export_pkg_command>` command.
201-
Or reference the :ref:`conan_export_pkg_command``directly.
201+
Or reference the :ref:`conan_export_pkg_command` directly.
202202
```
203203

204204
#### External references

getting_started.rst

+8
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ An MD5 Encrypter using the Poco Libraries
8181
short_paths: False
8282
apply_env: True
8383
build_policy: None
84+
settings: ('os', 'arch', 'compiler', 'build_type')
85+
options:
86+
enable_apacheconnector: [True, False]
87+
shared: [True, False]
88+
default_options:
89+
enable_apacheconnector: False
90+
shared: False
91+
8492
8593
5. Ok, it looks like this dependency could work with our Encrypter app. We should indicate which are the requirements and the generator for
8694
our build system. Let's create a *conanfile.txt* inside our project's folder with the following content:

integrations.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ packages can be consumed, created, and continuously deployed/tested with each, a
2323
integrations/b2
2424
integrations/qmake
2525
integrations/premake
26+
integrations/make
2627
integrations/qbs
2728
integrations/meson
2829
integrations/docker

integrations/android_studio.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,11 @@ Build your project normally, conan will create a ``conan`` folder with a folder
141141

142142
Then run the app using an x86 emulator for best performance:
143143

144-
145144
|wizard9|
146145

146+
.. seealso::
147147

148-
149-
.. seealso:: Check the section :ref:`howtos/Cross building/Android <cross_building_android>` to read more about cross
150-
building for Android.
151-
148+
Check the section :ref:`cross_building_android` to read more about cross building for Android.
152149

153150

154151
.. |android_studio_logo| image:: ../images/android_studio_logo.png

integrations/make.rst

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
.. _make:
2+
3+
Make
4+
====
5+
6+
Conan provides integration with plain Makefiles by means of the ``make`` generator. If you are using ``Makefile`` to build your project you
7+
could get the information of the dependencies in a *conanbuildinfo.mak* file. All you have to do is indicate the generator like this:
8+
9+
.. code-block:: text
10+
:caption: *conanfile.txt*
11+
12+
[generators]
13+
make
14+
15+
.. code-block:: text
16+
:caption: *conanfile.py*
17+
18+
class MyConan(ConanFile):
19+
...
20+
generators = "make"
21+
22+
Example
23+
-------
24+
25+
We are going to use the same example from :ref:`getting_started`, a MD5 Encrypter app.
26+
27+
This is the main file for it:
28+
29+
.. code-block:: cpp
30+
:caption: main.cpp
31+
32+
#include "Poco/MD5Engine.h"
33+
#include "Poco/DigestStream.h"
34+
35+
#include <iostream>
36+
37+
38+
int main(int argc, char** argv)
39+
{
40+
Poco::MD5Engine md5;
41+
Poco::DigestOutputStream ds(md5);
42+
ds << "abcdefghijklmnopqrstuvwxyz";
43+
ds.close();
44+
std::cout << Poco::DigestEngine::digestToHex(md5.digest()) << std::endl;
45+
return 0;
46+
}
47+
48+
As this project relies on the Poco Libraries we are going to create a *conanfile.txt* with our requirement and declare there the Make
49+
generator too:
50+
51+
.. code-block:: text
52+
:caption: conanfile.txt
53+
54+
[requires]
55+
Poco/1.9.0@pocoproject/stable
56+
57+
[generators]
58+
make
59+
60+
In order to use this generator within your project, use the following Makefile as a reference:
61+
62+
.. code-block:: makefile
63+
:caption: Makefile
64+
65+
include conanbuildinfo.mak
66+
67+
#----------------------------------------
68+
# Make variables for a sample App
69+
#----------------------------------------
70+
71+
CXX_SRCS = \
72+
main.cpp
73+
74+
CXX_OBJ_FILES = \
75+
main.o
76+
77+
EXE_FILENAME = \
78+
main
79+
80+
81+
#----------------------------------------
82+
# Prepare flags from variables
83+
#----------------------------------------
84+
85+
CFLAGS += $(CONAN_CFLAGS)
86+
CXXFLAGS += $(CONAN_CPPFLAGS)
87+
CPPFLAGS += $(addprefix -I, $(CONAN_INCLUDE_PATHS))
88+
CPPFLAGS += $(addprefix -D, $(CONAN_DEFINES))
89+
LDFLAGS += $(addprefix -L, $(CONAN_LIB_PATHS))
90+
LDLIBS += $(addprefix -l, $(CONAN_LIBS))
91+
92+
93+
#----------------------------------------
94+
# Make Commands
95+
#----------------------------------------
96+
97+
COMPILE_CXX_COMMAND ?= \
98+
g++ -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
99+
100+
CREATE_EXE_COMMAND ?= \
101+
g++ $(CXX_OBJ_FILES) \
102+
$(CXXFLAGS) $(LDFLAGS) $(LDLIBS) \
103+
-o $(EXE_FILENAME)
104+
105+
106+
#----------------------------------------
107+
# Make Rules
108+
#----------------------------------------
109+
110+
.PHONY : exe
111+
exe : $(EXE_FILENAME)
112+
113+
$(EXE_FILENAME) : $(CXX_OBJ_FILES)
114+
$(CREATE_EXE_COMMAND)
115+
116+
%.o : $(CXX_SRCS)
117+
$(COMPILE_CXX_COMMAND)
118+
119+
Now we are going to let Conan retrieve the dependencies and generate the dependency information in a *conanbuildinfo.mak*:
120+
121+
.. code-block:: bash
122+
123+
$ conan install .
124+
125+
Then let's call :command:`make` to generate our project:
126+
127+
- Use this command for Windows Visual Studio:
128+
129+
.. code-block:: bash
130+
131+
$ make exe
132+
133+
Now you can run your application with ``./main``.
134+
135+
.. seealso::
136+
137+
Check the complete reference of the :ref:`Make generator<make_generator>`.

mastering/version_ranges.rst

+11
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ Expressions are those defined and implemented by https://pypi.org/project/node-s
3131
[>1.1 || 0.8] # conditions can be OR'ed
3232
[1.2.7 || >=1.2.9 <2.0.0] # This range would match the versions 1.2.7, 1.2.9, and 1.4.6, but not the versions 1.2.8 or 2.0.0.
3333
34+
There are two options for the version range:
35+
* *loose=True|False*: As default Conan uses the `loose=True` mode. When using `loose=False` the loose mode is deactivated, so that only valid Semantic Versioning strings are accepted.
36+
* *include_prerelease=True|False*: Default is `include_prerelease=False`. When set to `include_prerelease=True`, it will include prerelease versions in the search range.
37+
38+
.. code-block:: python
39+
40+
[>1.1 <2.1, include_prerelease=True] # Would e.g. accept "2.0.0-pre.1" as match
41+
[~1.2.3, loose=False] # Would only accept correct Semantic Versioning strings.
42+
# E.g. version "1.2.3.4" would not be accepted.
43+
[~1.2.3, loose=False, include_prerelease=True] # Both options can be used for the same version range.
44+
3445
Version range expressions are evaluated at the time of building the dependency graph, from
3546
downstream to upstream dependencies. No joint-compatibility of the full graph is computed, instead,
3647
version ranges are evaluated when dependencies are first retrieved.

0 commit comments

Comments
 (0)