File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,27 @@ when a package is being built directly by Conan (create, install)
35
35
cmake.configure()
36
36
cmake.build()
37
37
38
+ **Experimental ** feature. ``CMake.configure() ``, ``CMake.build() `` and ``CMake.install() `` methods have the **subfolder ** parameter in case you have
39
+ more than one ``CMakeLists.txt `` in different folders.
40
+ This feature allows you to call the **configure ** **build ** and **install ** method of each **CMakeLists.txt **
41
+ separately and without mixing the generated files and artifacts, also creating these folders in the
42
+ **build folder ** and **package folder **.
38
43
44
+ In the following example, we can see what it would look like if we had two different **CMakeLists.txt **
45
+ (**cmake_1/CMakeLists.txt ** and **cmake_2/CMakeLists.txt **) in the **folder1 ** and **folder2 ** folders.
46
+
47
+ .. code-block :: python
48
+
49
+ def build (self ):
50
+ cmake = CMake(self )
51
+
52
+ # Configure and build source_folder/cmake_1/CMakeLists.txt in folder1
53
+ cmake.configure(build_script_folder = " cmake_1" , subfolder = " folder1" )
54
+ cmake.build(subfolder = " folder1" )
55
+
56
+ # Configure and build source_folder/cmake_2/CMakeLists.txt in folder2
57
+ cmake.configure(build_script_folder = " cmake_2" subfolder = " folder2" )
58
+ cmake.build(subfolder = " folder2" )
39
59
40
60
Reference
41
61
---------
You can’t perform that action at this time.
0 commit comments