Revision: 70068
          http://sourceforge.net/p/brlcad/code/70068
Author:   starseeker
Date:     2017-08-10 15:48:09 +0000 (Thu, 10 Aug 2017)
Log Message:
-----------
Clean up a few distcheck issues introduced by the switch to file-only listing.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
    brlcad/trunk/misc/CMake/distcheck_repo_verify.cmake.in
    brlcad/trunk/misc/CMake/source_archive_setup.cmake.in
    brlcad/trunk/src/conv/step/CMakeLists.txt

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2017-08-10 13:22:00 UTC (rev 70067)
+++ brlcad/trunk/CMakeLists.txt 2017-08-10 15:48:09 UTC (rev 70068)
@@ -470,7 +470,6 @@
     # can probably revisit at least part of this by getting a list of source
     # directories for all targets at the end of the build and setting
     # properties then.
-    set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${CMAKE_CURRENT_SOURCE_DIR}/${name}")
     set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${CMAKE_CURRENT_SOURCE_DIR}/${name}/CMakeLists.txt")
     DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${name}/CMakeFiles")
     DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${name}/cmake_install.cmake")
@@ -3082,7 +3081,6 @@
   # Handle some toplevel distclean listings
   DISTCLEAN("${CMAKE_BINARY_DIR}/CMakeCache.txt")
   DISTCLEAN("${CMAKE_BINARY_DIR}/cmakefiles.cmake")
-  DISTCLEAN("${CMAKE_BINARY_DIR}/cmakedirs.cmake")
   DISTCLEAN("${CMAKE_BINARY_DIR}/cmake_install.cmake")
   DISTCLEAN("${CMAKE_BINARY_DIR}/install_manifest.txt")
   DISTCLEAN("${CMAKE_BINARY_DIR}/OPTIONS")
@@ -3220,14 +3218,12 @@
   set_target_properties(distclean PROPERTIES FOLDER "Compilation Utilities")
 endif(TARGET distclean)
 
-# Have touched every file and directory that we are going to touch with the
-# build system - time to write out our lists for future processing.
+# Have touched every file that we are going to touch with the build system -
+# time to write out our list for future processing.
 get_property(CMAKE_IGNORE_FILES GLOBAL PROPERTY CMAKE_IGNORE_FILES)
-get_property(CMAKE_IGNORE_DIRS GLOBAL PROPERTY CMAKE_IGNORE_DIRS)
+list(REMOVE_DUPLICATES CMAKE_IGNORE_FILES)
 string(REPLACE ";" "\n" CMAKE_IGNORE_FILES "${CMAKE_IGNORE_FILES}")
-string(REPLACE ";" "\n" CMAKE_IGNORE_DIRS "${CMAKE_IGNORE_DIRS}")
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakefiles.cmake" 
"${CMAKE_IGNORE_FILES}")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakedirs.cmake" 
"${CMAKE_IGNORE_DIRS}")
 
 #Done with all really time-consuming steps - do the configure time delta
 if(NOT BRLCAD_IS_SUBBUILD)

Modified: brlcad/trunk/misc/CMake/BRLCAD_Util.cmake
===================================================================
--- brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-08-10 13:22:00 UTC (rev 
70067)
+++ brlcad/trunk/misc/CMake/BRLCAD_Util.cmake   2017-08-10 15:48:09 UTC (rev 
70068)
@@ -202,10 +202,6 @@
   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}")
 
     # Ignore files specified using full paths, since they
@@ -228,16 +224,6 @@
   # We're good - log it
   set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES 
"${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
 
-  # 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}")
-
 endfunction(CMFILE ITEM)
 
 function(CMAKEFILES)

