[dlib] Fix assert configuration issue in release mode

This commit is contained in:
Robert Schumacher 2018-01-27 16:07:07 -08:00
parent 5c9c1bde53
commit c835db39e8
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
Source: dlib
Version: 19.9
Version: 19.9-1
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++

View File

@ -61,8 +61,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead.
file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents)
string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if !defined(NDEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents})
file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents)