Revision: 77966
          http://sourceforge.net/p/brlcad/code/77966
Author:   starseeker
Date:     2020-12-15 14:26:46 +0000 (Tue, 15 Dec 2020)
Log Message:
-----------
Update to latest upstream stepcode

Modified Paths:
--------------
    brlcad/branches/stepsync/src/other/stepcode/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/cmake/SC_CXX_schema_macros.cmake
    brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Config_Headers.cmake
    brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/README
    
brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/schemaScanner.cmake
    brlcad/branches/stepsync/src/other/stepcode/data/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/example/ap203min/CMakeLists.txt
    
brlcad/branches/stepsync/src/other/stepcode/example/ap203min/ExternalProjectBuild/cmake/External_STEPCode.cmake
    brlcad/branches/stepsync/src/other/stepcode/include/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/include/sc_cf_cmake.h.in
    brlcad/branches/stepsync/src/other/stepcode/src/base/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/base/judy/src/judy.c
    brlcad/branches/stepsync/src/other/stepcode/src/base/sc_mkdir.c
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.cc
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.h
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.cc
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.h
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.cc
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.h
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.cc
    brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.h
    brlcad/branches/stepsync/src/other/stepcode/src/cleditor/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/cllazyfile/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.cc
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.h
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/globalRule.h
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/interfaceSpec.h
    brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/mgrnode.h
    
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/sdaiApplication_instance.cc
    brlcad/branches/stepsync/src/other/stepcode/src/clutils/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/clutils/sc_hash.cc
    brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_attribute.c
    brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_misc.c
    brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_type.c
    brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_wrapper.cc
    brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/selects.c
    
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_misc_python.c
    
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_python.c
    
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_wrapper_python.cc
    brlcad/branches/stepsync/src/other/stepcode/src/exppp/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode/src/exppp/pretty_schema.c
    brlcad/branches/stepsync/src/other/stepcode/src/express/expr.c
    brlcad/branches/stepsync/src/other/stepcode/src/express/expscan.l
    brlcad/branches/stepsync/src/other/stepcode/src/express/fedex.c
    brlcad/branches/stepsync/src/other/stepcode/src/express/generated/expscan.c
    brlcad/branches/stepsync/src/other/stepcode/src/express/info.c
    brlcad/branches/stepsync/src/other/stepcode/src/express/stack.h
    brlcad/branches/stepsync/src/other/stepcode/test/CMakeLists.txt
    brlcad/branches/stepsync/src/other/stepcode.dist

Added Paths:
-----------
    brlcad/branches/stepsync/src/other/stepcode/cmake/Path_Setup.cmake

Removed Paths:
-------------
    brlcad/branches/stepsync/src/other/stepcode/SC_VERSION.txt
    
brlcad/branches/stepsync/src/other/stepcode/cmake/Generated_Source_Utils.cmake
    brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Build_opts.cmake
    brlcad/branches/stepsync/src/other/stepcode/src/base/sc_nullptr.h

Modified: brlcad/branches/stepsync/src/other/stepcode/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/CMakeLists.txt  2020-12-11 
19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/CMakeLists.txt  2020-12-15 
14:26:46 UTC (rev 77966)
@@ -1,4 +1,4 @@
-#    C M A K E L I S T S . T X T   F O R   S T E P C O D E
+#                C M A K E L I S T S . T X T
 #
 # This file is Copyright (c) 2010 United States Government as
 # represented by the U.S. Army Research Laboratory.
@@ -38,9 +38,14 @@
 # This file contains the top level CMakeLists.txt logic for the
 # STEPcode software package.
 
-
 project(SC)
 
+# Minimum required version of CMake
+cmake_minimum_required(VERSION 3.12)
+if (POLICY CMP0077)
+  cmake_policy(SET CMP0077 OLD)
+endif (POLICY CMP0077)
+
 # SC version
 set(SC_VERSION_MAJOR 0)
 set(SC_VERSION_MINOR 9)
@@ -47,20 +52,18 @@
 set(SC_VERSION_PATCH 1)
 set(SC_VERSION ${SC_VERSION_MAJOR}.${SC_VERSION_MINOR}.${SC_VERSION_PATCH})
 
-# Minimum required version of CMake
-cmake_minimum_required(VERSION 3.12)
-if (POLICY CMP0077)
-  cmake_policy(SET CMP0077 OLD)
-endif (POLICY CMP0077)
+# Set language standards
+set(CMAKE_C_EXTENSIONS OFF)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
 # CMake derives much of its functionality from modules, typically
 # stored in one directory - let CMake know where to find them.
 set(SC_CMAKE_DIR "${SC_SOURCE_DIR}/cmake")
-if(NOT SC_IS_SUBBUILD)
-  set(CMAKE_MODULE_PATH "${SC_CMAKE_DIR};${CMAKE_MODULE_PATH}")
-else(NOT SC_IS_SUBBUILD)
-  set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${SC_CMAKE_DIR}")
-endif(NOT SC_IS_SUBBUILD)
+list(APPEND CMAKE_MODULE_PATH "${SC_CMAKE_DIR}")
 
 # OpenBSD has its own naming conventions.  Set a platform variable based on
 # the OS name so we can test for it succinctly.
@@ -68,21 +71,94 @@
   set(OPENBSD ON)
 endif ("${CMAKE_SYSTEM}" MATCHES ".*OpenBSD.*")
 
-# testing and compilation options, build output dirs, install dirs, uninstall, 
package creation, etc
-include(${SC_CMAKE_DIR}/SC_Build_opts.cmake)
+#---------------------------------------------------------------------
+# Set up various relative path variables and build output directories
+include(Path_Setup)
 
+#---------------------------------------------------------------------
+# The following logic is what allows binaries to run successfully in
+# the build directory AND install directory.  Thanks to plplot for
+# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
+# Documentation of these options is available at
+# http://www.cmake.org/Wiki/CMake_RPATH_handling
+
+# use, i.e. don't skip the full RPATH for the build tree
+if(NOT DEFINED CMAKE_SKIP_BUILD_RPATH)
+  set(CMAKE_SKIP_BUILD_RPATH  FALSE)
+endif()
+
+# when building, don't use the install RPATH already
+# (but later on when installing)
+if(NOT DEFINED CMAKE_BUILD_WITH_INSTALL_RPATH)
+  set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+endif()
+
+# the RPATH/INSTALL_NAME_DIR to be used when installing
+if (NOT APPLE)
+  if(NOT DEFINED CMAKE_INSTALL_RPATH)
+    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:\$ORIGIN/../lib")
+  endif()
+endif(NOT APPLE)
+# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH
+# 
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INSTALL_NAME_DIR
+if(NOT DEFINED CMAKE_INSTALL_NAME_DIR)
+  set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+endif()
+
+# add the automatically determined parts of the RPATH which point to
+# directories outside the build tree to the install RPATH
+if(NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_PATH)
+  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif()
+
+
+#---------------------------------------------------------------------
+# Build options
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+option(BUILD_STATIC_LIBS "Build static libraries" OFF)
+
+option(SC_PYTHON_GENERATOR "Compile exp2python" ON)
+option(SC_CPP_GENERATOR "Compile exp2cxx" ON)
+
+option(SC_MEMMGR_ENABLE_CHECKS "Enable sc_memmgr's memory leak detection" OFF)
+option(SC_TRACE_FPRINTF "Enable extra comments in generated code so the code's 
source in exp2cxx may be located" OFF)
+
+option(SC_ENABLE_COVERAGE "Enable code coverage test" OFF)
+if (SC_ENABLE_COVERAGE AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+  set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING 
"Extra compile flags required by code coverage" FORCE)
+  set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE 
STRING "Extra compile flags required by code coverage" FORCE)
+  set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage" CACHE 
STRING "Extra linker flags required by code coverage" FORCE)
+endif (SC_ENABLE_COVERAGE AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+
+option(SC_ENABLE_TESTING "Enable unittesting framework" OFF)
+if(SC_ENABLE_TESTING)
+  if(NOT DEFINED SC_BUILD_SCHEMAS)
+    set(SC_BUILD_SCHEMAS "ALL") #test all schemas, unless otherwise specified
+  endif()
+  include(CTest)
+endif(SC_ENABLE_TESTING)
+
+# TODO - BRL-CAD is the only known user of this option, and it will be
+# transitioning to a new setup that won't need it - once that's done,
+# we should just remove this option.
+option(SC_SKIP_EXEC_INSTALL "Skip installing executables" OFF)
+mark_as_advanced(SC_SKIP_EXEC_INSTALL)
+
 # SC_ADDEXEC and SC_ADDLIB macros, dllimport/export, etc
-include(${SC_CMAKE_DIR}/SC_Targets.cmake)
+include(SC_Targets)
 
 # Macros related to paths
-include(${SC_CMAKE_DIR}/SC_Paths.cmake)
+include(SC_Paths)
 
 # locale stuff
-include(${SC_CMAKE_DIR}/SC_Locale.cmake)
+include(SC_Locale)
 
 # logic related to regenerating the lexer and parser source code
-include(${SC_CMAKE_DIR}/SC_Regenerate.cmake)
+include(SC_Regenerate)
 
+# create config headers sc_cf.h and sc_version_string.h
+include(SC_Config_Headers)
+
 if(NOT DEFINED SC_SDAI_ADDITIONAL_EXES_SRCS)
   set(SC_SDAI_ADDITIONAL_EXES_SRCS "" CACHE STRING "Source files for 
additional executables to be linked with SDAI libs")
 endif(NOT DEFINED SC_SDAI_ADDITIONAL_EXES_SRCS)
@@ -91,8 +167,8 @@
   list(APPEND CONFIG_END_MESSAGES
     "** CMake variable SC_BUILD_SCHEMAS was not set. Defaults to building ALL 
schemas, which will take a"
     "     while; see 
http://stepcode.org/mw/index.php?title=STEPcode_CMake_variables#SC_BUILD_SCHEMAS";)
-  #this makes SC_BUILD_SCHEMAS show up in cmake-gui
-  set(SC_BUILD_SCHEMAS "ALL" CACHE string "Semicolon-separated list of paths 
to EXPRESS schemas to be built")
+#this makes SC_BUILD_SCHEMAS show up in cmake-gui
+  set(SC_BUILD_SCHEMAS "ALL" CACHE STRING "Semicolon-separated list of paths 
to EXPRESS schemas to be built")
 endif(NOT DEFINED SC_BUILD_SCHEMAS)
 
 if(NOT SC_IS_SUBBUILD)
@@ -102,23 +178,18 @@
     ".. Generating step can take a while if you are building several schemas.")
 endif(NOT SC_IS_SUBBUILD)
 
-# create config headers sc_cf.h and sc_version_string.h
-include(${SC_CMAKE_DIR}/SC_Config_Headers.cmake)
+# create config headers sc_cf.h
+include(SC_Config_Headers)
 
 
 ################
 
-set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 11)
-
 if(MSVC)
   # Disable warning for preferred usage of secure functions (example strcpy 
should be strcpy_s, ...)
   add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
-else()
+endif()
+if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL 
"Clang")
   add_definitions(-pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline 
-Wno-long-long)
-  if(HAVE_NULLPTR)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-  endif(HAVE_NULLPTR)
 endif()
 
 include_directories(
@@ -143,14 +214,20 @@
 endif(SC_ENABLE_TESTING)
 add_subdirectory(doc)
 
-# 'make core' builds everything that isn't generated. for devs.
-add_custom_target(core)
-if($CACHE{SC_BUILD_SHARED_LIBS})
-  add_dependencies(core stepdai stepeditor exp2cxx check-express)
-else()
-  add_dependencies(core stepdai-static stepeditor-static exp2cxx check-express)
-endif()
+if(NOT SC_IS_SUBBUILD)
+    
#-----------------------------------------------------------------------------
+  # SC Packaging
+  # $make package
+  set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "STEPcode")
+  set(CPACK_SET_DESTDIR "ON")
+  set(CPACK_PACKAGE_VERSION_MAJOR ${SC_VERSION_MAJOR})
+  set(CPACK_PACKAGE_VERSION_MINOR ${SC_VERSION_MINOR})
+  set(CPACK_PACKAGE_NAME SC)
+  set(CPACK_PACKAGE_CONTACT "SC Developers <[email protected]>")
+  include(CPack)
+endif(NOT SC_IS_SUBBUILD)
 
+
 # CONFIG_END_MESSAGES - list of messages to be printed after everything else 
is done.
 # THIS MUST BE LAST to ensure that they are visible to the user without 
scrolling.
 foreach(_msg ${CONFIG_END_MESSAGES})

Deleted: brlcad/branches/stepsync/src/other/stepcode/SC_VERSION.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/SC_VERSION.txt  2020-12-11 
19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/SC_VERSION.txt  2020-12-15 
14:26:46 UTC (rev 77966)
@@ -1 +0,0 @@
-0.8

Deleted: 
brlcad/branches/stepsync/src/other/stepcode/cmake/Generated_Source_Utils.cmake
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/cmake/Generated_Source_Utils.cmake  
    2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/cmake/Generated_Source_Utils.cmake  
    2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,67 +0,0 @@
-# Utility routines for managing generated files with CMake
-
-macro(MD5 filename md5sum)
-  file(READ "${filename}" RAW_MD5_FILE)
-  string(REGEX REPLACE "\r" "" STRIPPED_MD5_FILE "${RAW_MD5_FILE}")
-  string(MD5 ${md5sum} "${STRIPPED_MD5_FILE}")
-endmacro(MD5)
-
-macro(FILEVAR filename var)
-  string(REGEX REPLACE "[^a-zA-Z0-9]" "_" ${var} ${filename})
-endmacro(FILEVAR)
-
-macro(VERIFY_FILES filelist warn resultvar)
-  set(${resultvar} 1)
-  foreach(fileitem ${filelist})
-    # Deal with absolute and relative paths a bit differently
-    get_filename_component(ITEM_ABS_PATH "${fileitem}" ABSOLUTE)
-    if("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-      set(filefullname "${fileitem}")
-    else("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-      set(filefullname "${CURRENT_SOURCE_DIR}/${fileitem}")
-    endif("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-    get_filename_component(filename "${fileitem}" NAME)
-    # Got filename components sorted - proceed
-    if(NOT EXISTS ${filefullname})
-      message(FATAL_ERROR "Attempted to verify non-existant file 
${filefullname}")
-    endif(NOT EXISTS ${filefullname})
-    FILEVAR(${filename} filevar)
-    if(NOT baseline_${filevar}_md5)
-      message(FATAL_ERROR "No baseline MD5 available for ${filename} - 
baseline_${filevar}_md5 is not defined")
-    endif(NOT baseline_${filevar}_md5)
-    MD5(${filefullname} ${filevar}_md5)
-    if(NOT "${${filevar}_md5}" STREQUAL "${baseline_${filevar}_md5}")
-      if("${warn}" STREQUAL "1")
-       message("\n${filename} differs from baseline: baseline md5 hash is 
${baseline_${filevar}_md5} and current hash is ${${filevar}_md5}\n")
-      endif("${warn}" STREQUAL "1")
-      set(${resultvar} 0)
-    endif(NOT "${${filevar}_md5}" STREQUAL "${baseline_${filevar}_md5}")
-  endforeach(fileitem ${filelist})
-endmacro(VERIFY_FILES filelist resultvar)
-
-macro(WRITE_MD5_SUMS filelist outfile)
-  foreach(fileitem ${filelist})
-    # Deal with absolute and relative paths a bit differently
-    get_filename_component(ITEM_ABS_PATH "${fileitem}" ABSOLUTE)
-    if("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-      set(filefullname "${fileitem}")
-    else("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-      set(filefullname "${CURRENT_SOURCE_DIR}/${fileitem}")
-    endif("${fileitem}" STREQUAL "${ITEM_ABS_PATH}")
-    get_filename_component(filename "${fileitem}" NAME)
-    # Got filename components sorted - proceed
-    if(NOT EXISTS ${filefullname})
-      message(FATAL_ERROR "Attempted to get MD5 sum of non-existant file 
${filefullname}")
-    endif(NOT EXISTS ${filefullname})
-    FILEVAR(${filename} filevar)
-    MD5(${filefullname} ${filevar}_md5)
-    file(APPEND ${outfile} "set(baseline_${filevar}_md5 ${${filevar}_md5})\n")
-  endforeach(fileitem ${filelist})
-endmacro(WRITE_MD5_SUMS)
-
-# Local Variables:
-# tab-width: 8
-# mode: cmake
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=2 tabstop=8

Added: brlcad/branches/stepsync/src/other/stepcode/cmake/Path_Setup.cmake
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/cmake/Path_Setup.cmake          
                (rev 0)
+++ brlcad/branches/stepsync/src/other/stepcode/cmake/Path_Setup.cmake  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -0,0 +1,164 @@
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+#---------------------------------------------------------------------
+# Define relative install locations.  Don't set these if they have already
+# been set by some other means (like a higher level CMakeLists.txt file
+# including this one).
+
+# The location in which to install BRL-CAD executables.
+if(NOT BIN_DIR)
+  set(BIN_DIR bin)
+endif(NOT BIN_DIR)
+
+# Define a relative path that will "reset" a path back to
+# the point before BIN_DIR was appended.  This is primarily
+# useful when working with generator expressions
+unset(RBIN_DIR CACHE)
+set(LBIN_DIR "${BIN_DIR}")
+while (NOT "${LBIN_DIR}" STREQUAL "")
+  get_filename_component(LBDIR "${LBIN_DIR}" DIRECTORY)
+  set(LBIN_DIR "${LBDIR}")
+  if ("${RBIN_DIR}" STREQUAL "")
+    set(RBIN_DIR "..")
+  else ("${RBIN_DIR}" STREQUAL "")
+    set(RBIN_DIR "../${RBIN_DIR}")
+  endif ("${RBIN_DIR}" STREQUAL "")
+endwhile (NOT "${LBIN_DIR}" STREQUAL "")
+
+# The location in which to install BRL-CAD libraries.
+if(NOT LIB_DIR)
+  set(LIB_DIR lib)
+endif(NOT LIB_DIR)
+if(NOT LIBEXEC_DIR)
+  set(LIBEXEC_DIR libexec)
+endif(NOT LIBEXEC_DIR)
+
+# The location in which to install BRL-CAD header files.
+if(NOT INCLUDE_DIR)
+  set(INCLUDE_DIR include)
+endif(NOT INCLUDE_DIR)
+
+# The location in which to install BRL-CAD data files
+if(NOT DATA_DIR)
+  set(DATA_DIR share)
+endif(NOT DATA_DIR)
+
+# The location in which to install BRL-CAD documentation files
+if(NOT DOC_DIR)
+  set(DOC_DIR ${DATA_DIR}/doc)
+endif(NOT DOC_DIR)
+
+# The location in which to install BRL-CAD Manual pages
+if(NOT MAN_DIR)
+  set(MAN_DIR ${DATA_DIR}/man)
+endif(NOT MAN_DIR)
+
+# Make sure no absolute paths have been supplied to these variables
+set(INSTALL_DIRS BIN INCLUDE LIB LIBEXEC DATA MAN DOC)
+foreach(instdir ${INSTALL_DIRS})
+  get_filename_component(instdir_full ${${instdir}_DIR} ABSOLUTE)
+  if("${${instdir}_DIR}" STREQUAL "${instdir_full}")
+    message(FATAL_ERROR "Error - absolute path supplied for ${instdir}_DIR.  
This path must be relative - e.g. \"bin\" instead of \"/usr/bin\"")
+    set(HAVE_INSTALL_DIR_FULL_PATH 1)
+  endif("${${instdir}_DIR}" STREQUAL "${instdir_full}")
+endforeach(instdir ${INSTALL_DIRS})
+
+#---------------------------------------------------------------------
+# Output directories - this is where built library and executable
+# files will be placed after building but prior to install.  The
+# necessary variables change between single and multi configuration
+# build systems, so it is necessary to handle both cases on a
+# conditional basis.
+
+if(NOT CMAKE_CONFIGURATION_TYPES)
+  # If we're not doing multi-configuration, just set the three main
+  # variables to the correct values.
+  if(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY 
${${PROJECT_NAME}_BINARY_DIR}/${LIB_DIR} CACHE INTERNAL "Single output 
directory for building all libraries.")
+  endif(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+  if(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY 
${${PROJECT_NAME}_BINARY_DIR}/${LIB_DIR} CACHE INTERNAL "Single output 
directory for building all archives.")
+  endif(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+  if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY 
${${PROJECT_NAME}_BINARY_DIR}/${BIN_DIR} CACHE INTERNAL "Single output 
directory for building all executables.")
+  endif(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+else(NOT CMAKE_CONFIGURATION_TYPES)
+  # Multi-configuration is more difficult.  Not only do we need to
+  # properly set the output directories, but we also need to
+  # identify the "toplevel" directory for each configuration so
+  # we can place files, documentation, etc. in the correct
+  # relative positions.  Because files may be placed by CMake
+  # without a build target to put them in their proper relative build
+  # directory position using these paths, we must fully qualify them
+  # without using CMAKE_CFG_INTDIR.
+  #
+  # We define directories that may not be quite "standard"
+  # for a particular build tool - for example, native VS2010 projects use
+  # another directory to denote CPU type being compiled for - but CMake only
+  # supports multi-configuration setups having multiple configurations,
+  # not multiple compilers.
+  #
+  # One additional wrinkle we must watch for here is the case where
+  # a multi-configuration setup uses "." for its internal directory -
+  # if that's the case, we need to just set the various config output
+  # directories to the same value.
+  set(CFG_ROOT ${${PROJECT_NAME}_BINARY_DIR})
+  foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
+    if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+      set(CFG_ROOT ${${PROJECT_NAME}_BINARY_DIR}/${CFG_TYPE})
+    endif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+    string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
+    if(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+      set("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}" 
${CFG_ROOT}/${LIB_DIR} CACHE INTERNAL "Single output directory for building 
${CFG_TYPE} libraries.")
+    endif(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+    if(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+      set("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}" 
${CFG_ROOT}/${LIB_DIR} CACHE INTERNAL "Single output directory for building 
${CFG_TYPE} archives.")
+    endif(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+    if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+      set("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}" 
${CFG_ROOT}/${BIN_DIR} CACHE INTERNAL "Single output directory for building 
${CFG_TYPE} executables.")
+    endif(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER})
+    if(NOT DEFINED CMAKE_BINARY_DIR_${CFG_TYPE_UPPER})
+      set("CMAKE_BINARY_DIR_${CFG_TYPE_UPPER}" ${CFG_ROOT} CACHE INTERNAL 
"Toplevel binary dir for ${CFG_TYPE} building.")
+    endif(NOT DEFINED CMAKE_BINARY_DIR_${CFG_TYPE_UPPER})
+    if(NOT DEFINED ${PROJECT_NAME}_BINARY_DIR_${CFG_TYPE_UPPER})
+      set("${PROJECT_NAME}_BINARY_DIR_${CFG_TYPE_UPPER}" ${CFG_ROOT} CACHE 
INTERNAL "Toplevel binary dir for ${CFG_TYPE} building.")
+    endif(NOT DEFINED ${PROJECT_NAME}_BINARY_DIR_${CFG_TYPE_UPPER})
+  endforeach()
+endif(NOT CMAKE_CONFIGURATION_TYPES)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: 
brlcad/branches/stepsync/src/other/stepcode/cmake/Path_Setup.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Build_opts.cmake
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Build_opts.cmake       
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Build_opts.cmake       
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,186 +0,0 @@
-# BIN and LIB directories
-if(NOT DEFINED BIN_DIR)
-  set(BIN_DIR bin)
-endif(NOT DEFINED BIN_DIR)
-
-if(NOT DEFINED LIB_DIR)
-  set(LIB_DIR lib)
-endif(NOT DEFINED LIB_DIR)
-
-# testing and compilation options, build output dirs, install dirs, etc
-# included by root CMakeLists
-
-if(NOT DEFINED INCLUDE_INSTALL_DIR)
-  set(INCLUDE_INSTALL_DIR include)
-endif(NOT DEFINED INCLUDE_INSTALL_DIR)
-
-if(NOT DEFINED LIB_INSTALL_DIR)
-  set(LIB_INSTALL_DIR lib)
-endif(NOT DEFINED LIB_INSTALL_DIR)
-
-if(NOT DEFINED BIN_INSTALL_DIR)
-  set(BIN_INSTALL_DIR bin)
-endif(NOT DEFINED BIN_INSTALL_DIR)
-
-if(NOT DEFINED SC_BUILD_TYPE)
-  set(SC_BUILD_TYPE "Debug" CACHE STRING "Build type") # By default set debug 
build
-endif(NOT DEFINED SC_BUILD_TYPE)
-if(NOT SC_IS_SUBBUILD)
-  set(CMAKE_BUILD_TYPE ${SC_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" 
FORCE)
-else(NOT SC_IS_SUBBUILD)
-  set(CMAKE_BUILD_TYPE ${SC_BUILD_TYPE})
-endif(NOT SC_IS_SUBBUILD)
-
-# Define helper macro OPTION_WITH_DEFAULT
-macro(OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT)
-  if(NOT DEFINED ${OPTION_NAME})
-    set(${OPTION_NAME} ${OPTION_DEFAULT})
-  endif(NOT DEFINED ${OPTION_NAME})
-  option(${OPTION_NAME} "${OPTION_STRING}" ${${OPTION_NAME}})
-endmacro(OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT)
-
-# build shared libs by default
-OPTION_WITH_DEFAULT(SC_BUILD_SHARED_LIBS "Build shared libs" ON)
-
-# don't build static libs by default
-OPTION_WITH_DEFAULT(SC_BUILD_STATIC_LIBS "Build static libs" OFF)
-
-OPTION_WITH_DEFAULT(SC_PYTHON_GENERATOR "Compile exp2python" ON)
-OPTION_WITH_DEFAULT(SC_CPP_GENERATOR "Compile exp2cxx" ON)
-
-OPTION_WITH_DEFAULT(SC_MEMMGR_ENABLE_CHECKS "Enable sc_memmgr's memory leak 
detection" OFF)
-OPTION_WITH_DEFAULT(SC_TRACE_FPRINTF "Enable extra comments in generated code 
so the code's source in exp2cxx may be located" OFF)
-
-# Should we use C++11?
-OPTION_WITH_DEFAULT(SC_ENABLE_CXX11 "Build with C++ 11 features" ON)
-
-# Get version from git
-OPTION_WITH_DEFAULT(SC_GIT_VERSION "Build using version from git" ON)
-
-option(SC_BUILD_EXPRESS_ONLY "Only build express parser." OFF)
-mark_as_advanced(SC_BUILD_EXPRESS_ONLY)
-
-option(DEBUGGING_GENERATED_SOURCES "disable md5 verification of generated 
sources" OFF)
-mark_as_advanced(DEBUGGING_GENERATED_SOURCES)
-
-#---------------------------------------------------------------------
-# Coverage option
-OPTION_WITH_DEFAULT(SC_ENABLE_COVERAGE "Enable code coverage test" OFF)
-if(SC_ENABLE_COVERAGE)
-  set(SC_ENABLE_TESTING ON CACHE BOOL "Testing enabled by coverage option" 
FORCE)
-  # build static libs, better coverage report
-  set(SC_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
-  set(SC_BUILD_STATIC_LIBS ON CACHE BOOL "Build static libs" FORCE)
-  set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE 
STRING "Extra compile flags required by code coverage" FORCE)
-  set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING 
"Extra compile flags required by code coverage" FORCE)
-  set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage" CACHE 
STRING "Extra linker flags required by code coverage" FORCE)
-  set(SC_BUILD_TYPE "Debug" CACHE STRING "Build type required by testing 
framework" FORCE)
-  set(SC_PYTHON_GENERATOR OFF) #won't build with static libs
-endif(SC_ENABLE_COVERAGE)
-
-#---------------------------------------------------------------------
-# Testing option
-OPTION_WITH_DEFAULT(SC_ENABLE_TESTING "Enable unittesting framework" OFF)
-if(SC_ENABLE_TESTING)
-  if(NOT ${SC_BUILD_EXPRESS_ONLY} AND NOT DEFINED SC_BUILD_SCHEMAS)
-    set(SC_BUILD_SCHEMAS "ALL") #test all schemas, unless otherwise specified
-  endif()
-  include(CTest)
-endif(SC_ENABLE_TESTING)
-
-#---------------------------------------------------------------------
-# Executable install option
-OPTION_WITH_DEFAULT(SC_SKIP_EXEC_INSTALL "Skip installing executables" OFF)
-if(SC_SKIP_EXEC_INSTALL)
-  set(SC_EXEC_NOINSTALL "NO_INSTALL")
-endif(SC_SKIP_EXEC_INSTALL)
-
-#---------------------------------------------------------------------
-# The following logic is what allows binaries to run successfully in
-# the build directory AND install directory.  Thanks to plplot for
-# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
-# Documentation of these options is available at
-# http://www.cmake.org/Wiki/CMake_RPATH_handling
-
-# use, i.e. don't skip the full RPATH for the build tree
-if(NOT DEFINED CMAKE_SKIP_BUILD_RPATH)
-  set(CMAKE_SKIP_BUILD_RPATH  FALSE)
-endif()
-
-# when building, don't use the install RPATH already
-# (but later on when installing)
-if(NOT DEFINED CMAKE_BUILD_WITH_INSTALL_RPATH)
-  set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-endif()
-
-# the RPATH/INSTALL_NAME_DIR to be used when installing
-if (NOT APPLE)
-  if(NOT DEFINED CMAKE_INSTALL_RPATH)
-    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:\$ORIGIN/../lib")
-  endif()
-endif(NOT APPLE)
-# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH
-# 
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INSTALL_NAME_DIR
-if(NOT DEFINED CMAKE_INSTALL_NAME_DIR)
-  set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-endif()
-
-# add the automatically determined parts of the RPATH which point to
-# directories outside the build tree to the install RPATH
-if(NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-endif()
-
-# When this is a subbuild, assume that the parent project controls all of the 
following
-#======================================================================================
-if(NOT SC_IS_SUBBUILD)
-
-  # Output directories. In a separate file so it can be used by the schema 
scanner CMake as well.
-  include(${SC_CMAKE_DIR}/SC_Outdirs.cmake)
-
-  
#-----------------------------------------------------------------------------
-  # Configure install locations. Only do this if CMAKE_INSTALL_PREFIX hasn't
-  # been set already, to try and allow parent builds (if any) some control.
-  #
-  # Need a good Debug location for Windows.
-  if(NOT WIN32)
-    if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
-      set(SC_INSTALL_PREFIX "${SC_SOURCE_DIR}/../sc-install")
-    else()
-      set(SC_INSTALL_PREFIX "/usr/local")
-    endif()
-  endif(NOT WIN32)
-  set(SC_INSTALL_PREFIX ${SC_INSTALL_PREFIX} CACHE
-    PATH "Install prefix prepended to target to create install location")
-  set(CMAKE_INSTALL_PREFIX ${SC_INSTALL_PREFIX} CACHE INTERNAL "Prefix 
prepended to install directories if target destination is not absolute, 
immutable" FORCE)
-
-  
#-----------------------------------------------------------------------------
-  # SC Packaging
-  # $make package
-  set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "STEPcode")
-  set(CPACK_SET_DESTDIR "ON")
-  set(CPACK_PACKAGE_VERSION_MAJOR ${SC_VERSION_MAJOR})
-  set(CPACK_PACKAGE_VERSION_MINOR ${SC_VERSION_MINOR})
-  set(CPACK_PACKAGE_NAME SC)
-  set(CPACK_PACKAGE_CONTACT "SC Developers <[email protected]>")
-  include(CPack)
-
-  
#-----------------------------------------------------------------------------
-  # Uninstall target
-  # From 
http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
-  configure_file(
-    "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
-    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
-    IMMEDIATE @ONLY)
-  add_custom_target(uninstall
-    COMMAND ${CMAKE_COMMAND} -P 
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-endif(NOT SC_IS_SUBBUILD)
-
-# Local Variables:
-# tab-width: 8
-# mode: cmake
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=2 tabstop=8
-

Modified: 
brlcad/branches/stepsync/src/other/stepcode/cmake/SC_CXX_schema_macros.cmake
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/cmake/SC_CXX_schema_macros.cmake    
    2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/cmake/SC_CXX_schema_macros.cmake    
    2020-12-15 14:26:46 UTC (rev 77966)
@@ -28,10 +28,8 @@
 macro(SCHEMA_EXES)
   RELATIVE_PATH_TO_TOPLEVEL(${CMAKE_CURRENT_SOURCE_DIR} 
RELATIVE_PATH_COMPONENT)
   SC_ADDEXEC(p21read_${PROJECT_NAME} SOURCES 
"${RELATIVE_PATH_COMPONENT}/src/test/p21read/p21read.cc" LINK_LIBRARIES 
${PROJECT_NAME} stepdai stepcore stepeditor steputils base TESTABLE)
-  #add_dependencies(p21read_${PROJECT_NAME} version_string)
   if(NOT WIN32)
     SC_ADDEXEC(lazy_${PROJECT_NAME} SOURCES 
"${RELATIVE_PATH_COMPONENT}/src/cllazyfile/lazy_test.cc" LINK_LIBRARIES 
${PROJECT_NAME} steplazyfile stepdai stepcore stepeditor steputils base 
TESTABLE)
-    #add_dependencies(lazy_${PROJECT_NAME} version_string)
   endif(NOT WIN32)
 
   #add user-defined executables
@@ -39,7 +37,6 @@
     get_filename_component(name ${src} NAME_WE)
     get_filename_component(path ${src} ABSOLUTE)
     SC_ADDEXEC(${name}_${PROJECT_NAME} SOURCES ${src} LINK_LIBRARIES 
${PROJECT_NAME} stepdai stepcore stepeditor steputils base TESTABLE)
-    add_dependencies(${name}_${PROJECT_NAME} version_string)
     #set_target_properties(${name}_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS 
"${${PROJECT_NAME}_COMPILE_FLAGS} -I${path}")
   endforeach(src ${SC_SDAI_ADDITIONAL_EXES_SRCS})
 ENDMACRO(SCHEMA_EXES)
@@ -96,7 +93,7 @@
     ${SC_SOURCE_DIR}/src/base/judy/src
   )
   # if testing is enabled, "TESTABLE" sets property EXCLUDE_FROM_ALL and 
prevents installation
-  if($CACHE{SC_BUILD_SHARED_LIBS})
+  if(BUILD_SHARED_LIBS)
     SC_ADDLIB(${PROJECT_NAME} SHARED SOURCES ${sourceFiles} LINK_LIBRARIES 
stepdai stepcore stepeditor steputils base TESTABLE)
     add_dependencies(${PROJECT_NAME} generate_cpp_${PROJECT_NAME})
     if(WIN32)
@@ -105,6 +102,12 @@
         target_compile_options("${PROJECT_NAME}" PRIVATE "/bigobj")
       endif()
     endif()
+    # TODO - ideally we would avoid generating code that triggers this 
warning, but figuring out
+    # how to do so is a non-trivial exercise.  In the meantime, suppress the 
(very verbose) warnings
+    # we get due to this issue so it doesn't mask other problems.
+    if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+      target_compile_options("${PROJECT_NAME}" PRIVATE 
"-Wno-ignored-qualifiers")
+    endif()
   endif()
 
   if($CACHE{SC_BUILD_STATIC_LIBS})

Modified: 
brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Config_Headers.cmake
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Config_Headers.cmake   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/cmake/SC_Config_Headers.cmake   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,4 +1,4 @@
-# create sc_cf.h and sc_version_string.h
+# create sc_cf.h
 
 # Take the sc config file template as the starting point for
 # sc_cf.h.in - scripts may need to append to the template, so
@@ -99,20 +99,8 @@
 # Now that all the tests are done, configure the sc_cf.h file:
 get_property(CONFIG_H_FILE_CONTENTS GLOBAL PROPERTY SC_CONFIG_H_CONTENTS)
 file(WRITE ${CONFIG_H_FILE} "${CONFIG_H_FILE_CONTENTS}")
-configure_file(${CONFIG_H_FILE} 
${SC_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/sc_cf.h)
+configure_file(${CONFIG_H_FILE} ${SC_BINARY_DIR}/${INCLUDE_DIR}/sc_cf.h)
 
-set(VER_HDR "
-#ifndef SC_VERSION_STRING
-#define SC_VERSION_STRING
-static char sc_version[512] = {\"${SC_VERSION}\"};
-#endif"
-)
-file(WRITE 
${CMAKE_CURRENT_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/sc_version_string.h 
"${VER_HDR}")
-set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/sc_version_string.h
-  PROPERTIES GENERATED TRUE
-  HEADER_FILE_ONLY TRUE
-  )
-
 # Local Variables:
 # tab-width: 8
 # mode: cmake

Modified: 
brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/README
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/README     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/README     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,10 +1,14 @@
 README for STEPcode schema scanner
 --------------
 
-The files in this directory are for a schema scanner executable, built by 
CMake during the configuration stage.
+The files in this directory are for a schema scanner executable, built by CMake
+during the configuration stage.
 
-This scanner is used to determine the file names that exp2cxx will use. In 
CMake, all file names must be known before
-configuration finishes - so it is necessary to parse the schemas early.
+This scanner is used to determine the file names that exp2cxx will use. In
+CMake, all file names must be known before configuration finishes - so it is
+necessary to parse the schemas early.
 
-This appears to be a standalone project to CMake, but it is intended to be 
built only as part of STEPcode. It is configured,
-built, and executed during the configuration stage of STEPcode.
+This appears to be a standalone project to CMake, but it is intended to be
+built only as part of STEPcode. It is configured, built, and executed during
+the configuration stage of STEPcode.
+

Modified: 
brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/schemaScanner.cmake
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/schemaScanner.cmake
        2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/cmake/schema_scanner/schemaScanner.cmake
        2020-12-15 14:26:46 UTC (rev 77966)
@@ -71,9 +71,9 @@
 
 # not sure if it makes sense to install this or not...
 if(WIN32)
-       install(PROGRAMS ${SCANNER_OUT_DIR}/schema_scanner.exe DESTINATION 
${BIN_INSTALL_DIR})
+       install(PROGRAMS ${SCANNER_OUT_DIR}/schema_scanner.exe DESTINATION 
${BIN_DIR})
 else(WIN32)
-       install(PROGRAMS ${SCANNER_OUT_DIR}/schema_scanner DESTINATION 
${BIN_INSTALL_DIR})
+       install(PROGRAMS ${SCANNER_OUT_DIR}/schema_scanner DESTINATION 
${BIN_DIR})
 endif(WIN32)
 
 # macro SCHEMA_CMLIST

Modified: brlcad/branches/stepsync/src/other/stepcode/data/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/data/CMakeLists.txt     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/data/CMakeLists.txt     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -10,7 +10,7 @@
 # .exp file inside, which it uses. otherwise, ${path} is assumed to
 # be an express file.
 
-if(NOT ${SC_BUILD_EXPRESS_ONLY} AND NOT "${SC_BUILD_SCHEMAS}" STREQUAL "")
+if(NOT "${SC_BUILD_SCHEMAS}" STREQUAL "")
   include(${SC_CMAKE_DIR}/schema_scanner/schemaScanner.cmake)
   foreach(src ${SC_SDAI_ADDITIONAL_EXES_SRCS})
     get_filename_component(name ${src} NAME_WE)

Modified: 
brlcad/branches/stepsync/src/other/stepcode/example/ap203min/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/example/ap203min/CMakeLists.txt 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/example/ap203min/CMakeLists.txt 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -14,14 +14,14 @@
 endif(NOT DEFINED STEPCODE_ROOT_DIR)
 
 # STEPCODE_ROOT_DIR is relative or absolute path?
-if(EXISTS "${CMAKE_BINARY_DIR}/${STEPCODE_ROOT_DIR}/SC_VERSION.txt")
+if(EXISTS "${CMAKE_BINARY_DIR}/${STEPCODE_ROOT_DIR}/src/express/express.c")
   set(STEPCODE_ROOT_DIR "${CMAKE_BINARY_DIR}/${STEPCODE_ROOT_DIR}")
   message("** STEPCODE_ROOT_DIR is a relative path; converted to absolute 
path: ${STEPCODE_ROOT_DIR}.")
 else()
-  if(NOT EXISTS "${STEPCODE_ROOT_DIR}/SC_VERSION.txt")
+  if(NOT EXISTS "${STEPCODE_ROOT_DIR}/src/express/express.c")
     message(FATAL_ERROR "****  Cannot locate STEPCODE_ROOT_DIR - try an 
absolute path.")
-  endif(NOT EXISTS "${STEPCODE_ROOT_DIR}/SC_VERSION.txt")
-endif(EXISTS "${CMAKE_BINARY_DIR}/${STEPCODE_ROOT_DIR}/SC_VERSION.txt")
+  endif(NOT EXISTS "${STEPCODE_ROOT_DIR}/src/express/express.c")
+endif(EXISTS "${CMAKE_BINARY_DIR}/${STEPCODE_ROOT_DIR}/src/express/express.c")
 
 
 # Use STEPcode as library, but build from this build process.

Modified: 
brlcad/branches/stepsync/src/other/stepcode/example/ap203min/ExternalProjectBuild/cmake/External_STEPCode.cmake
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/example/ap203min/ExternalProjectBuild/cmake/External_STEPCode.cmake
     2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/example/ap203min/ExternalProjectBuild/cmake/External_STEPCode.cmake
     2020-12-15 14:26:46 UTC (rev 77966)
@@ -22,8 +22,3 @@
 
 SET( STEPCODE_BINARY_DIR ${BINARY_DIR} )
 
-# SC CMake does not honor -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-# Consequently, force Debug so it installs in ../sc-install directory
-# instead of /usr/local/lib.
-#
-# SC's own programs fail to build with -DSC_BUILD_SHARED_LIBS=OFF
\ No newline at end of file

Modified: brlcad/branches/stepsync/src/other/stepcode/include/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/include/CMakeLists.txt  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/include/CMakeLists.txt  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -22,22 +22,21 @@
   express/variable.h
   )
 install(FILES ${express_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/express)
+  DESTINATION ${INCLUDE_DIR}/stepcode/express)
 
 set(exppp_HDRS
   exppp/exppp.h
   )
 install(FILES ${exppp_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/exppp)
+  DESTINATION ${INCLUDE_DIR}/stepcode/exppp)
 
 install(FILES ordered_attrs.h
   sc_export.h
   sc_stdbool.h
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode)
+  DESTINATION ${INCLUDE_DIR}/stepcode)
 
-install(FILES ${SC_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/sc_cf.h
-  ${SC_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/sc_version_string.h
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode)
+install(FILES ${SC_BINARY_DIR}/${INCLUDE_DIR}/sc_cf.h
+  DESTINATION ${INCLUDE_DIR}/stepcode)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/stepsync/src/other/stepcode/include/sc_cf_cmake.h.in
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/include/sc_cf_cmake.h.in        
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/include/sc_cf_cmake.h.in        
2020-12-15 14:26:46 UTC (rev 77966)
@@ -2,6 +2,7 @@
 #define SCL_CF_H
 
 /**** Define statements for CMake ****/
+#cmakedefine SC_VERSION "@SC_VERSION@"
 #cmakedefine HAVE_NDIR_H 1
 #cmakedefine HAVE_STDINT_H 1
 #cmakedefine HAVE_SYS_STAT_H 1

Modified: brlcad/branches/stepsync/src/other/stepcode/src/base/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/base/CMakeLists.txt 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/base/CMakeLists.txt 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -15,7 +15,6 @@
   sc_getopt.h
   sc_trace_fprintf.h
   sc_mkdir.h
-  sc_nullptr.h
   path2str.h
   judy/src/judy.h
   judy/src/judyLArray.h
@@ -33,7 +32,7 @@
   add_definitions(-DSC_MEMMGR_ENABLE_CHECKS)
 endif()
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(base SHARED SOURCES ${SC_BASE_SOURCES})
   if(WIN32)
     target_link_libraries(base psapi)
@@ -41,7 +40,7 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(base-static STATIC SOURCES ${SC_BASE_SOURCES})
   if(WIN32)
     target_link_libraries(base-static psapi)
@@ -62,7 +61,7 @@
 endif(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/judy/src")
 
 install(FILES ${SC_BASE_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/base)
+  DESTINATION ${INCLUDE_DIR}/stepcode/base)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/stepsync/src/other/stepcode/src/base/judy/src/judy.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/base/judy/src/judy.c        
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/base/judy/src/judy.c        
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1097,7 +1097,7 @@
 
 JudySlot *judy_del(Judy *judy)
 {
-    int slot, off, size, type, high;
+    int slot, off, size, type;
     JudySlot *table, *inner;
     JudySlot next, *node;
     int keysize, cnt;
@@ -1150,7 +1150,6 @@
                 table = (JudySlot *)(next & JUDY_mask);
                 inner = (JudySlot *)(table[slot >> 4] & JUDY_mask);
                 inner[slot & 0x0F] = 0;
-                high = slot & 0xF0;
 
                 for(cnt = 16; cnt--;)
                     if(inner[cnt]) {

Modified: brlcad/branches/stepsync/src/other/stepcode/src/base/sc_mkdir.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/base/sc_mkdir.c     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/base/sc_mkdir.c     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,4 +1,4 @@
-
+#define _XOPEN_SOURCE /* for S_IFDIR */
 #include "sc_mkdir.h"
 
 #include <sys/stat.h>

Deleted: brlcad/branches/stepsync/src/other/stepcode/src/base/sc_nullptr.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/base/sc_nullptr.h   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/base/sc_nullptr.h   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,13 +0,0 @@
-#ifndef NULLPTR_H
-#define NULLPTR_H
-
-#include <sc_cf.h>
-
-#ifdef HAVE_NULLPTR
-#include <cstddef>
-#else
-#  define nullptr_t void*
-#  define nullptr NULL
-#endif //HAVE_NULLPTR
-
-#endif //NULLPTR_H

Modified: brlcad/branches/stepsync/src/other/stepcode/src/cldai/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/CMakeLists.txt        
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/CMakeLists.txt        
2020-12-15 14:26:46 UTC (rev 77966)
@@ -36,7 +36,7 @@
 
 set(_libdeps steputils base)
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(stepdai SHARED SOURCES ${LIBSTEPDAI_SRCS} LINK_LIBRARIES 
${_libdeps})
   if(WIN32)
     target_compile_definitions(stepdai PRIVATE SC_DAI_DLL_EXPORTS)
@@ -43,12 +43,12 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(stepdai-static STATIC SOURCES ${LIBSTEPDAI_SRCS} LINK_LIBRARIES 
$<JOIN:${_libdeps},-static >-static)
 endif()
 
 install(FILES ${SC_CLDAI_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/cldai)
+  DESTINATION ${INCLUDE_DIR}/stepcode/cldai)
 
 # Local Variables:
 # tab-width: 8

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.cc  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.cc  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -63,7 +63,7 @@
 
 SDAI_Model_contents__list_var SDAI_Entity_extent ::owned_by_() const
 {
-    return (const SDAI_Model_contents__list_var) &_owned_by;
+    return (SDAI_Model_contents__list_var) &_owned_by;
 }
 
 /*

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.h   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEntity_extent.h   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -60,7 +60,7 @@
         }
         SDAI_DAObject__set_var instances_() const
         {
-            return (const SDAI_DAObject__set_var)&_instances;
+            return (SDAI_DAObject__set_var)&_instances;
         }
 
 // need to implement Model_contents__list

Modified: brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.cc   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.cc   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -339,6 +339,12 @@
     return *this;
 }
 
+SDAI_BOOLEAN &SDAI_BOOLEAN::operator= (const SDAI_BOOLEAN &t)
+{
+    v = t;
+    return *this;
+}
+
 SDAI_BOOLEAN &SDAI_BOOLEAN::operator= (const  Boolean t)
 {
     v = t;

Modified: brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.h    
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiEnum.h    
2020-12-15 14:26:46 UTC (rev 77966)
@@ -146,6 +146,7 @@
 
         operator ::Boolean() const;
         SDAI_BOOLEAN &operator=(const SDAI_LOGICAL &t);
+        SDAI_BOOLEAN &operator=(const SDAI_BOOLEAN &t);
 
         SDAI_BOOLEAN &operator=(const ::Boolean t);
         SDAI_LOGICAL operator==(const SDAI_LOGICAL &t) const;

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.cc 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.cc 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -33,7 +33,7 @@
 SDAI_Model_contents_instances_ptr
 SDAI_Model_contents::instances_() const
 {
-    return (const SDAI_Model_contents_instances_ptr) &_instances;
+    return (SDAI_Model_contents_instances_ptr) &_instances;
 }
 
 SDAI_Entity_extent__set_var
@@ -45,7 +45,7 @@
 SDAI_Entity_extent__set_var
 SDAI_Model_contents::folders_() const
 {
-    return (const SDAI_Entity_extent__set_var)&_folders;
+    return (SDAI_Entity_extent__set_var)&_folders;
 }
 
 SDAI_Entity_extent__set_var
@@ -57,7 +57,7 @@
 SDAI_Entity_extent__set_var
 SDAI_Model_contents::populated_folders_() const
 {
-    return (const SDAI_Entity_extent__set_var)&_populated_folders;
+    return (SDAI_Entity_extent__set_var)&_populated_folders;
 }
 
 SDAI_PID_DA_ptr SDAI_Model_contents::get_object_pid(const SDAI_DAObject_ptr 
&d) const

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.h  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiModel_contents.h  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -43,7 +43,7 @@
         }
         SDAI_DAObject__set_var contents_() const
         {
-            return (const SDAI_DAObject__set_var) &_instances;
+            return (SDAI_DAObject__set_var) &_instances;
         }
 
 };

Modified: brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.cc 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.cc 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -46,6 +46,12 @@
     return *this;
 }
 
+SDAI_String &SDAI_String::operator= (const SDAI_String &s)
+{
+    content = s.content;
+    return *this;
+}
+
 bool SDAI_String::operator== (const char *s) const
 {
     return (content == s);

Modified: brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.h  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cldai/sdaiString.h  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -12,6 +12,7 @@
 */
 
 #include <sc_export.h>
+#include <string>
 #include <limits>
 
 
@@ -37,6 +38,7 @@
 
 //  operators
         SDAI_String &operator= (const char *s);
+        SDAI_String &operator= (const SDAI_String &s);
         bool operator== (const char *s) const;
 
         void clear(void);

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cleditor/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cleditor/CMakeLists.txt     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cleditor/CMakeLists.txt     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -27,7 +27,7 @@
   ${SC_SOURCE_DIR}/src/clutils
   )
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(stepeditor SHARED SOURCES ${LIBSTEPEDITOR_SRCS} LINK_LIBRARIES 
stepcore stepdai steputils base)
   if(WIN32)
     target_compile_definitions(stepeditor PRIVATE SC_EDITOR_DLL_EXPORTS)
@@ -34,12 +34,12 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(stepeditor-static STATIC SOURCES ${LIBSTEPEDITOR_SRCS} 
LINK_LIBRARIES stepcore-static stepdai-static steputils-static base-static)
 endif()
 
 install(FILES ${SC_CLEDITOR_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/cleditor)
+  DESTINATION ${INCLUDE_DIR}/stepcode/cleditor)
 
 # Local Variables:
 # tab-width: 8

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/cllazyfile/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/cllazyfile/CMakeLists.txt   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/cllazyfile/CMakeLists.txt   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -32,7 +32,7 @@
 
 set(_libdeps stepcore stepdai steputils base stepeditor)
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(steplazyfile SHARED SOURCES ${clLazyFile_SRCS} LINK_LIBRARIES 
${_libdeps})
   if(WIN32)
     target_compile_definitions(steplazyfile PRIVATE SC_LAZYFILE_DLL_EXPORTS)
@@ -39,8 +39,9 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
-  SC_ADDLIB(steplazyfile-static STATIC SOURCES ${clLazyFile_SRCS} 
LINK_LIBRARIES $<JOIN:${_libdeps},-static >-static)
+if(BUILD_STATIC_LIBS)
+  set(_libdeps stepcore-static stepdai-static steputils-static base-static 
stepeditor-static)
+  SC_ADDLIB(steplazyfile-static STATIC SOURCES ${clLazyFile_SRCS} 
LINK_LIBRARIES ${_libdeps})
 endif()
 
 SC_ADDEXEC(lazy_test SOURCES lazy_test.cc LINK_LIBRARIES steplazyfile 
stepeditor NO_INSTALL)
@@ -47,7 +48,7 @@
 target_compile_definitions(lazy_test PRIVATE NO_REGISTRY)
 
 install(FILES ${SC_CLLAZYFILE_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/cllazyfile)
+  DESTINATION ${INCLUDE_DIR}/stepcode/cllazyfile)
 
 # Local Variables:
 # tab-width: 8

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/CMakeLists.txt   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/CMakeLists.txt   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -133,7 +133,7 @@
 
 set(_libdeps steputils stepdai base)
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(stepcore SHARED SOURCES ${LIBSTEPCORE_SRCS} LINK_LIBRARIES 
${_libdeps})
   if(WIN32)
     target_compile_definitions(stepcore PRIVATE SC_CORE_DLL_EXPORTS)
@@ -140,12 +140,12 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(stepcore-static STATIC SOURCES ${LIBSTEPCORE_SRCS} LINK_LIBRARIES 
$<JOIN:${_libdeps},-static>-static)
 endif()
 
 install(FILES ${SC_CLSTEPCORE_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/clstepcore)
+  DESTINATION ${INCLUDE_DIR}/stepcode/clstepcore)
 
 if(SC_ENABLE_TESTING)
   add_subdirectory(test)

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.cc 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.cc 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1498,6 +1498,7 @@
                     delete(SDAI_BOOLEAN *) ptr.e;
                     ptr.e = 0;
                 }
+                break;
             case LOGICAL_TYPE:
                 if(ptr.e) {
                     delete(SDAI_LOGICAL *) ptr.e;

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.h  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/STEPattribute.h  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -98,7 +98,6 @@
             void *p;
         } ptr;
 
-        const AttrDescriptor *aDesc;
 
     protected:
         bool _derive;
@@ -105,8 +104,12 @@
         bool _mustDeletePtr; ///if a member uses new to create an object in ptr
         ErrorDescriptor _error;
         STEPattribute *_redefAttr;
-        int refCount;
+    public:
+       const AttrDescriptor *aDesc;
 
+    protected:
+       int refCount;
+
         char SkipBadAttr(istream &in, char *StopChars);
         void AddErrorInfo();
         void STEPwriteError(ostream &out, unsigned int line, const char *desc);

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/globalRule.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/globalRule.h     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/globalRule.h     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -15,7 +15,6 @@
 #pragma warning( disable: 4251 )
 #endif
         Express_id _name;
-        std::string _rule_text; // non-SDAI
 #ifdef _MSC_VER
 #pragma warning( pop )
 #endif
@@ -23,6 +22,7 @@
         Entity__set_var _entities; // not implemented
         Where_rule__list_var _where_rules;
         Schema_ptr _parent_schema;
+        std::string _rule_text; // non-SDAI
 
         Global_rule();
         Global_rule(const char *n, Schema_ptr parent_sch, const std::string 
&rt);

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/interfaceSpec.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/interfaceSpec.h  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/interfaceSpec.h  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -15,7 +15,17 @@
 #pragma warning( disable: 4251 )
 #endif
         Express_id _current_schema_id; // schema containing the USE/REF stmt
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+        // set of objects from USE/REFERENCE stmt(s)
+        Explicit_item_id__set_var _explicit_items;
+        Implicit_item_id__set_var _implicit_items; //not yet initialized for 
schema
 
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable: 4251 )
+#endif
         // non-SDAI, not useful for SDAI use of Interface_spec (it would need 
to
         // be a list).
         // schema that defined the USE/REFd objects
@@ -24,10 +34,6 @@
 #pragma warning( pop )
 #endif
 
-        // set of objects from USE/REFERENCE stmt(s)
-        Explicit_item_id__set_var _explicit_items;
-        Implicit_item_id__set_var _implicit_items; //not yet initialized for 
schema
-
         // non-SDAI, not useful for SDAI use of Interface_spec (it would need 
to
         // be a list of ints).
         // schema USEs or REFERENCEs all objects from foreign schema

Modified: brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/mgrnode.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/mgrnode.h        
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/mgrnode.h        
2020-12-15 14:26:46 UTC (rev 77966)
@@ -25,8 +25,6 @@
 
 #include <editordefines.h>
 
-#include <sc_nullptr.h>
-
 class InstMgr;
 
 class SC_CORE_EXPORT MgrNodeBase : public GenericNode
@@ -35,7 +33,7 @@
         virtual inline SDAI_Application_instance *GetSTEPentity()
         {
             abort();
-            return nullptr;
+            return NULL;
         };
         virtual ~MgrNodeBase() {};
 };

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/sdaiApplication_instance.cc
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/sdaiApplication_instance.cc
      2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/src/clstepcore/sdaiApplication_instance.cc
      2020-12-15 14:26:46 UTC (rev 77966)
@@ -20,8 +20,6 @@
 #include "sdaiApplication_instance.h"
 #include "superInvAttrIter.h"
 
-#include <sc_nullptr.h>
-
 SDAI_Application_instance NilSTEPentity;
 
 bool isNilSTEPentity(const SDAI_Application_instance *ai)
@@ -706,6 +704,7 @@
             err->AppendToDetailMsg("Use of @ instead of # to identify 
entity.\n");
             err->GreaterSeverity(SEVERITY_WARNING);
         // no break statement here on purpose
+           [[gnu::fallthrough]];
         case '#': {
             int id = -1;
             in >>  id;
@@ -914,9 +913,12 @@
 
     if((found1 > 0) || (found2 > 0)) {
         if((found1 == 2) || (found2 == 2)) {
-            sprintf(messageBuf,
+            int ocnt = snprintf(messageBuf, BUFSIZ,
                     " Attribute's Entity Reference %s is %s data \'%s\'.\n",
                     attrValue, "followed by invalid", tmp);
+           if (ocnt < BUFSIZ) {
+                   fprintf(stderr, "Warning - truncation of Attribute's Entry 
Reference msg\n");
+           }
             err->AppendToUserMsg(messageBuf);
             err->AppendToDetailMsg(messageBuf);
             err->GreaterSeverity(SEVERITY_WARNING);
@@ -991,7 +993,7 @@
     }
     iAstruct z;
     memset(&z, 0, sizeof z);
-    iAMap_t::value_type nil((Inverse_attribute *) nullptr, z);
+    iAMap_t::value_type nil((Inverse_attribute *) NULL, z);
     return nil;
 }
 

Modified: brlcad/branches/stepsync/src/other/stepcode/src/clutils/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clutils/CMakeLists.txt      
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clutils/CMakeLists.txt      
2020-12-15 14:26:46 UTC (rev 77966)
@@ -25,7 +25,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}
   )
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(steputils SHARED SOURCES ${LIBSTEPUTILS_SRCS} LINK_LIBRARIES base)
   if(WIN32)
     target_compile_definitions(steputils PRIVATE SC_UTILS_DLL_EXPORTS)
@@ -33,7 +33,7 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(steputils-static STATIC SOURCES ${LIBSTEPUTILS_SRCS} 
LINK_LIBRARIES base-static)
   if(WIN32)
     target_link_libraries(steputils-static shlwapi)
@@ -41,7 +41,7 @@
 endif()
 
 install(FILES ${SC_CLUTILS_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/stepcode/clutils)
+  DESTINATION ${INCLUDE_DIR}/stepcode/clutils)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/stepsync/src/other/stepcode/src/clutils/sc_hash.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/clutils/sc_hash.cc  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/clutils/sc_hash.cc  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -65,7 +65,7 @@
     e.symbol = 0;
     e2 = SC_HASHsearch(t, &e, HASH_INSERT);
     if(e2) {
-        fprintf(stderr, "%s: Redeclaration of %s\n", __FUNCTION__, s);
+        fprintf(stderr, "%s: Redeclaration of %s\n", __func__, s);
     }
 }
 

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_attribute.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_attribute.c 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_attribute.c 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -359,7 +359,7 @@
     ATTRprint_access_methods_get_head(entnm, a, file, true);
     fprintf(file, "const {\n");
     ATTRprint_access_methods_str_bin_logging(entnm, attrnm, funcnm, file, 
true);
-    fprintf(file, "    return (const %s) _%s;\n}\n", ctype, attrnm);
+    fprintf(file, "    return (%s) _%s;\n}\n", ctype, attrnm);
     ATTRprint_access_methods_put_head(entnm, a, file);
     fprintf(file, "{\n");
     ATTRprint_access_methods_str_bin_logging(entnm, attrnm, funcnm, file, 
false);
@@ -401,7 +401,7 @@
     ATTRprint_access_methods_get_head(entnm, a, file, true);
     fprintf(file, "const {\n");
     ATTRprint_access_methods_enum_logging(entnm, attrnm, funcnm, file, false);
-    fprintf(file, "    return (const %s) _%s;\n}\n", 
EnumName(TYPEget_name(t)), attrnm);
+    fprintf(file, "    return (%s) _%s;\n}\n", EnumName(TYPEget_name(t)), 
attrnm);
 
     ATTRprint_access_methods_put_head(entnm, a, file);
     fprintf(file, "{\n");
@@ -442,7 +442,7 @@
 {
     fprintf(file, "const {\n");
     ATTRprint_access_methods_log_bool_logging(entnm, attrnm, funcnm, file, 
false);
-    fprintf(file, "    return (const %s) _%s;\n}\n", ctype, attrnm);
+    fprintf(file, "    return (%s) _%s;\n}\n", ctype, attrnm);
 
     /* don't need a const method for logical or boolean
      * ATTRprint_access_methods_get_head( entnm, a, file, true );
@@ -554,7 +554,7 @@
     if(classType == select_)  {
         fprintf(file, " {\n    return &_%s;\n}\n", attrnm);
         ATTRprint_access_methods_get_head(entnm, a, file, true);
-        fprintf(file, "const {\n    return (const %s) &_%s;\n}\n",  ctype, 
attrnm);
+        fprintf(file, "const {\n    return (%s) &_%s;\n}\n",  ctype, attrnm);
         ATTRprint_access_methods_put_head(entnm, a, file);
         fprintf(file, " {\n    _%s = x;\n}\n", attrnm);
         return;
@@ -588,7 +588,7 @@
         }
         /*  default:  INTEGER   */
         /*  is the same type as the data member  */
-        fprintf(file, "    return (const %s) _%s;\n}\n", ctype, attrnm);
+        fprintf(file, "    return (%s) _%s;\n}\n", ctype, attrnm);
         ATTRprint_access_methods_put_head(entnm, a, file);
         fprintf(file, "{\n");
         if(print_logging) {

Modified: brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_misc.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_misc.c      
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_misc.c      
2020-12-15 14:26:46 UTC (rev 77966)
@@ -4,7 +4,6 @@
 #include "classes.h"
 
 #include <sc_trace_fprintf.h>
-#include "sc_version_string.h"
 #include "class_strings.h"
 
 /** \file classes_misc.c
@@ -45,7 +44,7 @@
     fprintf(file, "#ifndef  %s\n", fn);
     fprintf(file, "#define  %s\n\n", fn);
 
-    fprintf(file, "// This file was generated by exp2cxx,\n// %s.\n", 
sc_version);
+    fprintf(file, "// This file was generated by exp2cxx,\n// %s.\n", 
SC_VERSION);
     fprintf(file, "// You probably don't want to edit it since your 
modifications\n");
     fprintf(file, "// will be lost if exp2cxx is used to regenerate it.\n\n");
     return (file);

Modified: brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_type.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_type.c      
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_type.c      
2020-12-15 14:26:46 UTC (rev 77966)
@@ -124,7 +124,7 @@
     } else {
         strcpy(b, s);
         strcat(b, "_");
-        fprintf(stderr, "Warning in %s: the enumerated value %s is already 
being used and has been changed to %s\n", __FUNCTION__, s, b);
+        fprintf(stderr, "Warning in %s: the enumerated value %s is already 
being used and has been changed to %s\n", __func__, s, b);
         return (b);
     }
 }
@@ -1313,7 +1313,7 @@
 
     /*  default returns undefined   */
 
-    fprintf(stderr, "Warning in %s: type %s is undefined\n", __FUNCTION__, 
TYPEget_name(t));
+    fprintf(stderr, "Warning in %s: type %s is undefined\n", __func__, 
TYPEget_name(t));
     return ("SCLundefined");
 
 }

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_wrapper.cc
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_wrapper.cc  
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/classes_wrapper.cc  
2020-12-15 14:26:46 UTC (rev 77966)
@@ -405,6 +405,7 @@
  ******************************************************************/
 void SCHEMAprint(Schema schema, FILES *files, void *complexCol, int suffix)
 {
+    int ocnt = 0;
     char schnm[MAX_LEN], sufnm[MAX_LEN], fnm[MAX_LEN], *np;
     /* sufnm = schema name + suffix */
     FILE *libfile,
@@ -422,11 +423,20 @@
     /*  1.  header file             */
     sprintf(schnm, "%s%s", SCHEMA_FILE_PREFIX, 
StrToUpper(SCHEMAget_name(schema)));       //TODO change file names to 
CamelCase?
     if(suffix == 0) {
-        sprintf(sufnm, "%s", schnm);
+        ocnt = snprintf(sufnm, MAX_LEN, "%s", schnm);
+       if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper.cc line 425 - sufnm not 
large enough to hold schnm\n";
+       }
     } else {
-        sprintf(sufnm, "%s_%d", schnm, suffix);
+        ocnt = snprintf(sufnm, MAX_LEN, "%s_%d", schnm, suffix);
+       if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper.cc line 430 - sufnm not 
large enough to hold string\n";
+       }
     }
-    sprintf(fnm, "%s.h", sufnm);
+    ocnt = snprintf(fnm, MAX_LEN, "%s.h", sufnm);
+    if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper.cc line 436 - sufnm not 
large enough to hold string\n";
+    }
 
     if(!(incfile = (files -> inc) = FILEcreate(fnm))) {
         return;
@@ -467,7 +477,11 @@
     fprintf(libfile, "\n#include \"%s.h\"\n", schnm);
 
     // 3. header for namespace to contain all formerly-global variables
-    sprintf(fnm, "%sNames.h", schnm);
+    ocnt = snprintf(fnm, MAX_LEN, "%sNames.h", schnm);
+    if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper.cc line 480 - fnm not large 
enough to hold schnm\n";
+    }
+
     if(!(files->names = FILEcreate(fnm))) {
         return;
     }
@@ -482,7 +496,11 @@
 
     if(suffix <= 1) {
         /* I.e., if this is our first pass with schema */
-        sprintf(fnm, "%s.init.cc", schnm);
+        ocnt = snprintf(fnm, MAX_LEN, "%s.init.cc", schnm);
+       if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper.cc line 499 - fnm not large 
enough to hold string\n";
+       }
+
         /* Note - We use schnm (without the "_x" suffix sufnm has) since we
         ** only generate a single init.cc file. */
         if(!(initfile = (files -> init) = FILEcreate(fnm))) {
@@ -545,8 +563,12 @@
         fprintf(files->classes, "\n#include \"%sNames.h\"\n", schnm);
     } else {
         /* Just reopen the .init.cc (in append mode): */
-        sprintf(fnm, "%s.init.cc", schnm);
-        initfile = files->init = fopen(fnm, "a");
+       ocnt = snprintf(fnm, MAX_LEN, "%s.init.cc", schnm);
+       if (ocnt > MAX_LEN) {
+               std::cerr << "Warning - classes_wrapper.cc line 558 - sufnm not 
large enough to hold string\n";
+       }
+
+       initfile = files->init = fopen(fnm, "a");
     }
 
     /**********  record in files relating to entire input   ***********/

Modified: brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/selects.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/selects.c   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exp2cxx/selects.c   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -1113,6 +1113,9 @@
 
             /*   get methods  */
             TYPEselect_lib_part_three_getter(type, classnm, attrnm, utype, 
uent, funcnm, items, a, uattr, ent, f, false);
+           /* TODO - This isn't good enough - the compiler warning 
Wignored-qualifiers is picking up
+            * a lot of spurious const expressions coming from these outputs. 
Not sure of the pattern
+            * yet, but it looks like not all attrIsObj entities should be 
using it. */
             if(attrIsObj(VARget_type(a))) {
                 TYPEselect_lib_part_three_getter(type, classnm, attrnm, utype, 
uent, funcnm, items, a, uattr, ent, f, true);
             }

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_misc_python.c
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_misc_python.c
        2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_misc_python.c
        2020-12-15 14:26:46 UTC (rev 77966)
@@ -1,5 +1,7 @@
 #define CLASSES_MISC_C
+#define _POSIX_C_SOURCE 200809L /* for strdup */
 #include <stdlib.h>
+#include <string.h>
 #include "classes.h"
 /*******************************************************************
 ** FedEx parser output module for generating C++  class definitions

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_python.c
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_python.c 
    2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_python.c 
    2020-12-15 14:26:46 UTC (rev 77966)
@@ -24,8 +24,10 @@
 /* this is used to add new dictionary calls */
 /* #define NEWDICT */
 
+#define _POSIX_C_SOURCE 200809L /* for strdup */
 #include <stdlib.h>
 #include <errno.h>
+#include <string.h>
 
 #include "sc_memmgr.h"
 #include "classes.h"
@@ -386,7 +388,7 @@
 
     buf = (char *)sc_malloc(bufsize);
     if(!buf) {
-        fprintf(stderr, "%s failed to allocate buffer: %s\n", __FUNCTION__, 
strerror(errno));
+        fprintf(stderr, "%s failed to allocate buffer: %s\n", __func__, 
strerror(errno));
         abort();
     }
 
@@ -483,7 +485,7 @@
 
     temp = (char *)sc_realloc(buf, 1 + strlen(buf));
     if(temp == 0) {
-        fprintf(stderr, "%s failed to realloc buffer: %s\n", __FUNCTION__, 
strerror(errno));
+        fprintf(stderr, "%s failed to realloc buffer: %s\n", __func__, 
strerror(errno));
         abort();
     }
 

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_wrapper_python.cc
===================================================================
--- 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_wrapper_python.cc
    2020-12-11 19:14:05 UTC (rev 77965)
+++ 
brlcad/branches/stepsync/src/other/stepcode/src/exp2python/src/classes_wrapper_python.cc
    2020-12-15 14:26:46 UTC (rev 77966)
@@ -153,6 +153,7 @@
 
 void SCHEMAprint(Schema schema, FILES *files, int suffix)
 {
+    int ocnt = 0;
     char schnm[MAX_LEN], sufnm[MAX_LEN], fnm[MAX_LEN], *np;
     /* sufnm = schema name + suffix */
     FILE *libfile;
@@ -163,9 +164,15 @@
     if(suffix == 0) {
         sprintf(sufnm, "%s", schnm);
     } else {
-        sprintf(sufnm, "%s_%d", schnm, suffix);
+        ocnt = snprintf(sufnm, MAX_LEN, "%s_%d", schnm, suffix);
+       if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper_python.cc - sufnm not large 
enough to hold string\n";
+       }
     }
-    sprintf(fnm, "%s.h", sufnm);
+    ocnt = snprintf(fnm, MAX_LEN, "%s.h", sufnm);
+    if (ocnt > MAX_LEN) {
+           std::cerr << "Warning - classes_wrapper_python.cc - fnm not large 
enough to hold string\n";
+    }
 
     np = fnm + strlen(fnm) - 1;   /*  point to end of constant part of string  
*/
 

Modified: brlcad/branches/stepsync/src/other/stepcode/src/exppp/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exppp/CMakeLists.txt        
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exppp/CMakeLists.txt        
2020-12-15 14:26:46 UTC (rev 77966)
@@ -30,7 +30,7 @@
   ${SC_SOURCE_DIR}/src/express
  )
 
-if($CACHE{SC_BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
   SC_ADDLIB(libexppp SHARED SOURCES ${LIBEXPPP_SOURCES} LINK_LIBRARIES express 
base)
   set_target_properties(libexppp PROPERTIES PREFIX "")
   if(WIN32)
@@ -38,7 +38,7 @@
   endif()
 endif()
 
-if($CACHE{SC_BUILD_STATIC_LIBS})
+if(BUILD_STATIC_LIBS)
   SC_ADDLIB(libexppp-static STATIC SOURCES ${LIBEXPPP_SOURCES} LINK_LIBRARIES 
express-static base-static)
   set_target_properties(libexppp-static PROPERTIES PREFIX "")
 endif()

Modified: brlcad/branches/stepsync/src/other/stepcode/src/exppp/pretty_schema.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/exppp/pretty_schema.c       
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/exppp/pretty_schema.c       
2020-12-15 14:26:46 UTC (rev 77966)
@@ -5,7 +5,6 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <sc_version_string.h>
 #include <express/express.h>
 
 #include <exppp/exppp.h>
@@ -109,7 +108,7 @@
     for(hp = expheader; *hp; hp++) {
         if((**hp == '\0') && (**(hp + 1) == '\0')) {
             /* if this and the next lines are blank, put version string on 
this line */
-            raw("%s\n", sc_version);
+            raw("%s\n", SC_VERSION);
         } else {
             raw("%s\n", *hp);
         }

Modified: brlcad/branches/stepsync/src/other/stepcode/src/express/expr.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/expr.c      
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/expr.c      
2020-12-15 14:26:46 UTC (rev 77966)
@@ -238,7 +238,9 @@
                 *e = item;
                 *dt = DICT_type;
                 return 1;
-            }
+            } else {
+               return 0;
+           }
         default:
             return 0;
     }
@@ -325,8 +327,8 @@
                     } else {
                         fprintf(stderr, "EXPresolved_op_dot: attribute not an 
attribute?\n");
                         ERRORabort(0);
-                    }
-
+                       return(Type_Bad);
+                   }
                 default:
                     /* compile-time ambiguous */
                     if(where) {
@@ -613,11 +615,11 @@
 {
     int failed = 0;
 
-    switch(OPget_number_of_operands(e->e.op_code)) {
-        case 3:
+    if (OPget_number_of_operands(e->e.op_code) == 3) {
             EXPresolve(e->e.op3, s, Type_Dont_Care);
             failed = is_resolve_failed(e->e.op3);
-        case 2:
+    }
+    if (OPget_number_of_operands(e->e.op_code) == 2) {
             EXPresolve(e->e.op2, s, Type_Dont_Care);
             failed |= is_resolve_failed(e->e.op2);
     }

Modified: brlcad/branches/stepsync/src/other/stepcode/src/express/expscan.l
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/expscan.l   
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/expscan.l   
2020-12-15 14:26:46 UTC (rev 77966)
@@ -118,6 +118,11 @@
 #define MAX_NESTED_COMMENTS 20
 static struct Symbol_ open_comment[MAX_NESTED_COMMENTS];
 
+/* isascii isn't part of newer C standards */
+#ifndef isascii
+#  define isascii(c) ((unsigned)((c) + 1) < 129)
+#endif
+
 static_inline
 int
 SCANnextchar(char* buffer)

Modified: brlcad/branches/stepsync/src/other/stepcode/src/express/fedex.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/fedex.c     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/fedex.c     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -77,7 +77,6 @@
 #include "sc_cf.h"
 #include "sc_memmgr.h"
 #include "sc_export.h"
-#include "sc_version_string.h"
 #include "sc_getopt.h"
 #include "express/error.h"
 #include "express/express.h"
@@ -93,7 +92,7 @@
 
 void print_fedex_version(void)
 {
-    fprintf(stderr, "Build info for %s: 
%s\nhttp://github.com/stepcode/stepcode and scl-dev on google groups\n", 
EXPRESSprogram_name, sc_version);
+    fprintf(stderr, "Build info for %s: 
%s\nhttp://github.com/stepcode/stepcode and scl-dev on google groups\n", 
EXPRESSprogram_name, SC_VERSION);
     no_need_to_work = 1;
 }
 

Modified: 
brlcad/branches/stepsync/src/other/stepcode/src/express/generated/expscan.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/generated/expscan.c 
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/generated/expscan.c 
2020-12-15 14:26:46 UTC (rev 77966)
@@ -112,6 +112,10 @@
 /* can't imagine this will ever be more than 2 or 3 - DEL */
 #define MAX_NESTED_COMMENTS 20
 static struct Symbol_ open_comment[MAX_NESTED_COMMENTS];
+/* isascii isn't part of newer C standards */
+#ifndef isascii
+#  define isascii(c) ((unsigned)((c) + 1) < 129)
+#endif
 static_inline
 int
 SCANnextchar(char *buffer)

Modified: brlcad/branches/stepsync/src/other/stepcode/src/express/info.c
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/info.c      
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/info.c      
2020-12-15 14:26:46 UTC (rev 77966)
@@ -4,14 +4,6 @@
 #include "express/info.h"
 #include "express/express.h"
 
-#ifndef SCHEMA_SCANNER
-#  include "sc_version_string.h"
-#else
-/* dummy string to make the compiler happy when building the schema scanner,
- * should never be seen by users */
-const char *sc_version = "ERROR: version unknown / SCHEMA_SCANNER defined in 
libexpress!";
-#endif
-
 char *EXPRESSversion(void)
 {
     return("Express Language, IS (N65), October 24, 1994");
@@ -21,7 +13,7 @@
 {
     fprintf(stderr, "usage: %s [-v] [-d #] [-p <object_type>] {-w|-i 
<warning>} express_file\n", EXPRESSprogram_name);
     fprintf(stderr, "where\t-v produces the following version description:\n");
-    fprintf(stderr, "Build info for %s: 
%s\nhttp://github.com/stepcode/stepcode\n";, EXPRESSprogram_name, sc_version);
+    fprintf(stderr, "Build info for %s: 
%s\nhttp://github.com/stepcode/stepcode\n";, EXPRESSprogram_name, SC_VERSION);
     fprintf(stderr, "\t-d turns on debugging (\"-d 0\" describes this 
further\n");
     fprintf(stderr, "\t-p turns on printing when processing certain objects 
(see below)\n");
     fprintf(stderr, "\t-w warning enable\n");
@@ -28,7 +20,7 @@
     fprintf(stderr, "\t-i warning ignore\n");
     fprintf(stderr, "and <warning> is one of:\n");
     fprintf(stderr, "\tnone\n\tall\n");
-    fprintf(stderr, ERRORget_warnings_help("\t", "\n"));
+    fprintf(stderr, "%s", ERRORget_warnings_help("\t", "\n"));
     fprintf(stderr, "and <object_type> is one or more of:\n");
     fprintf(stderr, "  e   entity\n");
     fprintf(stderr, "  p   procedure\n");

Modified: brlcad/branches/stepsync/src/other/stepcode/src/express/stack.h
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/src/express/stack.h     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/src/express/stack.h     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -75,12 +75,4 @@
 /* function prototypes */
 /***********************/
 
-/*******************************/
-/* inline function definitions */
-/*******************************/
-
-#if supports_inline_functions || defined(STACK_C)
-
-#endif /* supports_inline_functions || defined(STACK_C) */
-
 #endif    /*  STACK_H  */

Modified: brlcad/branches/stepsync/src/other/stepcode/test/CMakeLists.txt
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode/test/CMakeLists.txt     
2020-12-11 19:14:05 UTC (rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode/test/CMakeLists.txt     
2020-12-15 14:26:46 UTC (rev 77966)
@@ -13,10 +13,8 @@
   endif( UNITARY_SCHEMA MATCHES "fail_.*" )
 endforeach(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
 
-if(NOT ${SC_BUILD_EXPRESS_ONLY})
-  add_subdirectory(p21)
-  add_subdirectory(cpp)
-endif()
+add_subdirectory(p21)
+add_subdirectory(cpp)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/stepsync/src/other/stepcode.dist
===================================================================
--- brlcad/branches/stepsync/src/other/stepcode.dist    2020-12-11 19:14:05 UTC 
(rev 77965)
+++ brlcad/branches/stepsync/src/other/stepcode.dist    2020-12-15 14:26:46 UTC 
(rev 77966)
@@ -9,12 +9,10 @@
 INTENT.md
 NEWS
 README.md
-SC_VERSION.txt
 cmake/FindLEMON.cmake
 cmake/FindPERPLEX.cmake
 cmake/FindRE2C.cmake
-cmake/Generated_Source_Utils.cmake
-cmake/SC_Build_opts.cmake
+cmake/Path_Setup.cmake
 cmake/SC_CXX_schema_macros.cmake
 cmake/SC_Config_Headers.cmake
 cmake/SC_Locale.cmake
@@ -208,7 +206,6 @@
 src/base/sc_memmgr.h
 src/base/sc_mkdir.c
 src/base/sc_mkdir.h
-src/base/sc_nullptr.h
 src/base/sc_stdio.h
 src/base/sc_strtoull.h
 src/base/sc_trace_fprintf.c

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