Revision: 77736
          http://sourceforge.net/p/brlcad/code/77736
Author:   starseeker
Date:     2020-11-13 03:57:28 +0000 (Fri, 13 Nov 2020)
Log Message:
-----------
Guard the distcheck-odd_pathnames test based on which 3rd party bundled builds 
are enabled.  Autotools based builds are a no-go for this test - per digging by 
Sean, Autotools itself won't reliably support such paths.

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

Modified: brlcad/branches/extbuild/CMakeLists.txt
===================================================================
--- brlcad/branches/extbuild/CMakeLists.txt     2020-11-13 03:21:44 UTC (rev 
77735)
+++ brlcad/branches/extbuild/CMakeLists.txt     2020-11-13 03:57:28 UTC (rev 
77736)
@@ -2308,7 +2308,17 @@
   CREATE_DISTCHECK(no_object "-DCMAKE_BUILD_TYPE=Debug 
-DBRLCAD_BUNDLED_LIBS=BUNDLED -DUSE_OBJECT_LIBS=OFF" 
"${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
   CREATE_DISTCHECK(autodetect_debug "-DCMAKE_BUILD_TYPE=Debug 
-DBRLCAD_BUNDLED_LIBS=AUTO" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" 
"install")
   CREATE_DISTCHECK(autodetect_release "-DCMAKE_BUILD_TYPE=Release 
-DBRLCAD_BUNDLED_LIBS=AUTO" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" 
"install")
-  #CREATE_DISTCHECK(odd_pathnames "-DCMAKE_BUILD_TYPE=Debug 
-DBRLCAD_BUNDLED_LIBS=BUNDLED" "1 Odd_ source dir ++" "1 Odd_ build dir ++" "1 
Odd_ install dir ++")
+  # The odd pathnames test cannot work with bundled autoconf builds, so disable
+  # if any of them have set the flag.  This isn't perfect, since a configure
+  # with BRLCAD_BUNDLED_LIBS= BUNDLED will disable this test even if a viable
+  # system component is present.  However, the complexity/fragility of
+  # attempting to stash the system detections when we want the variables set to
+  # the bundled versions outweighs the minor benefit of trying harder to enable
+  # this test (which may or may not be viable anyway depending on system
+  # component availability.)
+  if (NOT BRLCAD_DISABLE_ODD_PATHNAMES_TEST)
+    CREATE_DISTCHECK(odd_pathnames "-DCMAKE_BUILD_TYPE=Debug 
-DBRLCAD_BUNDLED_LIBS=BUNDLED ${BRLCAD_DISABLE_ODD_PATHNAMES_FLAGS}" "1 Odd_ 
source dir ++" "1 Odd_ build dir ++" "1 Odd_ install dir ++")
+  endif (NOT BRLCAD_DISABLE_ODD_PATHNAMES_TEST)
   CREATE_DISTCHECK(in_src_dir "-DCMAKE_BUILD_TYPE=Debug 
-DBRLCAD_BUNDLED_LIBS=BUNDLED" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" 
"${CPACK_SOURCE_PACKAGE_FILE_NAME}" "install" distcheck_in_src_dir.cmake.in)
 
   # Now that we're set up and have added the extra targets we want for 
distcheck-full, define the build targets

Modified: brlcad/branches/extbuild/src/other/ext/tcl.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-11-13 03:21:44 UTC 
(rev 77735)
+++ brlcad/branches/extbuild/src/other/ext/tcl.cmake    2020-11-13 03:57:28 UTC 
(rev 77736)
@@ -23,6 +23,10 @@
 
 if (BRLCAD_TCL_BUILD)
 
+  # Bundled Tcl is a poison pill for the odd_pathnames distcheck test
+  set(BRLCAD_DISABLE_ODD_PATHNAMES_TEST ON CACHE BOOL "Bundled disable by Tcl 
of distcheck-odd_pathnames")
+
+
   set(TCL_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/TCL_BLD-prefix/src/TCL_BLD")
   set(TCL_MAJOR_VERSION 8)
   set(TCL_MINOR_VERSION 6)
@@ -52,6 +56,15 @@
 
   if (NOT MSVC)
 
+    # Check for spaces in the source and build directories - those won't work
+    # reliably with the Tcl autotools based build.
+    if ("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES ".* .*")
+      message(FATAL_ERROR "Bundled Tcl enabled, but the path 
\"${CMAKE_CURRENT_SOURCE_DIR}\" contains spaces.  On this platform, Tcl uses 
autotools to build; paths with spaces are not supported.  To continue relocate 
your source directory to a path that does not use spaces.")
+    endif ("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES ".* .*")
+    if ("${CMAKE_CURRENT_BINARY_DIR}" MATCHES ".* .*")
+      message(FATAL_ERROR "Bundled Tcl enabled, but the path 
\"${CMAKE_CURRENT_BINARY_DIR}\" contains spaces.  On this platform, Tcl uses 
autotools to build; paths with spaces are not supported.  To continue you must 
select a build directory with a path that does not use spaces.")
+    endif ("${CMAKE_CURRENT_BINARY_DIR}" MATCHES ".* .*")
+
     set(TCL_BASENAME libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
     set(TCL_STUBNAME libtclstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
     set(TCL_EXECNAME tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
@@ -363,6 +376,10 @@
   SetTargetFolder(TCL_BLD "Third Party Libraries")
   SetTargetFolder(tcl "Third Party Libraries")
 
+else (BRLCAD_TCL_BUILD)
+
+  set(BRLCAD_DISABLE_ODD_PATHNAMES_FLAGS 
"${BRLCAD_DISABLE_ODD_PATHNAMES_FLAGS} -DBRLCAD_TCL=SYSTEM" CACHE STRING 
"Options to pass to odd_pathnames distcheck")
+
 endif (BRLCAD_TCL_BUILD)
 
 include("${CMAKE_CURRENT_SOURCE_DIR}/tcl.dist")

Modified: brlcad/branches/extbuild/src/other/ext/tk.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-11-13 03:21:44 UTC 
(rev 77735)
+++ brlcad/branches/extbuild/src/other/ext/tk.cmake     2020-11-13 03:57:28 UTC 
(rev 77736)
@@ -38,6 +38,15 @@
 
   if (NOT MSVC)
 
+    # Check for spaces in the source and build directories - those won't work
+    # reliably with the Tk autotools based build.
+    if ("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES ".* .*")
+      message(FATAL_ERROR "Bundled Tk enabled, but the path 
\"${CMAKE_CURRENT_SOURCE_DIR}\" contains spaces.  On this platform, Tk uses 
autotools to build; paths with spaces are not supported.  To continue relocate 
your source directory to a path that does not use spaces.")
+    endif ("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES ".* .*")
+    if ("${CMAKE_CURRENT_BINARY_DIR}" MATCHES ".* .*")
+      message(FATAL_ERROR "Bundled Tk enabled, but the path 
\"${CMAKE_CURRENT_BINARY_DIR}\" contains spaces.  On this platform, Tk uses 
autotools to build; paths with spaces are not supported.  To continue you must 
select a build directory with a path that does not use spaces.")
+    endif ("${CMAKE_CURRENT_BINARY_DIR}" MATCHES ".* .*")
+
     set(TK_BASENAME libtk${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
     set(TK_STUBNAME libtkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
     set(TK_WISHNAME wish${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})

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