Modified: brlcad/trunk/misc/CMake/distcheck_repo_verify.cmake.in
===================================================================
--- brlcad/trunk/misc/CMake/distcheck_repo_verify.cmake.in      2017-08-10 
13:22:00 UTC (rev 70067)
+++ brlcad/trunk/misc/CMake/distcheck_repo_verify.cmake.in      2017-08-10 
15:48:09 UTC (rev 70068)
@@ -34,16 +34,6 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 ###
-# If BRLCAD_BUNDLED_LIBS isn't set to BUNDLED, mention that this might be a 
good idea.
-if(NOT "@BRLCAD_BUNDLED_LIBS@" STREQUAL "BUNDLED")
-  message(" ")
-  message("Note: - running distcheck with a BRL-CAD configuration that has not 
enabled")
-  message("        all local src/other libraries.  This will work, but the 
best level")
-  message("        of build system verification is achieved when 
BRLCAD_BUNDLED_LIBS is")
-  message("        set to Bundled, activating all src/other CMake build 
systems.")
-  message(" ")
-endif(NOT "@BRLCAD_BUNDLED_LIBS@" STREQUAL "BUNDLED")
-
 if(EXISTS "@CMAKE_SOURCE_DIR@/src/testing")
   message(FATAL_ERROR "\nThe directory @CMAKE_SOURCE_DIR@/src/testing is 
present.  Remove this directory from the source tree before proceeding with 
distcheck.")
 endif(EXISTS "@CMAKE_SOURCE_DIR@/src/testing")
@@ -51,11 +41,23 @@
 set(NOT_DISTCHECK_READY 0)
 set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
 
+# Avoid empty items in lists, so we don't trigger a CMake warning
+function(scrub_list SLIST)
+  set(NONEMPTY)
+  foreach(sf ${${SLIST}})
+    if(NOT "${sf}" STREQUAL "")
+      list(APPEND NONEMPTY "${sf}")
+    endif(NOT "${sf}" STREQUAL "")
+  endforeach(sf ${${SLIST}})
+  string(REGEX REPLACE "^;" "" NONEMPTY "${NONEMPTY}")
+  set(${SLIST} ${NONEMPTY} PARENT_SCOPE)
+endfunction(scrub_list SLIST)
+
 # Subversion generates a textual report that we need to convert into a file
 # list.  The basic approach is to crush anything that's not what we want down
 # to line returns, then replace all line returns with semicolons to create
 # a valid CMake lists.
-macro(SVN_INFO_TO_PATH_LIST SVN_INFO SVN_PATHLIST)
+function(SVN_INFO_TO_PATH_LIST SVN_INFO SVN_PATHLIST)
   set(SVN_PROCESSING ${${SVN_INFO}})
   string(REGEX REPLACE "Name: [^\r\n]*" "\n" SVN_PROCESSING 
"${SVN_PROCESSING}")
   string(REGEX REPLACE "URL: [^\r\n]*" "\n" SVN_PROCESSING "${SVN_PROCESSING}")
@@ -74,25 +76,29 @@
   string(REGEX REPLACE "Working Copy Root[^\r\n]*\r?\n" "\n" SVN_PROCESSING 
"${SVN_PROCESSING}")
   string(REGEX REPLACE "\n" ";" SVN_PROCESSING "${SVN_PROCESSING}")
   string(REGEX REPLACE "/;" ";" SVN_PROCESSING "${SVN_PROCESSING}")
-  set(${SVN_PATHLIST} "${SVN_PROCESSING}")
-endmacro(SVN_INFO_TO_PATH_LIST)
+  scrub_list(SVN_PROCESSING)
+  set(SVN_FILES)
+  foreach(sf ${SVN_PROCESSING})
+    if(NOT IS_DIRECTORY "@CMAKE_SOURCE_DIR@/${sf}")
+      list(APPEND SVN_FILES ${sf})
+    endif(NOT IS_DIRECTORY "@CMAKE_SOURCE_DIR@/${sf}")
+  endforeach(sf ${SVN_PROCESSING})
+  set(${SVN_PATHLIST} "${SVN_FILES}" PARENT_SCOPE)
+endfunction(SVN_INFO_TO_PATH_LIST)
 
-# By default, assume that nothing has been modified.
-set(SVN_TREE_MODIFIED 0)
 
 # Look for Subversion - if we don't have the command, we can't query the
 # repository even if it is present.
 find_program(SVN_EXEC svn)
 
-set(DISTCHECK_CMAKE_FILE_LIST 
"@CMAKE_BINARY_DIR@/distcheck_cmake_file_list.txt")
-set(DISTCHECK_SVN_FILE_LIST "@CMAKE_BINARY_DIR@/distcheck_svn_file_list.txt")
-set(DISTCHECK_FS_FILE_LIST "@CMAKE_BINARY_DIR@/distcheck_fs_file_list.txt")
-
 # We need the Subversion binary and the source directory must be a
 # checkout of the BRL-CAD subversion repository.  If these two conditions
 # are met, we can collect information from subversion
 if(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
 
+  # By default, assume that nothing has been modified.
+  set(SVN_TREE_MODIFIED 0)
+
   # Get the file list
   set(SVN_FILES "")
   execute_process(COMMAND ${SVN_EXEC} info -R "@CMAKE_SOURCE_DIR@" 
OUTPUT_VARIABLE SVN_STDOUT ERROR_VARIABLE SVN_STDERR RESULT_VARIABLE RETVAL)
@@ -123,18 +129,9 @@
   endforeach(ITEM ${SVN_STATUS})
 
   # Generate a sorted text file with the results of the Subversion list 
processing.
-  set(SVN_NONEMPTY)
-  foreach(svnf ${SVN_FILES})
-    if(NOT "${svnf}" STREQUAL "")
-      list(APPEND SVN_NONEMPTY "${svnf}")
-    endif(NOT "${svnf}" STREQUAL "")
-  endforeach(svnf ${SVN_FILES})
-  string(REGEX REPLACE "^;" "" SVN_FILES "${SVN_FILES}")
-  set(SVN_FILES "${SVN_NONEMPTY}")
+  scrub_list(SVN_FILES)
   list(SORT SVN_FILES)
   list(REMOVE_DUPLICATES SVN_FILES)
-  string(REPLACE ";" "\n" SVN_FILES "${SVN_FILES}")
-  file(WRITE "@CMAKE_BINARY_DIR@/distcheck_svn_file_list.txt" "${SVN_FILES}")
 
   # If we've got modified files, we shouldn't use resulting tarballs for a 
distribution -
   # warn accordingly.
@@ -152,7 +149,6 @@
 # by this script we need the fully expanded list.  Read and expand...
 message(" --- Building list of files known to the build system: ...")
 file(STRINGS "@CMAKE_BINARY_DIR@/cmakefiles.cmake" BUILD_FILES)
-file(STRINGS "@CMAKE_BINARY_DIR@/cmakefiles.cmake" BUILD_FILES)
 foreach(BF ${BUILD_FILES})
   get_filename_component(BFA "${BF}" ABSOLUTE BASE_DIR "@CMAKE_SOURCE_DIR@")
   string(REPLACE "@CMAKE_SOURCE_DIR@/" "" BFA "${BFA}")
@@ -159,49 +155,8 @@
   list(APPEND BFLS ${BFA})
 endforeach(BF ${BUILD_FILES})
 set(BUILD_FILES "${BFLS}")
-file(STRINGS "@CMAKE_BINARY_DIR@/cmakedirs.cmake" IGNORED_DIRECTORIES)
-
-# Having read in the svn data, we process all the ignored directories to
-# get explicit lists of what they contain.  If we have Subversion use
-# that to tell us what *should* be in those directories - this lets us
-# spot stray files even in ignored directories.  If we don't have
-# Subversion, use GLOB_RECURSE.
-foreach(ITEM ${IGNORED_DIRECTORIES})
-  if(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-    set(IGNORED_FILES "")
-    set(SVN_STDOUT "")
-    execute_process(COMMAND ${SVN_EXEC} info -R ${ITEM} OUTPUT_VARIABLE 
SVN_STDOUT ERROR_VARIABLE SVN_STDERR)
-    SVN_INFO_TO_PATH_LIST(SVN_STDOUT IGNORED_FILES)
-    # If svn reports the file as deleted, accept that
-    foreach(I_ITEM ${IGNORED_FILES})
-      if(NOT EXISTS "@CMAKE_SOURCE_DIR@/${I_ITEM}")
-       execute_process(COMMAND ${SVN_EXEC} status 
"@CMAKE_SOURCE_DIR@/${I_ITEM}" OUTPUT_VARIABLE SVN_STATUS ERROR_VARIABLE 
SVN_STDERR)
-       if("${SVN_STATUS}" MATCHES "^D")
-         list(REMOVE_ITEM IGNORED_FILES "${I_ITEM}")
-       endif("${SVN_STATUS}" MATCHES "^D")
-      endif(NOT EXISTS "@CMAKE_SOURCE_DIR@/${I_ITEM}")
-    endforeach(I_ITEM ${IGNORED_FILES})
-    list(APPEND BUILD_FILES ${IGNORED_FILES})
-  else(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-    file(GLOB_RECURSE IGNORED_FILES RELATIVE "@CMAKE_SOURCE_DIR@" "${ITEM}/*")
-    set(IGNORED_PATHS ${IGNORED_FILES})
-    while(IGNORED_PATHS)
-      set(IGNORED_PATHS "${IGNORED_PATHS};")
-      string(REGEX REPLACE "[^/]*;" ";" IGNORED_PATHS "${IGNORED_PATHS}")
-      string(REPLACE "/;" ";" IGNORED_PATHS "${IGNORED_PATHS}")
-      list(REMOVE_DUPLICATES IGNORED_PATHS)
-      list(APPEND BUILD_FILES ${IGNORED_PATHS})
-    endwhile(IGNORED_PATHS)
-    list(APPEND BUILD_FILES ${IGNORED_FILES})
-  endif(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-endforeach(ITEM ${IGNORED_DIRECTORIES})
-string(REPLACE "@CMAKE_SOURCE_DIR@/" "" BUILD_FILES "${BUILD_FILES}")
-
-# Generate a sorted text file with the results of the CMake build system list 
processing.
 list(SORT BUILD_FILES)
 list(REMOVE_DUPLICATES BUILD_FILES)
-string(REPLACE ";" "\n" BUILD_FILES "${BUILD_FILES}")
-file(WRITE "${DISTCHECK_CMAKE_FILE_LIST}" "${BUILD_FILES}")
 message(" --- Building list of files known to the build system: Done")
 
 # Get the CPack ignore build path value from the parent CMake build
@@ -214,34 +169,28 @@
 message(" --- Building list of files actually present in source tree: ...")
 file(WRITE "@CMAKE_BINARY_DIR@/distcheck_fs_file_list.txt" "")
 file(GLOB_RECURSE FS_FILE_LIST RELATIVE "@CMAKE_SOURCE_DIR@" 
"@CMAKE_SOURCE_DIR@/*")
-
 # Start scrubbing...
-string(REGEX REPLACE ";[^;]*\\.svn[^;]*" "" FS_FILE_LIST_SCRUBBED 
"${FS_FILE_LIST}")
-if(CPACK_IGNORE_BUILD_PATH)
-  set(FS_FILE_LIST_SCRUBBED ";${FS_FILE_LIST_SCRUBBED}")
-  string(REGEX REPLACE ";${CPACK_IGNORE_BUILD_PATH}[^;]*" "" 
FS_FILE_LIST_SCRUBBED "${FS_FILE_LIST_SCRUBBED}")
-endif(CPACK_IGNORE_BUILD_PATH)
-string(REGEX REPLACE "[^/]*;" ";" FS_FILE_LIST_P1 "${FS_FILE_LIST_SCRUBBED}")
-string(REPLACE "/;" ";" FS_FILE_LIST_P1 "${FS_FILE_LIST_P1}")
-list(REMOVE_DUPLICATES FS_FILE_LIST_P1)
-string(REGEX REPLACE "[^/]*;" ";" FS_FILE_LIST_P2 "${FS_FILE_LIST_P1}")
-string(REPLACE "/;" ";" FS_FILE_LIST_P2 "${FS_FILE_LIST_P2}")
-string(REGEX REPLACE "^;" "" FS_FILE_LIST_P2 "${FS_FILE_LIST_P2}")
-list(REMOVE_DUPLICATES FS_FILE_LIST_P2)
-set(FS_FILE_LIST ${FS_FILE_LIST_SCRUBBED} ${FS_FILE_LIST_P1} 
${FS_FILE_LIST_P2})
-
+set(FS_FILES)
+foreach(pf ${FS_FILE_LIST})
+  if(NOT "${pf}" MATCHES ".*\\.svn/.*")
+    if(CPACK_IGNORE_BUILD_PATH)
+      if(NOT "${pf}" MATCHES "^${CPACK_IGNORE_BUILD_PATH}.*")
+       list(APPEND FS_FILES ${pf})
+      endif(NOT "${pf}" MATCHES "^${CPACK_IGNORE_BUILD_PATH}.*")
+    else(CPACK_IGNORE_BUILD_PATH)
+      list(APPEND FS_FILES ${pf})
+    endif(CPACK_IGNORE_BUILD_PATH)
+  endif(NOT "${pf}" MATCHES ".*\\.svn/.*")
+endforeach(pf ${FS_FILE_LIST})
+set(FS_FILE_LIST ${FS_FILES})
+if(NOT FS_FILE_LIST)
+  message(FATAL_ERROR "FATAL: No files found in file system search?? ")
+endif(NOT FS_FILE_LIST)
 # Generate a sorted text file with the results of the CMake build system list 
processing.
-if(FS_FILE_LIST)
-  list(REMOVE_DUPLICATES FS_FILE_LIST)
-  list(SORT FS_FILE_LIST)
-  string(REGEX REPLACE ";" "\n" FS_FILE_LIST "${FS_FILE_LIST}")
-  file(WRITE "@CMAKE_BINARY_DIR@/distcheck_fs_file_list.txt" "${FS_FILE_LIST}")
-else(FS_FILE_LIST)
-    message("No files found in file system search?? ")
-endif(FS_FILE_LIST)
+list(REMOVE_DUPLICATES FS_FILE_LIST)
+list(SORT FS_FILE_LIST)
 message(" --- Building list of files actually present in source tree: Done")
 
-
 # To generate lists of "interesting" files - things the build system knows 
about but
 # subversion doesn't, files the Subversion system knows about that the build 
system
 # doesn't, and files present in the source tree that *neither* system knows 
about,
@@ -251,79 +200,43 @@
 # http://www.cmake.org/pipermail/cmake/2011-September/046214.html
 message(" --- Performing comparisons...")
 
-# Read in the text files as lists
-file(STRINGS "${DISTCHECK_CMAKE_FILE_LIST}" BUILD_FILES)
-if(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-  file(STRINGS "${DISTCHECK_SVN_FILE_LIST}" SVN_FILES)
-endif(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-file(STRINGS "${DISTCHECK_FS_FILE_LIST}" FS_FILE_LIST)
-list(REMOVE_DUPLICATES BUILD_FILES)
-
 # If we have Subversion, we can do lots more interesting comparisons.
 # Otherwise, just look for files the build system doesn't know about.
 if(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-  if(SVN_FILES)
-    set(BUILD_FILES_NOT_IN_SVN ${BUILD_FILES})
-    set(SVN_FILES_NOT_IN_BUILD ${SVN_FILES})
-    if(BUILD_FILES)
-      list(REMOVE_ITEM BUILD_FILES_NOT_IN_SVN ${SVN_FILES})
-    endif(BUILD_FILES)
-    list(REMOVE_ITEM FS_FILE_LIST ${SVN_FILES})
-  endif(SVN_FILES)
-  if(SVN_FILES_NOT_IN_BUILD AND BUILD_FILES)
-    list(REMOVE_ITEM SVN_FILES_NOT_IN_BUILD ${BUILD_FILES})
-  endif(SVN_FILES_NOT_IN_BUILD AND BUILD_FILES)
-endif(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-list(REMOVE_ITEM FS_FILE_LIST ${BUILD_FILES})
 
-# Report file in Subversion but not the build logic:
-if(SVN_FILES_NOT_IN_BUILD)
-  string(REPLACE ";" "\n" SVN_FILES_NOT_IN_BUILD "${SVN_FILES_NOT_IN_BUILD}")
-  message("\nFiles in repository are not accounted for in build logic: 
\n${SVN_FILES_NOT_IN_BUILD}\n")
-endif(SVN_FILES_NOT_IN_BUILD)
+  # Report file in Subversion but not the build logic:
+  set(SVN_FILES_NOT_IN_BUILD ${SVN_FILES})
+  list(REMOVE_ITEM SVN_FILES_NOT_IN_BUILD ${BUILD_FILES})
+  if(SVN_FILES_NOT_IN_BUILD)
+    string(REPLACE ";" "\n" SVN_FILES_NOT_IN_BUILD "${SVN_FILES_NOT_IN_BUILD}")
+    message("\nFiles known to subversion are not accounted for in build logic: 
\n${SVN_FILES_NOT_IN_BUILD}\n")
+  endif(SVN_FILES_NOT_IN_BUILD)
 
-# Report file in the build logic but not Subversion:
-if(BUILD_FILES_NOT_IN_SVN)
-  string(REPLACE ";" "\n" BUILD_FILES_NOT_IN_SVN "${BUILD_FILES_NOT_IN_SVN}")
-  message("\nFiles mentioned in build logic are not checked into the 
repository: \n${BUILD_FILES_NOT_IN_SVN}\n")
-endif(BUILD_FILES_NOT_IN_SVN)
+  # Report file in the build logic but not Subversion:
+  set(BUILD_FILES_NOT_IN_SVN ${BUILD_FILES})
+  list(REMOVE_ITEM BUILD_FILES_NOT_IN_SVN ${SVN_FILES})
+  if(BUILD_FILES_NOT_IN_SVN)
+    string(REPLACE ";" "\n" BUILD_FILES_NOT_IN_SVN "${BUILD_FILES_NOT_IN_SVN}")
+    message("\nFiles mentioned in build logic are not checked into the 
repository: \n${BUILD_FILES_NOT_IN_SVN}\n")
+  endif(BUILD_FILES_NOT_IN_SVN)
 
-# Either of the previous two cases halts distcheck until fixed.
-mark_as_advanced(FORCE_DISTCHECK)
-if (SVN_FILES_NOT_IN_BUILD OR BUILD_FILES_NOT_IN_SVN)
-  if (NOT FORCE_DISTCHECK)
-    message(FATAL_ERROR "ERROR: Distcheck cannot proceed until build files and 
repo are in sync (set -DFORCE_DISTCHECK=ON to override)")
-  endif (NOT FORCE_DISTCHECK)
-endif (SVN_FILES_NOT_IN_BUILD OR BUILD_FILES_NOT_IN_SVN)
+  # Either of the previous two cases halts distcheck until fixed.
+  mark_as_advanced(FORCE_DISTCHECK)
+  if (SVN_FILES_NOT_IN_BUILD OR BUILD_FILES_NOT_IN_SVN)
+    if (NOT FORCE_DISTCHECK)
+      message(FATAL_ERROR "ERROR: Distcheck cannot proceed until build files 
and repo are in sync (set -DFORCE_DISTCHECK=ON to override)")
+    endif (NOT FORCE_DISTCHECK)
+  endif (SVN_FILES_NOT_IN_BUILD OR BUILD_FILES_NOT_IN_SVN)
 
-# OK, no fatal errors - clean up the text files
-file(REMOVE "${DISTCHECK_CMAKE_FILE_LIST}")
-file(REMOVE "${DISTCHECK_SVN_FILE_LIST}")
-file(REMOVE "${DISTCHECK_FS_FILE_LIST}")
+endif(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
 
-# If we have subversion, we need one type of error message
-if(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
+set(IGNORED_FS_FILES ${FS_FILE_LIST})
+list(REMOVE_ITEM IGNORED_FS_FILES ${BUILD_FILES})
+if(IGNORED_FS_FILES)
+  string(REPLACE ";" "\n" IGNORED_FS_FILES "${IGNORED_FS_FILES}")
+  message("\nFiles unknown to both Subversion and the Build logic (will not be 
incorporated into dist):\n${IGNORED_FS_FILES}\n")
+endif(IGNORED_FS_FILES)
 
-  if(FS_FILE_LIST)
-     string(REPLACE ";" "\n" FS_FILE_LIST "${FS_FILE_LIST}")
-     message("\nFiles unknown to both Subversion and the Build logic (will not 
be incorporated into dist):\n${FS_FILE_LIST}\n")
-  endif(FS_FILE_LIST)
-
-  # Write out ignored file list for subsequent CPack use
-  file(WRITE @CMAKE_BINARY_DIR@/cpack_ignore.cmake ${FS_FILE_LIST})
-
-else(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-
-  # Different error message  - in fact, without Subversion to keep us 
straight, this is a fatal error.
-  if(FS_FILE_LIST)
-      string(REPLACE ";" "\n" FS_FILE_LIST "${FS_FILE_LIST}")
-      message("\nFiles unknown to the Build logic (will not be incorporated 
into dist):\n${FS_FILE_LIST}\n")
-  else(FS_FILE_LIST)
-    message("\nWarning: Distcheck is being performed without subversion.  
Temporary files and other unknown files present in directories marked by 
distcheck as ignore-in-toto will be incorporated into the source archives by 
CPack.  If building archives for distribution, using a Subversion checkout is 
recommended.\n")
-  endif(FS_FILE_LIST)
-
-endif(SVN_EXEC AND EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-
 # Write out the archive status so the build targets can see it later.
 if(NOT_DISTCHECK_READY)
   if("${NOT_DISTCHECK_READY}" STREQUAL "1")
@@ -334,7 +247,7 @@
   file(APPEND 
"@CMAKE_BINARY_DIR@/CMakeTmp/distcheck_remove_archives_if_invalid" 
"execute_process(COMMAND @CMAKE_COMMAND@ -E remove 
\"${CPACK_SOURCE_PACKAGE_FILE_NAME}.zip\")\n")
 else(NOT_DISTCHECK_READY)
   if(NOT SVN_EXEC OR NOT EXISTS "@CMAKE_SOURCE_DIR@/.svn")
-    file(WRITE 
"@CMAKE_BINARY_DIR@/CMakeTmp/distcheck_remove_archives_if_invalid" 
"execute_process(COMMAND @CMAKE_COMMAND@ -E echo \"Note:  Archive files were 
generated without being able to compare them to the Subversion archive master 
file lists.  Under these conditions, it is not possible for distcheck to verify 
the contents of directories marked as 'ignore' by the build system.\")\n")
+    file(WRITE 
"@CMAKE_BINARY_DIR@/CMakeTmp/distcheck_remove_archives_if_invalid" 
"execute_process(COMMAND @CMAKE_COMMAND@ -E echo \"Note:  Archive files were 
generated without being able to compare them to the Subversion archive master 
file lists..\")\n")
   else(NOT SVN_EXEC OR NOT EXISTS "@CMAKE_SOURCE_DIR@/.svn")
     file(WRITE 
"@CMAKE_BINARY_DIR@/CMakeTmp/distcheck_remove_archives_if_invalid" "")
   endif(NOT SVN_EXEC OR NOT EXISTS "@CMAKE_SOURCE_DIR@/.svn")

Modified: brlcad/trunk/misc/CMake/source_archive_setup.cmake.in
===================================================================
--- brlcad/trunk/misc/CMake/source_archive_setup.cmake.in       2017-08-10 
13:22:00 UTC (rev 70067)
+++ brlcad/trunk/misc/CMake/source_archive_setup.cmake.in       2017-08-10 
15:48:09 UTC (rev 70068)
@@ -52,31 +52,25 @@
 
 if(NOT EXISTS 
"@CMAKE_BINARY_DIR@/CMakeTmp/create_builddir_source_archive.done")
   file(GLOB_RECURSE pre_existing_files 
"@CMAKE_BINARY_DIR@/source_archive_contents/*")
-  file(STRINGS "@CMAKE_BINARY_DIR@/cmakefiles.cmake" source_tree_files)
-  if(EXISTS "@CMAKE_BINARY_DIR@/cpack_ignore.cmake")
-    file(STRINGS "@CMAKE_BINARY_DIR@/cpack_ignore.cmake" ignored_src_files)
-  endif(EXISTS "@CMAKE_BINARY_DIR@/cpack_ignore.cmake")
+  file(STRINGS "@CMAKE_BINARY_DIR@/cmakefiles.cmake" source_tree_files_raw)
 
   message("Preparing file list...")
 
-  # Remove duplicates and scrub directories out of source_tree_files
+  # Remove duplicates and resolve relative paths
+  set(source_tree_files)
+  foreach(SF ${source_tree_files_raw})
+    get_filename_component(SFA "${SF}" ABSOLUTE)
+    list(APPEND source_tree_files ${SFA})
+  endforeach(SF ${source_tree_files_raw})
+  list(SORT source_tree_files)
   list(REMOVE_DUPLICATES source_tree_files)
-  foreach(ITEM ${source_tree_files})
-    if(IS_DIRECTORY ${ITEM})
-      list(REMOVE_ITEM source_tree_files ${ITEM})
-    endif(IS_DIRECTORY ${ITEM})
-  endforeach(ITEM ${source_tree_files})
 
-  # Sort the final list
-  set(final_list ${source_tree_files})
-  list(SORT final_list)
-
   # Do the actual copy
   message("Copying files...")
   set(processed_files)
   set(processed 0)
-  list(LENGTH final_list file_count)
-  foreach(source_file ${final_list})
+  list(LENGTH source_tree_files file_count)
+  foreach(source_file ${source_tree_files})
     string(REPLACE "@CMAKE_SOURCE_DIR@/" 
"@CMAKE_BINARY_DIR@/source_archive_contents/" outfile "${source_file}")
     if(EXISTS ${outfile})
       if("${source_file}" IS_NEWER_THAN ${outfile})
@@ -127,7 +121,6 @@
     endforeach(candidate ${dir_list})
   endwhile(HAVE_EMPTY_DIRS)
 
-
 endif(NOT EXISTS 
"@CMAKE_BINARY_DIR@/CMakeTmp/create_builddir_source_archive.done")
 
 # Local Variables:

Modified: brlcad/trunk/src/conv/step/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/conv/step/CMakeLists.txt   2017-08-10 13:22:00 UTC (rev 
70067)
+++ brlcad/trunk/src/conv/step/CMakeLists.txt   2017-08-10 15:48:09 UTC (rev 
70068)
@@ -119,9 +119,7 @@
 CMAKEFILES(
   AP_Common.h
   BRLCADWrapper.h
-  BRLCADWrapper.cpp
   STEPWrapper.h
-  STEPWrapper.cpp
   ap203_elements.txt
   ap203e2-g/CMakeLists.txt
   ap203e2_elements.txt

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

Reply via email to