Revision: 77741
          http://sourceforge.net/p/brlcad/code/77741
Author:   starseeker
Date:     2020-11-17 23:07:05 +0000 (Tue, 17 Nov 2020)
Log Message:
-----------
Arrgh.  Semicolons are used to define CMake lists, so they're a problem in 
CMAKE_BUILD_RPATH.  See if we can dodge the issue by avoiding passing the 
string on the command line.

Modified Paths:
--------------
    brlcad/branches/extbuild/src/other/ext/CMake/rpath_replace.cxx.in
    brlcad/branches/extbuild/src/other/ext/CMakeLists.txt
    brlcad/branches/extbuild/src/other/ext/tcl.cmake
    brlcad/branches/extbuild/src/other/ext/tk.cmake

Modified: brlcad/branches/extbuild/src/other/ext/CMake/rpath_replace.cxx.in
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/rpath_replace.cxx.in   
2020-11-17 22:50:25 UTC (rev 77740)
+++ brlcad/branches/extbuild/src/other/ext/CMake/rpath_replace.cxx.in   
2020-11-17 23:07:05 UTC (rev 77741)
@@ -12,9 +12,9 @@
        std::cerr << "Error: no file specified for processing or missing RPATH 
to set.\n";
        return -1;
     }
-    std::string new_rpath = std::string("-rpath,") + std::string(argv[1]);
+    std::string new_rpath = std::string("-rpath,") + 
std::string("@CMAKE_BUILD_RPATH@");
 
-    for (int i = 2; i < argc; i++) {
+    for (int i = 1; i < argc; i++) {
        std::string cline;
        std::string nfile_contents;
        std::ifstream fs;

Modified: brlcad/branches/extbuild/src/other/ext/CMakeLists.txt
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMakeLists.txt       2020-11-17 
22:50:25 UTC (rev 77740)
+++ brlcad/branches/extbuild/src/other/ext/CMakeLists.txt       2020-11-17 
23:07:05 UTC (rev 77741)
@@ -154,7 +154,8 @@
   set(EXTPROJ_VERBOSE 0)
 endif(NOT DEFINED EXTPROJ_VERBOSE)
 
-# Tool for replacing rpath values in build files
+# Tool for replacing rpath values in build files.  CMAKE_BUILD_RPATH must be
+# set before configuring this file.
 configure_file(${BDEPS_CMAKE_DIR}/rpath_replace.cxx.in 
${CMAKE_CURRENT_BINARY_DIR}/rpath_replace.cxx)
 add_executable(rpath_replace ${CMAKE_CURRENT_BINARY_DIR}/rpath_replace.cxx)
 DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/rpath_replace.cxx)

Modified: brlcad/branches/extbuild/src/other/ext/tcl.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-11-17 22:50:25 UTC 
(rev 77740)
+++ brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-11-17 23:07:05 UTC 
(rev 77741)
@@ -75,7 +75,7 @@
     ExternalProject_Add(TCL_BLD
       URL "${CMAKE_CURRENT_SOURCE_DIR}/tcl"
       BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
-      PATCH_COMMAND rpath_replace "${CMAKE_BUILD_RPATH}" ${TCL_PATCH_FILES}
+      PATCH_COMMAND rpath_replace ${TCL_PATCH_FILES}
       COMMAND tcl_replace ${TCL_REWORK_FILES}
       CONFIGURE_COMMAND CPPFLAGS=-I${CMAKE_BINARY_ROOT}/${INCLUDE_DIR} 
LDFLAGS=-L${CMAKE_BINARY_ROOT}/${LIB_DIR} ${TCL_SRC_DIR}/unix/configure 
--prefix=${TCL_INSTDIR}
       BUILD_COMMAND make -j${pcnt}

Modified: brlcad/branches/extbuild/src/other/ext/tk.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-11-17 22:50:25 UTC 
(rev 77740)
+++ brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-11-17 23:07:05 UTC 
(rev 77741)
@@ -56,7 +56,7 @@
     ExternalProject_Add(TK_BLD
       URL "${CMAKE_CURRENT_SOURCE_DIR}/tk"
       BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
-      PATCH_COMMAND rpath_replace "${CMAKE_BUILD_RPATH}" ${TK_PATCH_FILES}
+      PATCH_COMMAND rpath_replace ${TK_PATCH_FILES}
       CONFIGURE_COMMAND CPPFLAGS=-I${CMAKE_BINARY_ROOT}/${INCLUDE_DIR} 
LDFLAGS=-L${CMAKE_BINARY_ROOT}/${LIB_DIR} ${TK_SRC_DIR}/unix/configure 
--prefix=${TK_INSTDIR} 
--with-tcl=$<IF:$<BOOL:${TCL_TARGET}>,${CMAKE_BINARY_ROOT}/${LIB_DIR},${TCLCONF_DIR}>
 --disable-xft --enable-64bit --enable-rpath
       BUILD_COMMAND make -j${pcnt}
       INSTALL_COMMAND make install

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to