[brlcad-commits] SF.net SVN: brlcad:[70027] brlcad/trunk/misc/CMake

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70027
  http://sourceforge.net/p/brlcad/code/70027
Author:   starseeker
Date: 2017-07-29 21:03:13 + (Sat, 29 Jul 2017)
Log Message:
---
This may get distcheck running again... needs more testing

Modified Paths:
--
brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
brlcad/trunk/misc/CMake/source_archive_setup.cmake.in

Modified: brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
===
--- brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 20:01:37 UTC (rev 
70026)
+++ brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 21:03:13 UTC (rev 
70027)
@@ -198,82 +198,70 @@
 
 endfunction(CHECK_SOURCE_DIR_FULLPATH ITEM_PATH)
 
-macro(CMAKEFILES)
-  if(NOT BRLCAD_IS_SUBBUILD)
+function(CMFILE ITEM)
 
-# CMake flags to add_library/add_executable aren't going to be valid 
filenames - just
-# yank them up front.
-set(ITEMS ${ARGN})
-list(REMOVE_ITEM ITEMS SHARED STATIC OBJECT WIN32 UNKNOWN IMPORTED MODULE 
INTERFACE EXCLUDE_FROM_ALL)
-list(FILTER ITEMS EXCLUDE REGEX ".*TARGET_OBJECTS.*")
-foreach(ITEM ${ITEMS})
-  # Handled target flags, proceeding with tests.
-  get_filename_component(ITEM_PATH "${ITEM}" PATH)
-  get_filename_component(ITEM_NAME "${ITEM}" NAME)
-  if(NOT "${ITEM_PATH}" STREQUAL "")
+  get_filename_component(ITEM_PATH "${ITEM}" PATH)
+  if(NOT "${ITEM_PATH}" STREQUAL "")
+# The hard case - path specified, need some validation.
 
-   # If this becomes a problem with the third party build
-   # systems at some point in the future, we may have to
-   # exclude src/other paths from this check.
-   CHECK_SOURCE_DIR_FULLPATH("${ITEM_PATH}")
+# If this becomes a problem with the third party build
+# systems at some point in the future, we may have to
+# exclude src/other paths from this check.
+CHECK_SOURCE_DIR_FULLPATH("${ITEM_PATH}")
 
-   # Ignore files specified using full paths, since they
-   # should be generated files and are not part of the
-   # source code repository.
-   get_filename_component(ITEM_ABS_PATH "${ITEM_PATH}" ABSOLUTE)
+# Ignore files specified using full paths, since they
+# should be generated files and are not part of the
+# source code repository.
+get_filename_component(ITEM_ABS_PATH "${ITEM_PATH}" ABSOLUTE)
+if("${ITEM_PATH}" STREQUAL "${ITEM_ABS_PATH}")
+  return()
+endif("${ITEM_PATH}" STREQUAL "${ITEM_ABS_PATH}")
+  endif(NOT "${ITEM_PATH}" STREQUAL "")
 
-   if(NOT "${ITEM_PATH}" STREQUAL "${ITEM_ABS_PATH}")
+  # Handle fatal cases
+  if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+message(FATAL_ERROR "Trying to ignore directory: 
${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+  endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+  if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+message(FATAL_ERROR "Attempting to ignore non-existent file ${ITEM}, in 
directory \"${CMAKE_CURRENT_SOURCE_DIR}\"")
+  endif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
 
- # Don't list things that aren't there
- if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-   message(FATAL_ERROR "Attempting to ignore non-existent file 
${ITEM}, in directory \"${CMAKE_CURRENT_SOURCE_DIR}\"")
- endif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
+  # We're good - log it
+  set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
 
- # Append files and directories to their respective lists.
- if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-   set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_DIRS 
"${ITEM_ABS_PATH}/${ITEM_NAME}")
- else(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-   set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${ITEM_ABS_PATH}/${ITEM_NAME}")
- endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
- set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${ITEM_ABS_PATH}")
+  # Track the directories as well
+  get_property(IGNORE_PATHS GLOBAL PROPERTY CMAKE_IGNORE_DIRS)
+  get_filename_component(NPATH "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}" PATH)
+  while(NOT "${NPATH}" STREQUAL "${CMAKE_SOURCE_DIR}")
+list(APPEND IGNORE_PATHS "${NPATH}")
+get_filename_component(NPATH "${NPATH}" PATH)
+  endwhile(NOT "${NPATH}" STREQUAL "${CMAKE_SOURCE_DIR}")
+  list(REMOVE_DUPLICATES IGNORE_PATHS)
+  set_property(GLOBAL PROPERTY CMAKE_IGNORE_DIRS "${IGNORE_PATHS}")
 
- # Add the parent directories of the specified file or directory as 
well -
- # the convention is that once at least one file or directory in a 
path is recorded
- # by the build logic, the parent directories along that path have 
also been recorded.
- while(NOT "${ITEM_PATH}" STREQUAL "")
-   get_filename_component(ITEM_NAME "${ITEM_PATH}" NAME)
-   

[brlcad-commits] SF.net SVN: brlcad:[70026] brlcad/trunk

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70026
  http://sourceforge.net/p/brlcad/code/70026
Author:   starseeker
Date: 2017-07-29 20:01:37 + (Sat, 29 Jul 2017)
Log Message:
---
Start preparing the ground work for a distcheck introspection that is based 
entirely on files - no specification of directories.  This will be both to 
simplify the logic and to increase robustness for the non-svn distcheck case - 
if we have all files listed explicitly, svn is not strictly needed to do a full 
source repo verification.  For the moment this will break distcheck, but need 
to checkpoint before the next stage.

Modified Paths:
--
brlcad/trunk/db/CMakeLists.txt
brlcad/trunk/db/nist/CMakeLists.txt
brlcad/trunk/doc/CMakeLists.txt
brlcad/trunk/doc/docbook/CMakeLists.txt
brlcad/trunk/doc/html/CMakeLists.txt
brlcad/trunk/include/CMakeLists.txt
brlcad/trunk/misc/CMake/ThirdParty.cmake
brlcad/trunk/misc/CMake/ThirdParty_TCL.cmake
brlcad/trunk/misc/CMake/distcheck_repo_verify.cmake.in
brlcad/trunk/misc/CMakeLists.txt
brlcad/trunk/misc/doxygen/CMakeLists.txt
brlcad/trunk/misc/opencl-raytracer-tests/CMakeLists.txt
brlcad/trunk/misc/osl_shaders/CMakeLists.txt
brlcad/trunk/misc/tools/CMakeLists.txt
brlcad/trunk/misc/tools/astyle.dist
brlcad/trunk/misc/tools/lemon.dist
brlcad/trunk/misc/tools/perplex.dist
brlcad/trunk/misc/tools/re2c.dist
brlcad/trunk/misc/tools/xmltools.dist
brlcad/trunk/regress/CMakeLists.txt
brlcad/trunk/regress/gcv/CMakeLists.txt
brlcad/trunk/regress/mged/CMakeLists.txt
brlcad/trunk/src/adrt/CMakeLists.txt
brlcad/trunk/src/conv/CMakeLists.txt
brlcad/trunk/src/conv/step/CMakeLists.txt
brlcad/trunk/src/gtools/gdiff/CMakeLists.txt
brlcad/trunk/src/libdm/CMakeLists.txt
brlcad/trunk/src/libgcv/plugins/gdal/CMakeLists.txt
brlcad/trunk/src/libgcv/plugins/obj/CMakeLists.txt
brlcad/trunk/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
brlcad/trunk/src/other/CMakeLists.txt
brlcad/trunk/src/other/PoissonRecon.dist
brlcad/trunk/src/other/bullet.dist
brlcad/trunk/src/other/clipper.dist
brlcad/trunk/src/other/freetype.dist
brlcad/trunk/src/other/iwidgets.dist
brlcad/trunk/src/other/libgdiam.dist
brlcad/trunk/src/other/libnetpbm.dist
brlcad/trunk/src/other/libpng.dist
brlcad/trunk/src/other/libregex.dist
brlcad/trunk/src/other/libtermlib.dist
brlcad/trunk/src/other/libutahrle.dist
brlcad/trunk/src/other/libvds.dist
brlcad/trunk/src/other/libz.dist
brlcad/trunk/src/other/lz4.dist
brlcad/trunk/src/other/openNURBS.dist
brlcad/trunk/src/other/openscenegraph.dist
brlcad/trunk/src/other/poly2tri.dist
brlcad/trunk/src/other/rply.dist
brlcad/trunk/src/other/stepcode.dist
brlcad/trunk/src/other/tcl.dist
brlcad/trunk/src/other/tinycthread.dist
brlcad/trunk/src/other/tk.dist
brlcad/trunk/src/other/tkhtml.dist
brlcad/trunk/src/other/tkpng.dist
brlcad/trunk/src/other/tktable.dist
brlcad/trunk/src/tclscripts/hv3/CMakeLists.txt
brlcad/trunk/src/tclscripts/rtwizard/CMakeLists.txt

Added Paths:
---
brlcad/trunk/doc/docbook/resources/CMakeLists.txt
brlcad/trunk/doc/html/manuals/mged/animmate/CMakeLists.txt
brlcad/trunk/misc/CMake/CMakeLists.txt
brlcad/trunk/misc/d-bindings/CMakeLists.txt
brlcad/trunk/misc/debian/CMakeLists.txt
brlcad/trunk/src/other/gct.dist
brlcad/trunk/src/other/incrTcl.dist
brlcad/trunk/src/other/itcl.dist
brlcad/trunk/src/other/itk.dist
brlcad/trunk/src/other/libbson.dist

Removed Paths:
-
brlcad/trunk/src/other/itcl.dist
brlcad/trunk/src/other/itk.dist

Modified: brlcad/trunk/db/CMakeLists.txt
===
--- brlcad/trunk/db/CMakeLists.txt  2017-07-29 19:55:58 UTC (rev 70025)
+++ brlcad/trunk/db/CMakeLists.txt  2017-07-29 20:01:37 UTC (rev 70026)
@@ -97,7 +97,8 @@
   cornell.rt
   cube.rt
   db.php
-  include
+  include/ctype.inc
+  include/debug.inc
 )
 
 # Local Variables:

Modified: brlcad/trunk/db/nist/CMakeLists.txt
===
--- brlcad/trunk/db/nist/CMakeLists.txt 2017-07-29 19:55:58 UTC (rev 70025)
+++ brlcad/trunk/db/nist/CMakeLists.txt 2017-07-29 20:01:37 UTC (rev 70026)
@@ -101,8 +101,19 @@
 
 CMAKEFILES(
   README
-  pdf
-)
+  pdf/1.pdf
+  pdf/2.pdf
+  pdf/3.pdf
+  pdf/4.pdf
+  pdf/5.pdf
+  pdf/6.pdf
+  pdf/7-10_assem.pdf
+  pdf/7.pdf
+  pdf/8.pdf
+  pdf/9.pdf
+  pdf/10.pdf
+  pdf/11.pdf
+  )
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/trunk/doc/CMakeLists.txt
===
--- brlcad/trunk/doc/CMakeLists.txt 2017-07-29 19:55:58 UTC (rev 70025)
+++ brlcad/trunk/doc/CMakeLists.txt 2017-07-29 20:01:37 UTC (rev 70026)
@@ -7,7 +7,16 @@
 verbose_add_subdirectory(doc html)
 verbose_add_subdirectory(doc legal)
 

[brlcad-commits] SF.net SVN: brlcad:[70025] brlcad/trunk/src/tclscripts/checker/ CMakeLists.txt

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70025
  http://sourceforge.net/p/brlcad/code/70025
Author:   starseeker
Date: 2017-07-29 19:55:58 + (Sat, 29 Jul 2017)
Log Message:
---
Add TODO to CMAKEFILES list

Modified Paths:
--
brlcad/trunk/src/tclscripts/checker/CMakeLists.txt

Modified: brlcad/trunk/src/tclscripts/checker/CMakeLists.txt
===
--- brlcad/trunk/src/tclscripts/checker/CMakeLists.txt  2017-07-29 14:40:46 UTC 
(rev 70024)
+++ brlcad/trunk/src/tclscripts/checker/CMakeLists.txt  2017-07-29 19:55:58 UTC 
(rev 70025)
@@ -5,7 +5,7 @@
 pkgIndex_BUILD(tclscripts/checker)
 tclIndex_BUILD(tclscripts/checker)
 
-CMAKEFILES(check.sh)
+CMAKEFILES(check.sh TODO)
 
 # Local Variables:
 # tab-width: 8

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


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[70024] brlcad/trunk/misc/CMake/BRLCAD_Util.cmake

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70024
  http://sourceforge.net/p/brlcad/code/70024
Author:   starseeker
Date: 2017-07-29 14:40:46 + (Sat, 29 Jul 2017)
Log Message:
---
Do some refactoring of CMAKEFLAGS tracking function

Modified Paths:
--
brlcad/trunk/misc/CMake/BRLCAD_Util.cmake

Modified: brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
===
--- brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 14:39:23 UTC (rev 
70023)
+++ brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 14:40:46 UTC (rev 
70024)
@@ -174,94 +174,100 @@
 define_property(GLOBAL PROPERTY CMAKE_IGNORE_FILES BRIEF_DOCS "distcheck 
ignore files" FULL_DOCS "List of files known to CMake")
 define_property(GLOBAL PROPERTY CMAKE_IGNORE_DIRS BRIEF_DOCS "distcheck ignore 
dirs" FULL_DOCS "List of directories marked as fully known to CMake")
 
+# If the build directory is not the same as the source directory, we can
+# enforce the convention that only generated files be specified with their full
+# name.
+function(CHECK_SOURCE_DIR_FULLPATH ITEM_PATH)
+
+  # We can only do this if BINARY_DIR != SOURCE_DIR
+  if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
+return()
+  endif(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
+
+  # If it's a full path in the binary dir, it's fine
+  IS_SUBPATH("${CMAKE_BINARY_DIR}" "${ITEM_PATH}" SUBPATH_TEST)
+  if(NOT"${SUBPATH_TEST}" STREQUAL "0")
+return()
+  endif(NOT "${SUBPATH_TEST}" STREQUAL "0")
+
+  # If it's a full path in the source dir, it's fatal
+  IS_SUBPATH("${CMAKE_SOURCE_DIR}" "${ITEM_PATH}" SUBPATH_TEST)
+  if("${SUBPATH_TEST}" STREQUAL "1")
+message(FATAL_ERROR "${ITEM} is listed in \"${CMAKE_CURRENT_SOURCE_DIR}\" 
using its absolute path.  Please specify the location of this file using a 
relative path.")
+  endif("${SUBPATH_TEST}" STREQUAL "1")
+
+endfunction(CHECK_SOURCE_DIR_FULLPATH ITEM_PATH)
+
 macro(CMAKEFILES)
   if(NOT BRLCAD_IS_SUBBUILD)
-foreach(ITEM ${ARGN})
-  set(CMAKEFILES_DO_TEST 1)
-  # The build targets will use certain keywords for arguments -
-  # before we proceed to do any ignoring based on those names,
-  # make sure the file is there.  Normally attempting to ignore
-  # a non-existent file is a fatal error, but these keywords
-  # don't necessarily refer to files.
-  set(TARGET_FLAGS SHARED STATIC OBJECT WIN32 UNKNOWN IMPORTED MODULE 
INTERFACE EXCLUDE_FROM_ALL)
-  foreach(TARGET_FLAG ${TARGET_FLAGS})
-   if("${TARGET_FLAG}" STREQUAL "${ITEM}")
- if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-set(CMAKEFILES_DO_TEST 0)
- endif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-   endif("${TARGET_FLAG}" STREQUAL "${ITEM}")
-  endforeach(TARGET_FLAG ${TARGET_FLAGS})
-  set(FUZZY_TARGET_FLAGS TARGET_OBJECTS)
-  foreach(TARGET_FLAG ${FUZZY_TARGET_FLAGS})
-   if("${ITEM}" MATCHES "${TARGET_FLAG}")
- if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-set(CMAKEFILES_DO_TEST 0)
- endif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
-   endif("${ITEM}" MATCHES "${TARGET_FLAG}")
-  endforeach(TARGET_FLAG ${FUZZY_TARGET_FLAGS})
 
+# CMake flags to add_library/add_executable aren't going to be valid 
filenames - just
+# yank them up front.
+set(ITEMS ${ARGN})
+list(REMOVE_ITEM ITEMS SHARED STATIC OBJECT WIN32 UNKNOWN IMPORTED MODULE 
INTERFACE EXCLUDE_FROM_ALL)
+list(FILTER ITEMS EXCLUDE REGEX ".*TARGET_OBJECTS.*")
+foreach(ITEM ${ITEMS})
   # Handled target flags, proceeding with tests.
-  if(CMAKEFILES_DO_TEST)
-   get_filename_component(ITEM_PATH "${ITEM}" PATH)
-   get_filename_component(ITEM_NAME "${ITEM}" NAME)
-   if(NOT "${ITEM_PATH}" STREQUAL "")
- # If the build directory is not the same as the source
-  # directory, we can enforce the convention that only
-  # generated files be specified with their full name.
-  # If this becomes a problem with the third party build
-  # systems at some point in the future, we may have to
-  # exclude src/other paths from this check.
- if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
-   IS_SUBPATH("${CMAKE_BINARY_DIR}" "${ITEM_PATH}" SUBPATH_TEST)
-   if("${SUBPATH_TEST}" STREQUAL "0")
- IS_SUBPATH("${CMAKE_SOURCE_DIR}" "${ITEM_PATH}" SUBPATH_TEST)
- if("${SUBPATH_TEST}" STREQUAL "1")
-   message(FATAL_ERROR "${ITEM} is listed in 
\"${CMAKE_CURRENT_SOURCE_DIR}\" using its absolute path.  Please specify the 
location of this file using a relative path.")
- endif("${SUBPATH_TEST}" STREQUAL "1")
-   endif("${SUBPATH_TEST}" STREQUAL "0")
- endif(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
- # Ignore files specified using full paths, since they
-  # should be generated files 

[brlcad-commits] SF.net SVN: brlcad:[70023] brlcad/trunk/misc/d-bindings

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70023
  http://sourceforge.net/p/brlcad/code/70023
Author:   starseeker
Date: 2017-07-29 14:39:23 + (Sat, 29 Jul 2017)
Log Message:
---
delete empty directories

Removed Paths:
-
brlcad/trunk/misc/d-bindings/CC/
brlcad/trunk/misc/d-bindings/di/

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


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[70022] brlcad/trunk/misc/CMake/BRLCAD_Util.cmake

2017-07-29 Thread starseeker--- via brlcad-commits
Revision: 70022
  http://sourceforge.net/p/brlcad/code/70022
Author:   starseeker
Date: 2017-07-29 14:03:30 + (Sat, 29 Jul 2017)
Log Message:
---
Simplify the IS_SUBPATH function logic using SUBSTRING.  Not actually a 
significant performance improvement, but fewer lines and easier to follow.

Modified Paths:
--
brlcad/trunk/misc/CMake/BRLCAD_Util.cmake

Modified: brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
===
--- brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 03:42:03 UTC (rev 
70021)
+++ brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-07-29 14:03:30 UTC (rev 
70022)
@@ -123,45 +123,32 @@
 # The routine below does the check without using regex matching, in order to
 # handle path names that contain characters that would be interpreted as active
 # in a regex string.
-function(IS_SUBPATH in_candidate_subpath in_full_path result_var)
-  # Convert paths to lists of directories - regex based
-  # matching won't work reliably, so instead look at each
-  # element compared to its corresponding element in the
-  # other path using string comparison.
+function(IS_SUBPATH candidate_subpath full_path result_var)
 
-  # get the CMake form of the path so we have something consistent
-  # to work on
-  file(TO_CMAKE_PATH "${in_full_path}" full_path)
-  file(TO_CMAKE_PATH "${in_candidate_subpath}" candidate_subpath)
+  # Just assume it isn't until we prove it is
+  set(${result_var} 0 PARENT_SCOPE)
 
-  # check the string lengths - if the "subpath" is longer
-  # than the full path, there's not point in going further
-  string(LENGTH "${full_path}" FULL_LENGTH)
-  string(LENGTH "${candidate_subpath}" SUB_LENGTH)
+  # get the CMake form of the path so we have something consistent to work on
+  file(TO_CMAKE_PATH "${full_path}" c_full_path)
+  file(TO_CMAKE_PATH "${candidate_subpath}" c_candidate_subpath)
+
+  # check the string lengths - if the "subpath" is longer than the full path,
+  # there's not point in going further
+  string(LENGTH "${c_full_path}" FULL_LENGTH)
+  string(LENGTH "${c_candidate_subpath}" SUB_LENGTH)
   if("${SUB_LENGTH}" GREATER "${FULL_LENGTH}")
-set(${result_var} 0 PARENT_SCOPE)
-  else("${SUB_LENGTH}" GREATER "${FULL_LENGTH}")
-# OK, maybe it's a subpath - time to actually check
-string(REPLACE "/" ";" full_path_list "${full_path}")
-string(REPLACE "/" ";" candidate_subpath_list "${candidate_subpath}")
-set(found_difference 0)
-while(NOT found_difference AND candidate_subpath_list)
-  list(GET full_path_list 0 full_path_element)
-  list(GET candidate_subpath_list 0 subpath_element)
-  if("${full_path_element}" STREQUAL "${subpath_element}")
-   list(REMOVE_AT full_path_list 0)
-   list(REMOVE_AT candidate_subpath_list 0)
-  else("${full_path_element}" STREQUAL "${subpath_element}")
-   set(found_difference 1)
-  endif("${full_path_element}" STREQUAL "${subpath_element}")
-endwhile(NOT found_difference AND candidate_subpath_list)
-# Now we know - report the result
-if(NOT found_difference)
-  set(${result_var} 1 PARENT_SCOPE)
-else(NOT found_difference)
-  set(${result_var} 0 PARENT_SCOPE)
-endif(NOT found_difference)
+return()
   endif("${SUB_LENGTH}" GREATER "${FULL_LENGTH}")
+
+  # OK, maybe it's a subpath - time to actually check
+  string(SUBSTRING "${c_full_path}" 0 ${SUB_LENGTH} c_full_subpath)
+  if(NOT "${c_full_subpath}" STREQUAL "${c_candidate_subpath}")
+return()
+  endif(NOT "${c_full_subpath}" STREQUAL "${c_candidate_subpath}")
+
+  # If we get here, it's a subpath
+  set(${result_var} 1 PARENT_SCOPE)
+
 endfunction(IS_SUBPATH)
 
 #-

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


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits