@@ -41,9 +41,11 @@ BUILD_LAYOUT := ${PROJECT_ROOT}/.conan-layout.ini
41
41
BUILD_POLICY := missing
42
42
43
43
# Normally, you should set this in your profile, but if you just want to build
44
- # the package in debug mode once, you can do it this way.
44
+ # the package in debug mode once, you can do it this way, although it will
45
+ # only apply to local builds.
45
46
#
46
47
# This can be one of: None, Debug, Release, RelWithDebInfo, MinSizeRel
48
+ BUILD_TYPE := RelWithDebInfo
47
49
DEBUG_BUILD_TYPE := Debug
48
50
49
51
PACKAGE_NAME := $(shell sed -rn 's/.* name\s* =\s* "([^"]+) "$$/\1/p' ${SOURCE_CONANFILE})
@@ -101,6 +103,7 @@ help:
101
103
echo " SOURCE_DIR: ${SOURCE_DIR} "
102
104
echo " BUILD_DIR: ${BUILD_DIR} "
103
105
echo " BUILD_POLICY: ${BUILD_POLICY} "
106
+ echo " BUILD_TYPE: ${BUILD_TYPE} "
104
107
echo " CONAN_OPTIONS: ${CONAN_OPTIONS} "
105
108
echo
106
109
echo " Package information:"
@@ -176,15 +179,19 @@ package:
176
179
#
177
180
# See: https://docs.conan.io/en/latest/mastering/policies.html
178
181
#
179
- conan create . ${PACKAGE_CHANNEL} --build=${BUILD_POLICY} --build=${PACKAGE_NAME} ${CONAN_OPTIONS}
182
+ conan create . ${PACKAGE_CHANNEL} \
183
+ --build=${BUILD_POLICY} --build=${PACKAGE_NAME} \
184
+ ${CONAN_OPTIONS}
180
185
181
186
package-all :
182
187
# Build the package in Conan cache unconditionally.
183
188
#
184
189
# Conan will retrieve and build all dependencies unconditionally.
185
190
# Note that this cannot be called if the package is currently in editable mode.
186
191
#
187
- conan create . ${PACKAGE_CHANNEL} --build ${CONAN_OPTIONS}
192
+ conan create . ${PACKAGE_CHANNEL} \
193
+ --build \
194
+ ${CONAN_OPTIONS}
188
195
189
196
package-outdated :
190
197
# Build the package in Conan cache if it is outdated.
@@ -193,18 +200,9 @@ package-outdated:
193
200
# Rebuilds will occur if package info has changed or a hash of the source
194
201
# code changes. Timestamps are not taken into account.
195
202
#
196
- conan create . ${PACKAGE_CHANNEL} --build=outdated ${CONAN_OPTIONS}
197
-
198
- package-debug :
199
- # Build the package in Conan cache unconditionally in debug mode.
200
- #
201
- # Conan will retrieve and build all dependencies based on the build policy.
202
- # Note that this cannot be called if the package is currently in editable mode.
203
- #
204
- # See: https://docs.conan.io/en/latest/mastering/policies.html
205
- # See: https://docs.conan.io/en/latest/using_packages/debugging.html
206
- #
207
- conan create . ${PACKAGE_CHANNEL} -s build_type=${DEBUG_BUILD_TYPE} --build=${BUILD_POLICY} --build=${PACKAGE_NAME} ${CONAN_OPTIONS}
203
+ conan create . ${PACKAGE_CHANNEL} \
204
+ --build=outdated \
205
+ ${CONAN_OPTIONS}
208
206
209
207
purge :
210
208
# Remove all instances of this package in the Conan cache.
@@ -277,7 +275,10 @@ ${BUILD_CONANINFO}: ${SOURCE_CONANFILE}
277
275
# Install package dependencies and prepare in-source build.
278
276
#
279
277
mkdir -p ${BUILD_DIR}
280
- conan install . --install-folder=${BUILD_DIR} --build=${BUILD_POLICY} ${CONAN_OPTIONS}
278
+ conan install . --install-folder=${BUILD_DIR} \
279
+ -s ${PACKAGE_NAME} :build_type=${BUILD_TYPE} \
280
+ --build=${BUILD_POLICY} \
281
+ ${CONAN_OPTIONS}
281
282
touch ${BUILD_CONANINFO}
282
283
283
284
${BUILD_CMAKECACHE} : ${BUILD_CONANINFO} ${SOURCE_CMAKELISTS}
0 commit comments