Revision: 77625
          http://sourceforge.net/p/brlcad/code/77625
Author:   starseeker
Date:     2020-10-24 01:44:02 +0000 (Sat, 24 Oct 2020)
Log Message:
-----------
Update distclean to handle the external build outputs.

Modified Paths:
--------------
    brlcad/branches/extbuild/src/other/ext/CMakeLists.txt
    brlcad/branches/extbuild/src/other/ext/bson.cmake
    brlcad/branches/extbuild/src/other/ext/gdal.cmake
    brlcad/branches/extbuild/src/other/ext/itcl.cmake
    brlcad/branches/extbuild/src/other/ext/itk.cmake
    brlcad/branches/extbuild/src/other/ext/iwidgets.cmake
    brlcad/branches/extbuild/src/other/ext/netpbm.cmake
    brlcad/branches/extbuild/src/other/ext/perplex.cmake
    brlcad/branches/extbuild/src/other/ext/png.cmake
    brlcad/branches/extbuild/src/other/ext/proj4.cmake
    brlcad/branches/extbuild/src/other/ext/regex.cmake
    brlcad/branches/extbuild/src/other/ext/stepcode.cmake
    brlcad/branches/extbuild/src/other/ext/tcl.cmake
    brlcad/branches/extbuild/src/other/ext/tk.cmake
    brlcad/branches/extbuild/src/other/ext/zlib.cmake

Modified: brlcad/branches/extbuild/src/other/ext/CMakeLists.txt
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMakeLists.txt       2020-10-24 
01:01:44 UTC (rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/CMakeLists.txt       2020-10-24 
01:44:02 UTC (rev 77625)
@@ -66,17 +66,14 @@
 # projects, so we can include them with -isystem
 unset(SYS_INCLUDE_PATTERNS CACHE)
 
-# For the individual builds to be done here, we need to target their installs
-# to locations in the CMAKE_BINARY_DIR, which is the only place we can be
-# assured of having write access.  However, for multiconfig build systems, we
-# need to define per-config output targets so each individual config's build
-# won't stomp on the output from other configs.  We also *don't* want to do
-# that for single config builds, where user expectation is that
-# CMAKE_BINARY_DIR is the root for such paths.  The $<CONFIG> generator
-# expression lets us set up per-config paths, but as $<CONFIG> is ALSO defined
-# for non-multiconfig builds when CMAKE_BUILD_TYPE is set we need to define
-# $<CONFIG> based paths ONLY when we have CMAKE_CONFIGURATION_TYPES set
-# (which indicates a multiconfig generator is in use.)
+# For the individual builds to be done here, we need to place their outputs to
+# standard locations in the CMAKE_BINARY_DIR.  However, that target is not
+# always unique - for multiconfig build systems, we need to define per-config
+# output targets.  The $<CONFIG> generator expression lets us set up per-config
+# paths, but as $<CONFIG> is ALSO defined for non-multiconfig builds when
+# CMAKE_BUILD_TYPE is set we need to define $<CONFIG> based paths ONLY when we
+# have CMAKE_CONFIGURATION_TYPES set (which indicates a multiconfig generator
+# is in use.)
 if (CMAKE_CONFIGURATION_TYPES)
   set(CMAKE_BINARY_ROOT "${CMAKE_BINARY_DIR}/$<CONFIG>")
 else (CMAKE_CONFIGURATION_TYPES)
@@ -83,6 +80,12 @@
   set(CMAKE_BINARY_ROOT "${CMAKE_BINARY_DIR}")
 endif (CMAKE_CONFIGURATION_TYPES)
 
+# We execute the install process of ExternalProjects and then copy the outputs
+# we need into the BRL-CAD structure.  For cleanup convenience, use a common
+# install target that will hold all of the various subbuild outputs.
+set(CMAKE_BINARY_INSTALL_ROOT "${CMAKE_BINARY_ROOT}/extinstall")
+DISTCLEAN("${CMAKE_BINARY_ROOT}/extinstall")
+
 #---------------------------------------------------------------------
 # Define relative install locations and output directories.  Don't set
 # these if they have already been set by some other means (like a
@@ -147,6 +150,7 @@
 # Tool for replacing rpath values in build files
 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)
 
 # Independent projects with their own build systems (potentially not CMake
 # based) need ExternalProject_Add
