<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi everyone,</p>
<p>i try to patch a file from an externalprojects with the
PATCH_COMMAND.</p>
<p>The patch file looks like: <br>
</p>
<pre>--- project-config.jam 2019-07-18 17:21:44.008695808 +0200
+++ project-config.jam.tmp 2019-07-18 17:23:28.236474532 +0200
@@ -18,7 +18,7 @@
import python ;
if ! [ python.configured ]
{
- using python : 2.7 : /usr ;
+ using python : 3.7 : /usr ;
}
path-constant ICU_PATH : /usr ;
</pre>
<p>When i try to apply the patch manualy with patch originalfile
< patchfile it's working, but when i try it with the
externalproject_add command:</p>
<pre>if(WITH_LIB_BOOST)
message(STATUS "Build WITH_LIB_BOOST.")
set(LIB_BOOST_INC_PATH ${OUTPUT_PATH}/libs/boost/include/)
set(LIB_BOOST_LIB_PATH ${OUTPUT_PATH}/libs/boost/lib)
set(LIB_BOOST_DEPS external_boost)
set(LIB_BOOST_STATIC_LIBS boost_python27)
ExternalProject_Add(external_boost
PREFIX ${CMAKE_BINARY_DIR}/boost
URL ${BOOST_URL}
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/boost
URL_HASH MD5=${BOOST_HASH}
PATCH_COMMAND /usr/bin/patch ${CMAKE_BINARY_DIR}/boost/src/external_boost/project-config.jam < ${CMAKE_SOURCE_DIR}/tools/patches/boost_python3.7.patch
CONFIGURE_COMMAND cd ${CMAKE_BINARY_DIR}/boost/src/external_boost/ &&
./bootstrap.sh --prefix=${OUTPUT_PATH}/libs/boost/ --with-libraries=python
BUILD_COMMAND cd ${CMAKE_BINARY_DIR}/boost/src/external_boost/ &&
./b2
INSTALL_COMMAND cd ${CMAKE_BINARY_DIR}/boost/src/external_boost/ && ./bjam && ./bjam install
INSTALL_DIR ${OUTPUT_PATH}/boost
)
endif()
</pre>
<p>But when running cmake i get the following output:</p>
<pre>patching file /home/stuv/projects/programming/bsEdit/build/boost/src/external_boost/project-config.jam</pre>
<pre>Hunk #1 FAILED at 18.</pre>
<p><br>
</p>
<p>I have no idea what i'm doing wrong here, i hope someone here can
help me out.</p>
<p><br>
</p>
<p>best regards,</p>
<p>Steven Truppe<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>