Skip to content

Commit 67fec7e

Browse files
committed
tooling: Add package-debug target to Makefile.package
1 parent 76cb9de commit 67fec7e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Makefile.package

+17
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ BUILD_CMAKECACHE := ${BUILD_DIR}/CMakeCache.txt
4040
BUILD_LAYOUT := ${PROJECT_ROOT}/.conan-layout.ini
4141
BUILD_POLICY := missing
4242

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.
45+
#
46+
# This can be one of: None, Debug, Release, RelWithDebInfo, MinSizeRel
47+
DEBUG_BUILD_TYPE := Debug
48+
4349
PACKAGE_NAME := $(shell sed -rn 's/.*name\s*=\s*"([^"]+)"$$/\1/p' ${SOURCE_CONANFILE})
4450
PACKAGE_VERSION := $(or \
4551
$(shell sed -rn 's/\s+version\s*=\s*"([^"]+)"$$/\1/p' ${SOURCE_CONANFILE}), \
@@ -164,6 +170,17 @@ package-outdated:
164170
#
165171
conan create . ${PACKAGE_CHANNEL} --build=outdated ${CONAN_OPTIONS}
166172

173+
package-debug:
174+
# Build the package in Conan cache unconditionally in debug mode.
175+
#
176+
# Conan will retrieve and build all dependencies based on the build policy.
177+
# Note that this cannot be called if the package is currently in editable mode.
178+
#
179+
# See: https://docs.conan.io/en/latest/mastering/policies.html
180+
# See: https://docs.conan.io/en/latest/using_packages/debugging.html
181+
#
182+
conan create . ${PACKAGE_CHANNEL} -s build_type=${DEBUG_BUILD_TYPE} --build=${BUILD_POLICY} --build=${PACKAGE_NAME} ${CONAN_OPTIONS}
183+
167184
purge:
168185
# Remove all instances of this package in the Conan cache.
169186
#

0 commit comments

Comments
 (0)