@@ -167,6 +171,7 @@
     set_property(TARGET buildpath_replace PROPERTY 
RUNTIME_OUTPUT_DIRECTORY_${CTU} ${CMAKE_BINARY_DIR}/CMakeTmp)
   endforeach(ct ${CMAKE_CONFIGURATION_TYPES})
 endif(CMAKE_CONFIGURATION_TYPES)
+DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/buildpath_replace.cxx)
 
 # BRL-CAD defines some additional custom targets used to manage the outputs of
 # ExternalProject_Add targets.

Modified: brlcad/branches/extbuild/src/other/ext/bson.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/bson.cmake   2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/bson.cmake   2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -42,6 +42,7 @@
     LINK_TARGET ${BSON_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
     RPATH
     )
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/BSON_BLD-prefix")
   ExternalProject_Target(STATIC bson-static BSON_BLD
     ${BSON_BASENAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
     )

Modified: brlcad/branches/extbuild/src/other/ext/gdal.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/gdal.cmake   2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/gdal.cmake   2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -36,7 +36,7 @@
     set(PNG_TARGET PNG_BLD)
   endif (TARGET PNG_BLD)
 
-  set(GDAL_INSTDIR ${CMAKE_BINARY_ROOT}/ext/gdal)
+  set(GDAL_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/gdal)
 
   if (MSVC)
     set(ZLIB_LIBRARY ${CMAKE_BINARY_ROOT}/${LIB_DIR}/${ZLIB_BASENAME}.lib)
@@ -60,6 +60,8 @@
     DEPENDS ${GDAL_DEPS}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/GDAL_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED gdal GDAL_BLD ${GDAL_INSTDIR}
     ${GDAL_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/itcl.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/itcl.cmake   2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/itcl.cmake   2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -74,7 +74,7 @@
       list(APPEND ITCL_DEPS tclsh_exe_stage)
     endif (TARGET tcl_stage)
 
-    set(ITCL_INSTDIR ${CMAKE_BINARY_ROOT}/ext/itcl3)
+    set(ITCL_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/itcl3)
 
     ExternalProject_Add(ITCL_BLD
       SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/itcl3"
@@ -92,6 +92,8 @@
       DEPENDS ${ITCL_DEPS}
       )
 
+    DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/ITCL_BLD-prefix")
+
     if (NOT MSVC)
       set(ITCL_BASENAME libitcl${ITCL_MAJOR_VERSION}.${ITCL_MINOR_VERSION})
       set(ITCL_STUBNAME libitclstub)

Modified: brlcad/branches/extbuild/src/other/ext/itk.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/itk.cmake    2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/itk.cmake    2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -63,7 +63,7 @@
       list(APPEND ITK_DEPS wish_exe_stage)
     endif (TARGET tk_stage)
 
-    set(ITK_INSTDIR ${CMAKE_BINARY_ROOT}/ext/itk3)
+    set(ITK_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/itk3)
 
     ExternalProject_Add(ITK_BLD
       SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/itk3"
@@ -82,6 +82,8 @@
       DEPENDS ${ITK_DEPS}
       )
 
+    DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/ITK_BLD-prefix")
+
     if (NOT MSVC)
       set(ITK_BASENAME libitk${ITK_MAJOR_VERSION}.${ITK_MINOR_VERSION})
       set(ITK_STUBNAME libitkstub)

Modified: brlcad/branches/extbuild/src/other/ext/iwidgets.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/iwidgets.cmake       2020-10-24 
01:01:44 UTC (rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/iwidgets.cmake       2020-10-24 
01:44:02 UTC (rev 77625)
@@ -48,7 +48,7 @@
     # dependencies - just point it to our local source copy
     set(ITK_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/itk3")
 
-    set(IWIDGETS_INSTDIR "${CMAKE_BINARY_ROOT}/ext/iwidgets")
+    set(IWIDGETS_INSTDIR "${CMAKE_BINARY_INSTALL_ROOT}/iwidgets")
 
     ExternalProject_Add(IWIDGETS_BLD
       SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/iwidgets"
@@ -59,6 +59,8 @@
       DEPENDS ${IWIDGETS_DEPS}
       )
 
+    DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/IWIDGETS_BLD-prefix")
+
     # Tell the parent build about files and libraries
     ExternalProject_ByProducts(iwidgets IWIDGETS_BLD ${IWIDGETS_INSTDIR} 
${LIB_DIR}/Iwidgets${IWIDGETS_VERSION}
       iwidgets.tcl

Modified: brlcad/branches/extbuild/src/other/ext/netpbm.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/netpbm.cmake 2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/netpbm.cmake 2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -19,7 +19,7 @@
     set(NETPBM_BASENAME libnetpbm)
   endif (MSVC)
 
-  set(NETPBM_INSTDIR ${CMAKE_BINARY_ROOT}/ext/netpbm)
+  set(NETPBM_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/netpbm)
 
   ExternalProject_Add(NETPBM_BLD
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/netpbm"
@@ -28,6 +28,8 @@
                -DCMAKE_INSTALL_RPATH=${CMAKE_BUILD_RPATH} 
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/NETPBM_BLD-prefix")
+
  # Tell the parent build about files and libraries
  ExternalProject_Target(SHARED netpbm NETPBM_BLD ${NETPBM_INSTDIR}
    ${NETPBM_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/perplex.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/perplex.cmake        2020-10-24 
01:01:44 UTC (rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/perplex.cmake        2020-10-24 
01:44:02 UTC (rev 77625)
@@ -1,6 +1,7 @@
 if (BRLCAD_LEVEL2)
 
-  set(PERPLEX_BLD_ROOT ${CMAKE_BINARY_DIR}/other/ext/perplex)
+  set(PERPLEX_BLD_ROOT "${CMAKE_BINARY_DIR}/other/ext/perplex")
+  DISTCLEAN("${CMAKE_BINARY_DIR}/other/ext/perplex")
 
   ExternalProject_Add(PERPLEX_BLD
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/perplex"
@@ -9,6 +10,8 @@
     -DCMAKE_INSTALL_RPATH=${CMAKE_BUILD_RPATH} -DDATA_DIR=${DATA_DIR}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/PERPLEX_BLD-prefix")
+
   # Tell the parent about files and libraries
   ExternalProject_Target(EXEC perplex_lemon PERPLEX_BLD ${PERPLEX_BLD_ROOT}
     lemon${CMAKE_EXECUTABLE_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/png.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/png.cmake    2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/png.cmake    2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -41,7 +41,7 @@
     list(APPEND PNG_DEPS ZLIB_BLD zlib_stage)
   endif (TARGET ZLIB_BLD)
 
-  set(PNG_INSTDIR ${CMAKE_BINARY_ROOT}/ext/png)
+  set(PNG_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/png)
 
   if (MSVC)
     set(ZLIB_LIBRARY ${CMAKE_BINARY_ROOT}/${LIB_DIR}/${ZLIB_BASENAME}.lib)
@@ -64,6 +64,8 @@
     DEPENDS ${PNG_DEPS}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/PNG_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED png PNG_BLD ${PNG_INSTDIR}
     ${PNG_BASENAME}${PNG_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/proj4.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/proj4.cmake  2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/proj4.cmake  2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -27,7 +27,7 @@
     set(PROJ_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}.${PROJ_VERSION})
   endif (MSVC)
 
-  set(PROJ4_INSTDIR ${CMAKE_BINARY_ROOT}/ext/proj-4)
+  set(PROJ4_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/proj-4)
 
   ExternalProject_Add(PROJ4_BLD
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/proj-4"
@@ -37,6 +37,8 @@
                -DPROJ_LIB_DIR=${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/proj
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/PROJ4_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED proj PROJ4_BLD ${PROJ4_INSTDIR}
     ${PROJ_BASENAME}${PROJ_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/regex.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/regex.cmake  2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/regex.cmake  2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -22,7 +22,7 @@
     set(REGEX_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}.${REGEX_VERSION})
   endif (MSVC)
 
-  set(REGEX_INSTDIR ${CMAKE_BINARY_ROOT}/ext/regex)
+  set(REGEX_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/regex)
 
   # Platform differences in default linker behavior make it difficult to
   # guarantee that our libregex symbols will override libc. We'll avoid the
@@ -35,6 +35,8 @@
     -DREGEX_PREFIX_STR=libregex_
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/REGEX_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED regex REGEX_BLD ${REGEX_INSTDIR}
     ${REGEX_BASENAME}${REGEX_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/stepcode.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/stepcode.cmake       2020-10-24 
01:01:44 UTC (rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/stepcode.cmake       2020-10-24 
01:44:02 UTC (rev 77625)
@@ -31,7 +31,7 @@
     list(APPEND SC_DEPS perplex_lemon perplex_re2c perplex_perplex)
   endif (TARGET PERPLEX_BLD)
 
-  set(STEPCODE_INSTDIR "${CMAKE_BINARY_ROOT}/ext/stepcode")
+  set(STEPCODE_INSTDIR "${CMAKE_BINARY_INSTALL_ROOT}/stepcode")
 
   ExternalProject_Add(STEPCODE_BLD
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/stepcode"
@@ -47,6 +47,8 @@
     DEPENDS ${SC_DEPS}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/STEPCODE_BLD-prefix")
+
   # Tell the parent build about files and libraries
   set(STEPCODE_LIBS base express stepcore stepeditor stepdai steputils)
   foreach(SCLIB ${STEPCODE_LIBS})

Modified: brlcad/branches/extbuild/src/other/ext/tcl.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -41,8 +41,9 @@
     configure_file(${BDEPS_CMAKE_DIR}/tcl_replace.cxx.in 
${CMAKE_CURRENT_BINARY_DIR}/tcl_replace.cxx)
     add_executable(tcl_replace ${CMAKE_CURRENT_BINARY_DIR}/tcl_replace.cxx)
   endif (NOT TARGET tcl_replace)
+  DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/tcl_replace.cxx)
 
-  set(TCL_INSTDIR ${CMAKE_BINARY_ROOT}/ext/tcl)
+  set(TCL_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/tcl)
 
   if (NOT MSVC)
 
@@ -63,6 +64,7 @@
       INSTALL_COMMAND make install
       DEPENDS ${ZLIB_TARGET} tcl_replace rpath_replace
       )
+
     set(TCL_APPINIT tclAppInit.c)
 
   else (NOT MSVC)
@@ -83,6 +85,8 @@
 
   endif (NOT MSVC)
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/TCL_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED tcl TCL_BLD ${TCL_INSTDIR}
     ${TCL_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/tk.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -34,7 +34,7 @@
     add_executable(tcl_replace ${CMAKE_CURRENT_BINARY_DIR}/tcl_replace.cxx)
   endif (NOT TARGET tcl_replace)
 
-  set(TK_INSTDIR ${CMAKE_BINARY_ROOT}/ext/tk)
+  set(TK_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/tk)
 
   if (NOT MSVC)
 
@@ -76,6 +76,8 @@
 
   endif (NOT MSVC)
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/TK_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED tk TK_BLD ${TK_INSTDIR}
     ${TK_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}

Modified: brlcad/branches/extbuild/src/other/ext/zlib.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/zlib.cmake   2020-10-24 01:01:44 UTC 
(rev 77624)
+++ brlcad/branches/extbuild/src/other/ext/zlib.cmake   2020-10-24 01:44:02 UTC 
(rev 77625)
@@ -28,7 +28,7 @@
     set(ZLIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}.${ZLIB_VERSION})
   endif (MSVC)
 
-  set(ZLIB_INSTDIR ${CMAKE_BINARY_ROOT}/ext/zlib)
+  set(ZLIB_INSTDIR ${CMAKE_BINARY_INSTALL_ROOT}/zlib)
 
   ExternalProject_Add(ZLIB_BLD
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib"
@@ -38,6 +38,8 @@
     -DZ_PREFIX_STR=${Z_PREFIX_STR}
     )
 
+  DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/ZLIB_BLD-prefix")
+
   # Tell the parent build about files and libraries
   ExternalProject_Target(SHARED zlib ZLIB_BLD ${ZLIB_INSTDIR}
     ${ZLIB_BASENAME}${ZLIB_SUFFIX}

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