Revision: 77773
http://sourceforge.net/p/brlcad/code/77773
Author: starseeker
Date: 2020-11-20 22:38:53 +0000 (Fri, 20 Nov 2020)
Log Message:
-----------
Merge from trunk - r77303 through r77772
Modified Paths:
--------------
brlcad/branches/swrast/AUTHORS
brlcad/branches/swrast/BUGS
brlcad/branches/swrast/CHANGES
brlcad/branches/swrast/CMakeLists.txt
brlcad/branches/swrast/INSTALL
brlcad/branches/swrast/NEWS
brlcad/branches/swrast/TODO
brlcad/branches/swrast/bench/CMakeLists.txt
brlcad/branches/swrast/bench/pixcmp.c
brlcad/branches/swrast/bench/run.sh
brlcad/branches/swrast/configure
brlcad/branches/swrast/db/CMakeLists.txt
brlcad/branches/swrast/doc/BRL-CAD.bib
brlcad/branches/swrast/doc/CMakeLists.txt
brlcad/branches/swrast/doc/README.Windows
brlcad/branches/swrast/doc/docbook/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/articles/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/articles/mged.xml
brlcad/branches/swrast/doc/docbook/books/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/devguides/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/lessons/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/presentations/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/resources/brlcad/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/specifications/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/system/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/system/man1/pixcmp.xml
brlcad/branches/swrast/doc/docbook/system/man5/CMakeLists.txt
brlcad/branches/swrast/doc/docbook/system/mann/search.xml
brlcad/branches/swrast/doc/legal/embedded/CMakeLists.txt
brlcad/branches/swrast/doc/legal/embedded/SPSR.txt
brlcad/branches/swrast/doc/legal/other/CMakeLists.txt
brlcad/branches/swrast/doc/notes/c_cxx_patterns/CMakeLists.txt
brlcad/branches/swrast/include/analyze/info.h
brlcad/branches/swrast/include/bio.h
brlcad/branches/swrast/include/bn/plot3.h
brlcad/branches/swrast/include/brep/defines.h
brlcad/branches/swrast/include/bu/file.h
brlcad/branches/swrast/include/rt/db_internal.h
brlcad/branches/swrast/include/rt/geom.h
brlcad/branches/swrast/include/tclcad.h
brlcad/branches/swrast/include/wdb.h
brlcad/branches/swrast/misc/CMake/BRLCAD_Targets.cmake
brlcad/branches/swrast/misc/CMake/BRLCAD_Util.cmake
brlcad/branches/swrast/misc/CMake/CMakeLists.txt
brlcad/branches/swrast/misc/CMake/CompilerFlags.cmake
brlcad/branches/swrast/misc/CMake/Distcheck.cmake
brlcad/branches/swrast/misc/CMake/DocBook.cmake
brlcad/branches/swrast/misc/CMake/FindGL.cmake
brlcad/branches/swrast/misc/CMake/FindX11.cmake
brlcad/branches/swrast/misc/CMake/RPath_Setup.cmake
brlcad/branches/swrast/misc/CMake/ThirdParty_TCL.cmake
brlcad/branches/swrast/misc/CMakeLists.txt
brlcad/branches/swrast/misc/pkgconfig/CMakeLists.txt
brlcad/branches/swrast/misc/repoconv/checkout_dercs.sh
brlcad/branches/swrast/misc/repoconv/github_ci_actions.yml
brlcad/branches/swrast/misc/tools/astyle/CMakeLists.txt
brlcad/branches/swrast/misc/tools/debug2c/CMakeLists.txt
brlcad/branches/swrast/misc/tools/dom2dox/CMakeLists.txt
brlcad/branches/swrast/misc/tools/env2c/CMakeLists.txt
brlcad/branches/swrast/misc/tools/lemon/CMakeLists.txt
brlcad/branches/swrast/misc/tools/perplex/CMakeLists.txt
brlcad/branches/swrast/misc/tools/re2c/CMakeLists.txt
brlcad/branches/swrast/misc/tools/xmltools/CMakeLists.txt
brlcad/branches/swrast/misc/tools/xmltools/libexslt/CMakeLists.txt
brlcad/branches/swrast/misc/tools/xmltools/libxml/CMakeLists.txt
brlcad/branches/swrast/misc/tools/xmltools/libxslt/CMakeLists.txt
brlcad/branches/swrast/misc/win32-msvc/Dll/CMakeLists.txt
brlcad/branches/swrast/regress/CMakeLists.txt
brlcad/branches/swrast/regress/asc/CMakeLists.txt
brlcad/branches/swrast/regress/bots/CMakeLists.txt
brlcad/branches/swrast/regress/comgeom/CMakeLists.txt
brlcad/branches/swrast/regress/coverage/CMakeLists.txt
brlcad/branches/swrast/regress/dsp/CMakeLists.txt
brlcad/branches/swrast/regress/fuzz/CMakeLists.txt
brlcad/branches/swrast/regress/gqa/CMakeLists.txt
brlcad/branches/swrast/regress/icv/CMakeLists.txt
brlcad/branches/swrast/regress/iges/CMakeLists.txt
brlcad/branches/swrast/regress/lights/CMakeLists.txt
brlcad/branches/swrast/regress/mged/CMakeLists.txt
brlcad/branches/swrast/regress/moss/CMakeLists.txt
brlcad/branches/swrast/regress/nirt/CMakeLists.txt
brlcad/branches/swrast/regress/nurbs/CMakeLists.txt
brlcad/branches/swrast/regress/pkg/CMakeLists.txt
brlcad/branches/swrast/regress/red/CMakeLists.txt
brlcad/branches/swrast/regress/repository/CMakeLists.txt
brlcad/branches/swrast/regress/repository/repocheck.cpp
brlcad/branches/swrast/regress/rtedge/CMakeLists.txt
brlcad/branches/swrast/regress/shaders/CMakeLists.txt
brlcad/branches/swrast/regress/solids/CMakeLists.txt
brlcad/branches/swrast/regress/spdi/CMakeLists.txt
brlcad/branches/swrast/regress/weight/CMakeLists.txt
brlcad/branches/swrast/src/art/CMakeLists.txt
brlcad/branches/swrast/src/art/art.cpp
brlcad/branches/swrast/src/art/art.h
brlcad/branches/swrast/src/art/brlcadplugin.cpp
brlcad/branches/swrast/src/conv/asc/asc2g.c
brlcad/branches/swrast/src/conv/step/step-g/OpenNurbsInterfaces.cpp
brlcad/branches/swrast/src/external/Creo/CMakeLists.txt
brlcad/branches/swrast/src/external/Cubit/CMakeLists.txt
brlcad/branches/swrast/src/external/Unigraphics/CMakeLists.txt
brlcad/branches/swrast/src/fb/CMakeLists.txt
brlcad/branches/swrast/src/gtools/tests/CMakeLists.txt
brlcad/branches/swrast/src/gtools/tests/bigdb.c
brlcad/branches/swrast/src/libanalyze/tests/CMakeLists.txt
brlcad/branches/swrast/src/libbg/CMakeLists.txt
brlcad/branches/swrast/src/libbg/spsr.c
brlcad/branches/swrast/src/libbg/tests/CMakeLists.txt
brlcad/branches/swrast/src/libbn/axis.c
brlcad/branches/swrast/src/libbn/mat.c
brlcad/branches/swrast/src/libbn/plot3.c
brlcad/branches/swrast/src/libbn/tests/CMakeLists.txt
brlcad/branches/swrast/src/libbrep/CMakeLists.txt
brlcad/branches/swrast/src/libbrep/tests/CMakeLists.txt
brlcad/branches/swrast/src/libbu/CMakeLists.txt
brlcad/branches/swrast/src/libbu/file.c
brlcad/branches/swrast/src/libbu/mappedfile.c
brlcad/branches/swrast/src/libbu/tests/CMakeLists.txt
brlcad/branches/swrast/src/libbu/tests/dylib/CMakeLists.txt
brlcad/branches/swrast/src/libdm/dm_plugins.cpp
brlcad/branches/swrast/src/libdm/wgl/dm-wgl.c
brlcad/branches/swrast/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
brlcad/branches/swrast/src/libgcv/plugins/vol/CMakeLists.txt
brlcad/branches/swrast/src/libgcv/tests/CMakeLists.txt
brlcad/branches/swrast/src/libged/brep/CMakeLists.txt
brlcad/branches/swrast/src/libged/brep/dplot_reader.c
brlcad/branches/swrast/src/libged/brep/dplot_reader.h
brlcad/branches/swrast/src/libged/exec.cpp
brlcad/branches/swrast/src/libged/ged_init.cpp
brlcad/branches/swrast/src/libged/gqa/CMakeLists.txt
brlcad/branches/swrast/src/libged/move_all/move_all.c
brlcad/branches/swrast/src/libged/overlay/overlay.c
brlcad/branches/swrast/src/libged/search/search.c
brlcad/branches/swrast/src/libged/simulate/tests/CMakeLists.txt
brlcad/branches/swrast/src/libged/tests/CMakeLists.txt
brlcad/branches/swrast/src/libged/tests/plugins.cpp
brlcad/branches/swrast/src/libged/typein/typein.c
brlcad/branches/swrast/src/libnmg/tests/CMakeLists.txt
brlcad/branches/swrast/src/liboptical/material.c
brlcad/branches/swrast/src/liboptical/sh_xxx.c
brlcad/branches/swrast/src/librt/CMakeLists.txt
brlcad/branches/swrast/src/librt/db5_io.c
brlcad/branches/swrast/src/librt/db_fullpath.c
brlcad/branches/swrast/src/librt/db_open.c
brlcad/branches/swrast/src/librt/dir.c
brlcad/branches/swrast/src/librt/primitives/bot/bot.c
brlcad/branches/swrast/src/librt/primitives/vol/vol.c
brlcad/branches/swrast/src/librt/search.c
brlcad/branches/swrast/src/librt/tests/CMakeLists.txt
brlcad/branches/swrast/src/libtclcad/CMakeLists.txt
brlcad/branches/swrast/src/libtclcad/auto_path.c
brlcad/branches/swrast/src/libtclcad/commands.c
brlcad/branches/swrast/src/libtclcad/init.c
brlcad/branches/swrast/src/libwdb/vol.c
brlcad/branches/swrast/src/mged/attach.c
brlcad/branches/swrast/src/mged/edsol.c
brlcad/branches/swrast/src/mged/mged.c
brlcad/branches/swrast/src/other/CMakeLists.txt
brlcad/branches/swrast/src/other/gct/CMakeLists.txt
brlcad/branches/swrast/src/other/gdal/CMakeLists.txt
brlcad/branches/swrast/src/other/itcl3/CMakeLists.txt
brlcad/branches/swrast/src/other/itk3/CMakeLists.txt
brlcad/branches/swrast/src/other/iwidgets/CMakeLists.txt
brlcad/branches/swrast/src/other/libbson/CMakeLists.txt
brlcad/branches/swrast/src/other/libnetpbm/CMakeLists.txt
brlcad/branches/swrast/src/other/libpng/CMakeLists.txt
brlcad/branches/swrast/src/other/libregex/CMakeLists.txt
brlcad/branches/swrast/src/other/libutahrle/CMakeLists.txt
brlcad/branches/swrast/src/other/libz/CMakeLists.txt
brlcad/branches/swrast/src/other/openNURBS/CMakeLists.txt
brlcad/branches/swrast/src/other/openscenegraph/CMakeLists.txt
brlcad/branches/swrast/src/other/poly2tri/CMakeLists.txt
brlcad/branches/swrast/src/other/proj-4/CMakeLists.txt
brlcad/branches/swrast/src/other/proj-4/src/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/src/base/judy/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/test/cpp/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/test/cpp/schema_specific/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/test/cpp/stepcore/CMakeLists.txt
brlcad/branches/swrast/src/other/stepcode/test/p21/CMakeLists.txt
brlcad/branches/swrast/src/other/tcl/CMakeLists.txt
brlcad/branches/swrast/src/other/tk/CMakeLists.txt
brlcad/branches/swrast/src/other/tkhtml/CMakeLists.txt
brlcad/branches/swrast/src/other/tktable/CMakeLists.txt
brlcad/branches/swrast/src/rt/CMakeLists.txt
brlcad/branches/swrast/src/rtwizard/CMakeLists.txt
brlcad/branches/swrast/src/tclscripts/checker/OverlapFileTool.tcl
brlcad/branches/swrast/src/tclscripts/mged/bindings.tcl
brlcad/branches/swrast/src/util/pixdiff.c
Added Paths:
-----------
brlcad/branches/swrast/db/radialgrid.asc
brlcad/branches/swrast/doc/legal/embedded/gdiam.txt
brlcad/branches/swrast/doc/legal/embedded/vds.txt
brlcad/branches/swrast/misc/CMake/date_delta.cpp
brlcad/branches/swrast/misc/CMake/scripts/
brlcad/branches/swrast/src/libbg/spsr/
brlcad/branches/swrast/src/libbn/tests/invalid.plot3
brlcad/branches/swrast/src/libbn/tests/plot3.c
brlcad/branches/swrast/src/libbn/tests/valid.plot3
brlcad/branches/swrast/src/libged/gqa/gqa.cpp
brlcad/branches/swrast/src/librt/gdiam/
brlcad/branches/swrast/src/librt/vds/
brlcad/branches/swrast/src/libtclcad/command_io.cpp
Removed Paths:
-------------
brlcad/branches/swrast/doc/legal/other/libgdiam.txt
brlcad/branches/swrast/doc/legal/other/libvds.txt
brlcad/branches/swrast/misc/CMake/FindVDS.cmake
brlcad/branches/swrast/misc/external_build_testing/
brlcad/branches/swrast/src/libged/gqa/gqa.c
brlcad/branches/swrast/src/other/libgdiam/
brlcad/branches/swrast/src/other/libgdiam.dist
brlcad/branches/swrast/src/other/libspsr/
brlcad/branches/swrast/src/other/libspsr.dist
brlcad/branches/swrast/src/other/libvds/
brlcad/branches/swrast/src/other/libvds.dist
Property Changed:
----------------
brlcad/branches/swrast/
brlcad/branches/swrast/CHANGES
brlcad/branches/swrast/NEWS
brlcad/branches/swrast/bench/
brlcad/branches/swrast/db/
brlcad/branches/swrast/doc/
brlcad/branches/swrast/doc/docbook/articles/
brlcad/branches/swrast/doc/docbook/books/
brlcad/branches/swrast/doc/docbook/lessons/
brlcad/branches/swrast/include/
brlcad/branches/swrast/regress/
brlcad/branches/swrast/src/libbu/
brlcad/branches/swrast/src/other/
brlcad/branches/swrast/src/other/gdal/
brlcad/branches/swrast/src/other/libnetpbm/
brlcad/branches/swrast/src/other/libregex/
brlcad/branches/swrast/src/other/libutahrle/
brlcad/branches/swrast/src/other/libz/
brlcad/branches/swrast/src/other/poly2tri/
brlcad/branches/swrast/src/other/proj-4/
brlcad/branches/swrast/src/other/stepcode/
Index: brlcad/branches/swrast
===================================================================
--- brlcad/branches/swrast 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast 2020-11-20 22:38:53 UTC (rev 77773)
Property changes on: brlcad/branches/swrast
___________________________________________________________________
Modified: svn:mergeinfo
## -11,4 +11,4 ##
/brlcad/branches/osg:62110-62113
/brlcad/branches/prep-cache:68236-68933
/brlcad/branches/tcltk86:68300-75257
-/brlcad/trunk:76973-77302
\ No newline at end of property
+/brlcad/trunk:76973-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/AUTHORS
===================================================================
--- brlcad/branches/swrast/AUTHORS 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/AUTHORS 2020-11-20 22:38:53 UTC (rev 77773)
@@ -913,7 +913,12 @@
2020 May
Open Source
+Atreya, Vikram
+nicknames vikram-atreya
+2020 October
+Open Source
+
SPECIAL THANKS
--------------
Modified: brlcad/branches/swrast/BUGS
===================================================================
--- brlcad/branches/swrast/BUGS 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/BUGS 2020-11-20 22:38:53 UTC (rev 77773)
@@ -15,6 +15,9 @@
Recent Bugs
-----------
+* gqa command is generating invalid plot3 files in multithreaded
+ mode.
+
* fbclear -c appears to hang indefinitely inside pkg_bwaitfor,
possible protocol mismatch or capability removed/changed in fbserv.
Modified: brlcad/branches/swrast/CHANGES
===================================================================
--- brlcad/branches/swrast/CHANGES 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/CHANGES 2020-11-20 22:38:53 UTC (rev 77773)
@@ -1551,3 +1551,6 @@
----
s/facetall.sh/mged -c facetize/g
replaced by more improved facetize command [7.30]
+s/pixcmp -s/pixcmp -q/g
+s/pixcmp -l/pixcmp -d/g
+ changed pixcmp options for consistency with new options [7.32]
Property changes on: brlcad/branches/swrast/CHANGES
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/brlcad/branches/RELEASE/CHANGES:70323-70333,71915-72242,72525-72534,72826-72858,74376-74454,74964-75140
/brlcad/branches/brep-debug/CHANGES:69168,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
/brlcad/branches/dm-fb-merge/CHANGES:75426-76198
-/brlcad/trunk/CHANGES:76973-77083
\ No newline at end of property
+/brlcad/trunk/CHANGES:76973-77083,77303-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/CMakeLists.txt 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/CMakeLists.txt 2020-11-20 22:38:53 UTC (rev
77773)
@@ -79,7 +79,7 @@
# BRL-CAD software package.
# Minimum required version of CMake
-cmake_minimum_required(VERSION 3.1.3)
+cmake_minimum_required(VERSION 3.12)
# set CMake project name
project(BRLCAD)
@@ -146,35 +146,15 @@
#---------------------------------------------------------------------
# Set up the necessary support for timing of the configuration and
# build processes
-set_config_time()
-generate_sstamp()
+string(TIMESTAMP CONFIG_DATE "%Y%m%d")
+string(TIMESTAMP CONFIG_DATESTAMP "%a, %d %b %Y %H:%M:%S UTC" UTC)
#---------------------------------------------------------------------
# Mark the time at which the configuration process began.
+
set(CONFIG_DELTA_START "${CMAKE_BINARY_DIR}/CMakeTmp/CONFIG_DELTA_START")
-execute_process(COMMAND "${CMAKE_BINARY_DIR}/CMakeTmp/sstamp${EXE_EXT}"
"${CONFIG_DELTA_START}")
+execute_process(COMMAND "${CMAKE_COMMAND}" -DSTAMP_FILE=${CONFIG_DELTA_START}
-P "${BRLCAD_CMAKE_DIR}/scripts/timestamp.cmake")
-#------------------------------------------------------------------------------
-# The SuperBuild (https://blog.kitware.com/cmake-superbuilds-git-submodules/)
-# pattern requires a differentiation between the CMake installation prefix used
-# for the build and the specification of the ultimate installation location
-# used for the superbuild's install. Any hard-coded knowledge of the final
-# path backed into BRL-CAD must use the superbuild's final destination, not the
-# intermediate build-directory installation used by the superbuild.
-#
-# For the moment we are not using superbuild, but we will ultimately need to
-# move to that approach to manage increasingly complex dependencies. To allow
-# the code to work seamlessly with both variables, make them match unless both
-# are explicitly set in advance.
-if (DEFINED BRLCAD_INSTALL_PREFIX)
- if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT DEFINED
CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "${BRLCAD_INSTALL_PREFIX}")
- endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT DEFINED
CMAKE_INSTALL_PREFIX)
-endif (DEFINED BRLCAD_INSTALL_PREFIX)
-if (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED BRLCAD_INSTALL_PREFIX)
- set(BRLCAD_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-endif (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED BRLCAD_INSTALL_PREFIX)
-
#---------------------------------------------------------------------
# Allow the BRLCAD_ROOT environment variable to set during build, but be noisy
# about it unless we're specifically told this is intentional. Having this
@@ -188,16 +168,6 @@
endif(SLEEP_EXEC)
endif(NOT "$ENV{BRLCAD_ROOT}" STREQUAL "" AND NOT BRLCAD_ROOT_OVERRIDE)
-# If BRLCAD_INSTALL_PREFIX is "/usr", be VERY noisy about it - a make install
in
-# this location is dangerous/destructive on some systems.
-if("${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
- message(WARNING "}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\nIt is
STRONGLY recommended that you DO NOT install BRL-CAD into /usr as BRL-CAD
provides several libraries that may conflict with other libraries (e.g. librt,
libbu, libbn) on certain system configurations.\nSince our libraries predate
all those that we're known to conflict with and are at the very core of our
geometry services and project heritage, we have no plans to change the names of
our libraries at this time.\nINSTALLING INTO /usr CAN MAKE A SYSTEM COMPLETELY
UNUSABLE. If you choose to continue installing into /usr, you do so entirely
at your own risk. You have been
warned.\n}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}")
- if(SLEEP_EXEC)
- execute_process(COMMAND ${SLEEP_EXEC} 15)
- endif(SLEEP_EXEC)
- message(FATAL_ERROR "If you wish to proceed using /usr as your prefix,
define BRLCAD_ALLOW_INSTALL_TO_USR=1 for CMake")
-endif("${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
-
#---------------------------------------------------------------------
# Define relative install locations and output directories. Don't set
# these if they have already been set by some other means (like a
@@ -258,13 +228,6 @@
# To ensure the previous (and internally set) CMAKE_INSTALL_PREFIX value
# is available, BRLCAD_PREFIX is used to store the value in the cache.)
-if(BRLCAD_INSTALL_PREFIX)
- if(NOT "${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr/local")
- get_filename_component(PATH_NORMALIZED
"${BRLCAD_INSTALL_PREFIX}/${LIB_DIR}" ABSOLUTE)
- set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
- endif(NOT "${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${BRLCAD_INSTALL_PREFIX}" STREQUAL "/usr/local")
-endif(BRLCAD_INSTALL_PREFIX)
-
if(CMAKE_INSTALL_PREFIX)
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
get_filename_component(PATH_NORMALIZED
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" ABSOLUTE)
@@ -339,181 +302,36 @@
endif("${CMAKE_GENERATOR}" MATCHES "Ninja")
#---------------------------------------------------------------------
-# By default (as of version 2.8.2) CMake does not provide access to
-# global lists of executable and library targets. This is useful
-# in a number of situations related to formulating custom rules and
-# target dependency management. To avoid the necessity of replacing
-# add_library and add_executable calls with custom macros, override
-# the function names and call the _add_* functions to access the CMake
-# functionality previously available under the add_* functions. See
-# http://www.cmake.org/pipermail/cmake/2010-September/039388.html
+# "make check" runs all of the tests (unit, benchmark, and regression) that
are expected to work.
+# "make unit" runs all the unit tests.
+# To build the required targets for testing in the style of GNU Autotools "make
+# check") we define "unit" and "check" targets per
+# http://www.cmake.org/Wiki/CMakeEmulateMakeCheck and have add_test
+# automatically assemble its targets into the unit dependency list.
-# To allow a hypothetical parent build to disable this mechanism and
-# replace it, we wrap the whole show in an IF conditional. To avoid
-# the distcheck setup, the parent file should define the variable
-# BRLCAD_IS_SUBBUILD to ON. Note that this also disables the
-# liblib prefix check in add_library, making that the responsibility
-# of the parent build as well, and disables the mechanism for ensuring
-# that the timing code runs at the correct points during the build.
-
-# We also need to provide bookkeeping logic here for the distribution
-# verification or "distcheck" routines that will validate the state
-# of the source tree against that expected and accounted for in the
-# build files. The global coverage needed for the purpose results in
-# the add_library/add_executable command override mechanism having
-# to serve two purposes at once; since we only override these functions
-# once the logic for both jobs is intertwined below.
-
-if(NOT BRLCAD_IS_SUBBUILD)
- # Functions in CMake have local variable scope,
- # hence the use of properties to allow access to directory-specific
- # and global information scopes.
- define_property(GLOBAL PROPERTY CMAKE_LIBRARY_TARGET_LIST BRIEF_DOCS
"libtarget list" FULL_DOCS "Library target list")
- define_property(GLOBAL PROPERTY CMAKE_EXEC_TARGET_LIST BRIEF_DOCS "exec
target list" FULL_DOCS "Executable target list")
- define_property(GLOBAL PROPERTY CMAKE_CUSTOM_TARGET_LIST BRIEF_DOCS "custom
target list" FULL_DOCS "Custom target list")
- define_property(GLOBAL PROPERTY CMAKE_EXTERNAL_TARGET_LIST BRIEF_DOCS
"external target list" FULL_DOCS "External target list")
- mark_as_advanced(CMAKE_LIBRARY_TARGET_LIST)
- mark_as_advanced(CMAKE_EXEC_TARGET_LIST)
- mark_as_advanced(CMAKE_CUSTOM_TARGET_LIST)
- mark_as_advanced(CMAKE_EXTERNAL_TARGET_LIST)
-
- # Override and wrap add_library. While we're at it, avoid doubling up
- # on the lib prefix for libraries if the target name is lib<target>
- function(add_library name)
- _add_library(${name} ${ARGN})
- if(${name} MATCHES "^lib*")
- set_target_properties(${name} PROPERTIES PREFIX "")
- endif(${name} MATCHES "^lib*")
-
- # TODO - the mechanism below should eventually be replaced by a proper
- # feature in CMake, but it is as yet unimplemented:
- # https://cmake.org/pipermail/cmake-developers/2015-July/025682.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027985.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027993.html
- set(add_lib_to_list 1)
- foreach(libarg ${ARGN})
- if("${libarg}" STREQUAL "INTERFACE")
- set(add_lib_to_list 0)
- endif("${libarg}" STREQUAL "INTERFACE")
- endforeach(libarg ${ARGN})
- if (add_lib_to_list)
- set_property(GLOBAL APPEND PROPERTY CMAKE_LIBRARY_TARGET_LIST ${name})
- endif (add_lib_to_list)
- endfunction(add_library)
-
- # Override and wrap add_executable
- function(add_executable name)
- _add_executable(${name} ${ARGN})
-
- # TODO - the mechanism below should eventually be replaced by a proper
- # feature in CMake, but it is as yet unimplemented:
- # https://cmake.org/pipermail/cmake-developers/2015-July/025682.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027985.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027993.html
- set_property(GLOBAL APPEND PROPERTY CMAKE_EXEC_TARGET_LIST ${name})
- endfunction(add_executable)
-
- # Override and wrap add_custom_target
- function(add_custom_target name)
- _add_custom_target(${name} ${ARGN})
-
- # TODO - the mechanism below should eventually be replaced by a proper
- # feature in CMake, but it is as yet unimplemented:
- # https://cmake.org/pipermail/cmake-developers/2015-July/025682.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027985.html
- # https://cmake.org/pipermail/cmake-developers/2016-March/027993.html
- set_property(GLOBAL APPEND PROPERTY CMAKE_CUSTOM_TARGET_LIST ${name})
- endfunction(add_custom_target)
-
- # Note that at the moment we do not need to override CMake's external
- # project mechanisms because CMake does not use them, but if that changes
- # in the future an override will need to be added here - probably of the
- # ExternalProject_Add functionality.
-
- # Override and wrap configure_file. In the case of configure_file, we'll
- # check that the file is part of the source tree and not itself a
- # generated file, but not reject full-path entries since there are quite a
- # few of them. This means that, unlike CMAKEFILES's reliance on full vs.
- # relative path comparisons, generated files supplied to configure_file
- # need to have the GENERATED property set in order to reliably tell which
- # files should be added to the build system's lists. Not
- # so critical with not-in-src-dir builds, but makes a big difference
- # spotting files to avoid when all generated files have source directory
- # prefixes.
- function(configure_file file targetfile)
- _configure_file(${file} ${targetfile} ${ARGN})
- # Tag output from configure with the GENERATED tag
- set_source_files_properties(${targetfile} PROPERTIES GENERATED TRUE)
- # If it's a generated file, don't register it
- get_property(IS_GENERATED SOURCE ${file} PROPERTY GENERATED)
- if(NOT IS_GENERATED)
- get_filename_component(item_absolute ${file} ABSOLUTE)
- # If we're not in the source dir, we can do some extra checking.
- if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- IS_SUBPATH("${CMAKE_BINARY_DIR}" "${item_absolute}" SUBPATH_TEST)
- else(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- set(SUBPATH_TEST "0")
- endif(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- if("${SUBPATH_TEST}" STREQUAL "0")
- IS_SUBPATH("${CMAKE_SOURCE_DIR}" "${item_absolute}" SUBPATH_TEST)
- if("${SUBPATH_TEST}" STREQUAL "1")
- set_property(GLOBAL APPEND PROPERTY CMAKE_IGNORE_FILES
"${item_absolute}")
- endif("${SUBPATH_TEST}" STREQUAL "1")
- else("${SUBPATH_TEST}" STREQUAL "0")
- message(WARNING "The generated file ${file} is passed to configure_file
but does not have the GENERATED source file property set in CMake. It is
HIGHLY recommended that the GENERATED property be set for this file in
\"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\" using a command with the
following form:\nset_source_files_properties(<file> PROPERTIES GENERATED
TRUE)\n(or in \"${CMAKE_SOURCE_DIR}/src/other/CMakeLists.txt\" for third party
components with their own build system.)\n")
- endif("${SUBPATH_TEST}" STREQUAL "0")
- endif(NOT IS_GENERATED)
- if(NOT ${targetfile} MATCHES "distclean")
- DISTCLEAN(${targetfile})
- endif(NOT ${targetfile} MATCHES "distclean")
- endfunction(configure_file)
-
- # Override and wrap add_subdirectory.
- function(add_subdirectory name)
- _add_subdirectory(${name} ${ARGN})
-
- # TODO - try to come up with some good way to do this bookkeeping without
- # having to override add_subdirectory...
- #
- # see https://cmake.org/pipermail/cmake-developers/2015-July/025730.html
- # for some work related to this... the SOURCE_DIR and SOURCES properties
- # went in in CMake 3.4. Once we can require that as a minimum version, we
- # 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.
- DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${name}/CMakeFiles")
- DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${name}/cmake_install.cmake")
- foreach(clearpattern ${DISTCLEAN_OUTFILES})
- DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${name}/${clearpattern}")
- endforeach(clearpattern ${DISTCLEAN_OUTFILES})
- endfunction(add_subdirectory)
-
-endif(NOT BRLCAD_IS_SUBBUILD)
-
-# "make check" runs all of the tests (unit, benchmark, and regression) that
are expected to work.
-if(NOT BRLCAD_IS_SUBBUILD)
- include(ProcessorCount)
- ProcessorCount(N)
- if(NOT N EQUAL 0)
- math(EXPR NC "${N} / 2")
- if(${NC} GREATER 1)
- set(JFLAG "-j${NC}")
- else(${NC} GREATER 1)
- set(JFLAG)
- endif(${NC} GREATER 1)
- else(NOT N EQUAL 0)
- # Huh? No j flag if we can't get a processor count
+include(ProcessorCount)
+ProcessorCount(N)
+if(NOT N EQUAL 0)
+ math(EXPR NC "${N} / 2")
+ if(${NC} GREATER 1)
+ set(JFLAG "-j${NC}")
+ else(${NC} GREATER 1)
set(JFLAG)
- endif(NOT N EQUAL 0)
+ endif(${NC} GREATER 1)
+else(NOT N EQUAL 0)
+ # Huh? No j flag if we can't get a processor count
+ set(JFLAG)
+endif(NOT N EQUAL 0)
- if(CMAKE_CONFIGURATION_TYPES)
- set(CONFIG $<CONFIG>)
- else(CMAKE_CONFIGURATION_TYPES)
- if ("${CONFIG}" STREQUAL "")
- set(CONFIG "\"\"")
- endif ("${CONFIG}" STREQUAL "")
- endif(CMAKE_CONFIGURATION_TYPES)
+if(CMAKE_CONFIGURATION_TYPES)
+ set(CONFIG $<CONFIG>)
+else(CMAKE_CONFIGURATION_TYPES)
+ if ("${CONFIG}" STREQUAL "")
+ set(CONFIG "\"\"")
+ endif ("${CONFIG}" STREQUAL "")
+endif(CMAKE_CONFIGURATION_TYPES)
+if (NOT TARGET check)
add_custom_target(check
COMMAND ${CMAKE_COMMAND} -E echo
"\"**********************************************************************\""
COMMAND ${CMAKE_COMMAND} -E echo "NOTE: The \\\"check\\\" a.k.a.
\\\"BRL-CAD Validation Testing\\\" target runs"
@@ -526,36 +344,9 @@
COMMAND ${CMAKE_CTEST_COMMAND} -C ${CONFIG} -L \"Regression\"
--output-on-failure ${JFLAG}
)
set_target_properties(check PROPERTIES FOLDER "BRL-CAD Validation Testing")
-endif(NOT BRLCAD_IS_SUBBUILD)
+endif (NOT TARGET check)
-
-# To support "make unit" (which will build the required targets for testing
-# in the style of GNU Autotools "make check") we define a "unit" target per
-# http://www.cmake.org/Wiki/CMakeEmulateMakeCheck and have add_test
-# automatically assemble its targets into the unit dependency list.
-if(NOT BRLCAD_IS_SUBBUILD)
- include(ProcessorCount)
- ProcessorCount(N)
- if(NOT N EQUAL 0)
- math(EXPR NC "${N} / 2")
- if(${NC} GREATER 1)
- set(JFLAG "-j${NC}")
- else(${NC} GREATER 1)
- set(JFLAG)
- endif(${NC} GREATER 1)
- else(NOT N EQUAL 0)
- # Huh? No j flag if we can't get a processor count
- set(JFLAG)
- endif(NOT N EQUAL 0)
-
- if(CMAKE_CONFIGURATION_TYPES)
- set(CONFIG $<CONFIG>)
- else(CMAKE_CONFIGURATION_TYPES)
- if ("${CONFIG}" STREQUAL "")
- set(CONFIG "\"\"")
- endif ("${CONFIG}" STREQUAL "")
- endif(CMAKE_CONFIGURATION_TYPES)
-
+if (NOT TARGET unit)
add_custom_target(unit
COMMAND ${CMAKE_COMMAND} -E echo
"\"**********************************************************************\""
COMMAND ${CMAKE_COMMAND} -E echo "NOTE: The \\\"unit\\\" a.k.a.
\\\"BRL-CAD Unit Testing\\\" target runs the"
@@ -565,129 +356,159 @@
COMMAND ${CMAKE_COMMAND} -E echo
"\"**********************************************************************\""
COMMAND ${CMAKE_CTEST_COMMAND} -C ${CONFIG} -LE \"Regression|NOT_WORKING\"
-E \"^regress-|NOTE|benchmark|slow-\" ${JFLAG}
)
-
set_target_properties(unit PROPERTIES FOLDER "BRL-CAD Validation Testing")
+endif (NOT TARGET unit)
- # we wrap the CMake add_test() function in order to automatically
- # set up test dependencies for the 'unit' and 'check' test targets.
- #
- # this function extravagantly tries to work around a bug in CMake
- # where we cannot pass an empty string through this wrapper to
- # _add_test()/add_test(). passed as a list (e.g., via ARGN, ARGV,
- # or manually composed), the empty string is skipped(!). passed as
- # a string, it is all treated as command name with no arguments.
- #
- # manual workaround used here involves invoking _add_test() with all
- # args individually recreated/specified (i.e., not as a list) as
- # this preserves empty strings. this approach means we cannot
- # generalize and only support a limited variety of empty string
- # arguments, but we do test and halt if someone unknowingly tries.
- function(add_test NAME test_name COMMAND test_prog)
+# we wrap the CMake add_test() function in order to automatically set up test
+# dependencies for the 'unit' and 'check' test targets.
+#
+# this function extravagantly tries to work around a bug in CMake where we
+# cannot pass an empty string through this wrapper to add_test(). passed as a
+# list (e.g., via ARGN, ARGV, or manually composed), the empty string is
+# skipped(!). passed as a string, it is all treated as command name with no
+# arguments.
+#
+# manual workaround used here involves invoking _add_test() with all args
+# individually recreated/specified (i.e., not as a list) as this preserves
+# empty strings. this approach means we cannot generalize and only support a
+# limited variety of empty string arguments, but we do test and halt if someone
+# unknowingly tries.
+function(BRLCAD_ADD_TEST NAME test_name COMMAND test_prog)
- # find any occurrences of empty strings
- set(idx 0)
- set(matches)
- foreach (ARG IN LISTS ARGV)
- # need 'x' to avoid older cmake seeing "COMMAND" "STREQUAL" ""
- if ("x${ARG}" STREQUAL "x")
- list(APPEND matches ${idx})
- endif ("x${ARG}" STREQUAL "x")
- math(EXPR idx "${idx} + 1")
- endforeach()
+ # TODO - once we can require CMake 3.18, replace the empty string workaround
+ # below with this cmake_language based version. See
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/21414
- # make sure we don't exceed current support
- list(LENGTH matches cnt)
- if ("${cnt}" GREATER 1)
- message(FATAL_ERROR "ERROR: encountered ${cnt} > 1 empty string being
passed to add_test(${test_name}). Expand support in the top-level
CMakeLists.txt file (grep add_test) or pass fewer empty strings.")
- endif ("${cnt}" GREATER 1)
+ # cmake_parse_arguments(PARSE_ARGV 3 ARG "" "" "")
+ # foreach(_av IN LISTS ARG_UNPARSED_ARGUMENTS)
+ # string(APPEND test_args " [==[${_av}]==]")
+ # endforeach()
+ # cmake_language(EVAL CODE "add_test(NAME ${test_name} COMMAND
${test_args})")
- # if there are empty strings, we need to manually recreate their calling
- if ("${cnt}" GREATER 0)
- list(GET matches 0 empty)
- if ("${empty}" EQUAL 4)
- foreach (i 1)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} "" ${ARGN})
- elseif ("${empty}" EQUAL 5)
- foreach (i 1 2)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} "" ${ARGN})
- elseif ("${empty}" EQUAL 6)
- foreach (i 1 2 3)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5} ""
${ARGN})
- elseif ("${empty}" EQUAL 7)
- foreach (i 1 2 3 4)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} "" ${ARGN})
- elseif ("${empty}" EQUAL 8)
- foreach (i 1 2 3 4 5)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} "" ${ARGN})
- elseif ("${empty}" EQUAL 9)
- foreach (i 1 2 3 4 5 6)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} "" ${ARGN})
- elseif ("${empty}" EQUAL 10)
- foreach (i 1 2 3 4 5 6)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} ${ARGV9} "" ${ARGN})
- elseif ("${empty}" EQUAL 11)
- foreach (i 1 2 3 4 5 6)
- if (ARGN)
- list(REMOVE_AT ARGN 0)
- endif (ARGN)
- endforeach ()
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} ${ARGV9} ${ARGV10} "" ${ARGN})
+ # find any occurrences of empty strings
+ set(idx 0)
+ set(matches)
+ foreach (ARG IN LISTS ARGV)
+ # need 'x' to avoid older cmake seeing "COMMAND" "STREQUAL" ""
+ if ("x${ARG}" STREQUAL "x")
+ list(APPEND matches ${idx})
+ endif ("x${ARG}" STREQUAL "x")
+ math(EXPR idx "${idx} + 1")
+ endforeach()
+ # make sure we don't exceed current support
+ list(LENGTH matches cnt)
+ if ("${cnt}" GREATER 1)
+ message(FATAL_ERROR "ERROR: encountered ${cnt} > 1 empty string being
passed to add_test(${test_name}). Expand support in the top-level
CMakeLists.txt file (grep add_test) or pass fewer empty strings.")
+ endif ("${cnt}" GREATER 1)
- # ADD_EMPTY_HERE: insert support for addition argv positions
- # as extra elseif tests here using the preceding pattern. be
- # sure to update the index in the following else clause fatal
- # error message too.
+ # if there are empty strings, we need to manually recreate their calling
+ if ("${cnt}" GREATER 0)
- else ("${empty}" EQUAL 4)
- message(FATAL_ERROR "ERROR: encountered an empty string passed to
add_test(${test_name}) as ARGV${empty} > ARGV9. Expand support in the
top-level CMakeLists.txt file (grep ADD_EMPTY_HERE).")
- endif ("${empty}" EQUAL 4)
+ list(GET matches 0 empty)
+ if ("${empty}" EQUAL 4)
+ foreach (i 1)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} "" ${ARGN})
+ elseif ("${empty}" EQUAL 5)
+ foreach (i 1 2)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} "" ${ARGN})
+ elseif ("${empty}" EQUAL 6)
+ foreach (i 1 2 3)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5} ""
${ARGN})
+ elseif ("${empty}" EQUAL 7)
+ foreach (i 1 2 3 4)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} "" ${ARGN})
+ elseif ("${empty}" EQUAL 8)
+ foreach (i 1 2 3 4 5)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} "" ${ARGN})
+ elseif ("${empty}" EQUAL 9)
+ foreach (i 1 2 3 4 5 6)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} "" ${ARGN})
+ elseif ("${empty}" EQUAL 10)
+ foreach (i 1 2 3 4 5 6 7)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} ${ARGV9} "" ${ARGN})
+ elseif ("${empty}" EQUAL 11)
+ foreach (i 1 2 3 4 5 6 7 8)
+ if (ARGN)
+ list(REMOVE_AT ARGN 0)
+ endif (ARGN)
+ endforeach ()
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGV4} ${ARGV5}
${ARGV6} ${ARGV7} ${ARGV8} ${ARGV9} ${ARGV10} "" ${ARGN})
- else ("${cnt}" GREATER 0)
- # no empty strings, no worries
- _add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGN})
- endif ("${cnt}" GREATER 0)
- # add test to unit and check targets
- if (NOT "${test_name}" MATCHES ^regress- AND NOT "${test_prog}" MATCHES
^regress- AND NOT "${test_name}" MATCHES ^slow- AND NOT "${test_name}" STREQUAL
"benchmark" AND NOT "${test_name}" MATCHES ^NOTE:)
- add_dependencies(unit ${test_prog})
- add_dependencies(check ${test_prog})
- endif (NOT "${test_name}" MATCHES ^regress- AND NOT "${test_prog}" MATCHES
^regress- AND NOT "${test_name}" MATCHES ^slow- AND NOT "${test_name}" STREQUAL
"benchmark" AND NOT "${test_name}" MATCHES ^NOTE:)
+ # ADD_EMPTY_HERE: insert support for additional argv positions
+ # as extra elseif tests here using the preceding pattern. be
+ # sure to update the index in the following else clause fatal
+ # error message too.
- endfunction(add_test NAME test_name COMMAND test_prog)
-endif(NOT BRLCAD_IS_SUBBUILD)
+ else ("${empty}" EQUAL 4)
+ message(FATAL_ERROR "ERROR: encountered an empty string passed to
add_test(${test_name}) as ARGV${empty} > ARGV11. Expand support in the
top-level CMakeLists.txt file (grep ADD_EMPTY_HERE).")
+ endif ("${empty}" EQUAL 4)
+ else ("${cnt}" GREATER 0)
+ # no empty strings, no worries
+ add_test(NAME ${test_name} COMMAND ${test_prog} ${ARGN})
+ endif ("${cnt}" GREATER 0)
+ # There are a variety of criteria that disqualify test_prog as a
+ # dependency - check and return if we hit any of them.
+ if (NOT TARGET ${test_prog})
+ return()
+ endif ()
+ if ("${test_name}" MATCHES ^regress-)
+ return()
+ endif ()
+ if ("${test_prog}" MATCHES ^regress-)
+ return()
+ endif ()
+ if ("${test_name}" MATCHES ^slow-)
+ return()
+ endif ()
+ if ("${test_name}" STREQUAL "benchmark")
+ return()
+ endif ()
+ if ("${test_name}" MATCHES ^NOTE:)
+ return()
+ endif ()
+
+ # add program needed for test to unit and check target dependencies
+ add_dependencies(unit ${test_prog})
+ add_dependencies(check ${test_prog})
+
+endfunction(BRLCAD_ADD_TEST NAME test_name COMMAND test_prog)
+
+
+
#---------------------------------------------------------------------
# Load macros that will be used to define the BRL-CAD
# build logic
@@ -819,19 +640,19 @@
# ExternalProject_Add approach first as well - that way unmodified install
# commands in 3rd party CMake files will be moot.
#
-# if (NOT BRLCAD_INSTALL_PREFIX)
-# set(BRLCAD_INSTALL_PREFIX "/usr/brlcad/")
+# if (NOT CMAKE_INSTALL_PREFIX)
+# set(CMAKE_INSTALL_PREFIX "/usr/brlcad/")
# if (NOT MSVC)
# set(gen_exp
$<IF:$<CONFIG:Debug>,dev-${BRLCAD_VERSION}/,$<IF:$<CONFIG:Release>,rel-${BRLCAD_VERSION}/${BRLCAD_VERSION},>>)
# else (NOT MSVC)
# set(gen_exp)
# if(CMAKE_CL_64)
-# set(BRLCAD_INSTALL_PREFIX "C:/Program Files/BRL-CAD
${BRLCAD_VERSION}")
+# set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD
${BRLCAD_VERSION}")
# else(CMAKE_CL_64)
-# set(BRLCAD_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
+# set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
# endif(CMAKE_CL_64)
# endif (NOT MSVC)
-# endif (NOT BRLCAD_INSTALL_PREFIX)
+# endif (NOT CMAKE_INSTALL_PREFIX)
# install(TARGETS mged DESTINATION ${gen_exp}${BIN_DIR})
#
# Another (maybe better) option instead of generators might be to use the
CONFIGURATIONS
@@ -838,32 +659,32 @@
# option in our macros and the ExternalProject_Add management:
# https://cmake.org/cmake/help/latest/command/install.html
#
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT BRLCAD_INSTALL_PREFIX)
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
if(NOT CMAKE_CONFIGURATION_TYPES)
if("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- set(BRLCAD_INSTALL_PREFIX "/usr/brlcad/rel-${BRLCAD_VERSION}")
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/rel-${BRLCAD_VERSION}")
else("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- set(BRLCAD_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
endif("${CMAKE_BUILD_TYPE}" MATCHES "Release")
else(NOT CMAKE_CONFIGURATION_TYPES)
if(MSVC)
if(CMAKE_CL_64)
- set(BRLCAD_INSTALL_PREFIX "C:/Program Files/BRL-CAD ${BRLCAD_VERSION}")
+ set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD ${BRLCAD_VERSION}")
else(CMAKE_CL_64)
- set(BRLCAD_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
+ set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
endif(CMAKE_CL_64)
else(MSVC)
- set(BRLCAD_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
endif(MSVC)
endif(NOT CMAKE_CONFIGURATION_TYPES)
- set(BRLCAD_INSTALL_PREFIX ${BRLCAD_INSTALL_PREFIX} CACHE PATH "BRL-CAD
install prefix" FORCE)
- set(BRLCAD_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
-endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT BRLCAD_INSTALL_PREFIX)
-set(BRLCAD_PREFIX "${BRLCAD_INSTALL_PREFIX}" CACHE STRING "BRL-CAD install
prefix")
+ set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "BRL-CAD install
prefix" FORCE)
+ set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
+set(BRLCAD_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE STRING "BRL-CAD install
prefix")
mark_as_advanced(BRLCAD_PREFIX)
-if (DEFINED BRLCAD_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "${BRLCAD_INSTALL_PREFIX}")
-endif (DEFINED BRLCAD_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
+if (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+endif (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
# If we've a Release build with a Debug path or vice versa, warn about
@@ -870,13 +691,23 @@
# it. A "make install" of a Release build into a dev install
# directory or vice versa is going to result in an install that
# doesn't respect BRL-CAD standard naming conventions.
-if("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${BRLCAD_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
- message(FATAL_ERROR "\nInstallation directory (BRLCAD_INSTALL_PREFIX) is set
to /usr/brlcad/dev-${BRLCAD_VERSION}, but build type is set to Release!\n")
-endif("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${BRLCAD_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
-if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${BRLCAD_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
- message(FATAL_ERROR "\nInstallation directory (BRLCAD_INSTALL_PREFIX) is set
to /usr/brlcad/rel-${BRLCAD_VERSION}, but build type is set to Debug!\n")
-endif("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${BRLCAD_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
+if("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/dev-${BRLCAD_VERSION}, but build type is set to Release!\n")
+endif("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
+if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
+ message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/rel-${BRLCAD_VERSION}, but build type is set to Debug!\n")
+endif("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
+# If CMAKE_INSTALL_PREFIX is "/usr", be VERY noisy about it - a make install in
+# this location is dangerous/destructive on some systems.
+if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
+ message(WARNING "}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\nIt is
STRONGLY recommended that you DO NOT install BRL-CAD into /usr as BRL-CAD
provides several libraries that may conflict with other libraries (e.g. librt,
libbu, libbn) on certain system configurations.\nSince our libraries predate
all those that we're known to conflict with and are at the very core of our
geometry services and project heritage, we have no plans to change the names of
our libraries at this time.\nINSTALLING INTO /usr CAN MAKE A SYSTEM COMPLETELY
UNUSABLE. If you choose to continue installing into /usr, you do so entirely
at your own risk. You have been
warned.\n}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}")
+ if(SLEEP_EXEC)
+ execute_process(COMMAND ${SLEEP_EXEC} 15)
+ endif(SLEEP_EXEC)
+ message(FATAL_ERROR "If you wish to proceed using /usr as your prefix,
define BRLCAD_ALLOW_INSTALL_TO_USR=1 for CMake")
+endif("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
+
#------------------------------------------------------------------------------
# Now that we know the install prefix, generate the binary for calculating
# and reporting time deltas
@@ -1028,7 +859,7 @@
# Let bu_dir know what the target install directory is. In a superbuild
# configuration this will be the most import place to be sure that we get the
# actual superbuild install path, not the local BRL-CAD subbuild install path.
-CONFIG_H_APPEND(BRLCAD "#define BRLCAD_ROOT \"${BRLCAD_INSTALL_PREFIX}\"\n")
+CONFIG_H_APPEND(BRLCAD "#define BRLCAD_ROOT \"${CMAKE_INSTALL_PREFIX}\"\n")
# Define the various relative paths for bu_dir (be sure to have included
# Path_Setup.cmake before this point, as that file defines these variables.)
@@ -2046,7 +1877,6 @@
set(CXX_STANDARD_FLAGS "${CXX_STANDARD_FLAGS} -Dclockid_t=clock_t
-pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dclockid_t=clock_t -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dclockid_t=clock_t -pthread")
- set(THREADS_PREFER_PTHREAD_FLAG TRUE)
endif (PROBE_PTHREAD_H_CLOCKID_T)
endif (NOT PROBE_PTHREAD_H)
@@ -2461,10 +2291,25 @@
# be referenced in a pkgconfig file
# Look for threads (doesn't check for headers)
-# The variable CMAKE_THREAD_LIBS_INIT is the one of interest
-# when writing target_link_libraries lists.
+# Post 3.1 CMake has switched to recommending using an imported target
+# and setting a "prefer pthreads" flag - previously we were using the
+# CMAKE_THREAD_LIBS_INIT variable
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
+if(CMAKE_THREAD_LIBS_INIT)
+ message("Using threading library: ${CMAKE_THREAD_LIBS_INIT}")
+else(CMAKE_THREAD_LIBS_INIT)
+ message("Using threading from system library")
+endif(CMAKE_THREAD_LIBS_INIT)
+# By default, the Threads package doesn't stash any of its values in
+# cache. This is inconvenient for debugging, so we set them ourselves.
+set(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} CACHE STRING "Threads")
+set(CMAKE_USE_WIN32_THREADS_INIT ${CMAKE_USE_WIN32_THREADS_INIT} CACHE STRING
"Threads")
+set(CMAKE_USE_PTHREADS_INIT ${CMAKE_USE_PTHREADS_INIT} CACHE STRING "Threads")
+set(CMAKE_HP_PTHREADS_INIT ${CMAKE_HP_PTHREADS_INIT} CACHE STRING "Threads")
+
# Check for the C++ STL library - need to link it explicitly in
# some compilation situations
find_package(STL)
@@ -3228,6 +3073,11 @@
endif(${BRLCAD_ENABLE_TARGETS} GREATER 2)
endif(NOT BRLCAD_ENABLE_TARGETS)
+# If we're below level 2, we don't need Tcl
+if (NOT BRLCAD_LEVEL2)
+ set(BRLCAD_ENABLE_TCL OFF CACHE BOOL "Disabled due to level 1 build" FORCE)
+endif (NOT BRLCAD_LEVEL2)
+
# At the start, clear the src/other subdirs list so repeated
# configures will correctly add the required directories
set(SRC_OTHER_ADDED_DIRS "" CACHE STRING "initialize 3rd party sub-directories
list" FORCE)
@@ -3354,91 +3204,98 @@
# *******************************************************************
# *** Timestamp Rules ***
# *******************************************************************
-# TODO - As of CMake 2.8.11, the string command has a TIMESTAMP option
-# that may be able to simplify some of the current timestamp system.
-# We would need to be able to require 2.8.11 or newer, so there will
-# be a bit of a wait, but it's something to look into.
-if(NOT BRLCAD_IS_SUBBUILD)
+# Set up rules to print a timestamp string during build
+set(BUILD_DELTA_START "${CMAKE_BINARY_DIR}/CMakeTmp/BUILD_DELTA_START")
- # Set up rules to print a timestamp string during build
- set(BUILD_DELTA_START "${CMAKE_BINARY_DIR}/CMakeTmp/BUILD_DELTA_START")
-
- add_custom_command(
+add_custom_command(
OUTPUT ${BUILD_DELTA_START}
- COMMAND ${CMAKE_BINARY_DIR}/CMakeTmp/sstamp${EXE_EXT}
"${BUILD_DELTA_START}"
+ COMMAND "${CMAKE_COMMAND}" -DSTAMP_FILE=${BUILD_DELTA_START} -P
"${BRLCAD_CMAKE_DIR}/scripts/timestamp.cmake"
COMMENT ""
)
- add_custom_target(timestamp ALL
- COMMAND ${CMAKE_BINARY_DIR}/CMakeTmp/pts${EXE_EXT} \"Build Time: \"
+add_custom_target(timestamp ALL
+ COMMAND "${CMAKE_COMMAND}" -DMSG=\"Build Time:\" -P
"${BRLCAD_CMAKE_DIR}/scripts/printtime.cmake"
DEPENDS ${BUILD_DELTA_START}
)
- set_target_properties(timestamp PROPERTIES FOLDER "Compilation Utilities")
- add_custom_target(buildtimedelta ALL
+set_target_properties(timestamp PROPERTIES FOLDER "Compilation Utilities")
+add_custom_target(buildtimedelta ALL
COMMAND ${CMAKE_BINARY_DIR}/CMakeTmp/dreport${EXE_EXT} final
${BUILD_DELTA_START} ${CONFIG_DELTA_START}
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_DELTA_START}
)
- set_target_properties(buildtimedelta PROPERTIES FOLDER "Compilation
Utilities")
-endif(NOT BRLCAD_IS_SUBBUILD)
+set_target_properties(buildtimedelta PROPERTIES FOLDER "Compilation Utilities")
-# We want the timestamp to come first, so make ALL targets, depend on
-# timestamp. Similarly, buildtimedelta needs to depend on every target
-# not excluded from the default build list.
-if(NOT BRLCAD_IS_SUBBUILD)
+#------------------------------------------------------------------------------
+# We want the timestamp to come first, so make all targets depend on timestamp.
+# Similarly, buildtimedelta needs to depend on every target not excluded from
+# the default build list. Doing this without function overrides for
+# bookkeeping drives a minimum CMake version requirement of 3.7, in order to
+# get the SUBDIRECTORIES and BUILDSYTEM_TARGETS properties.
- # Libraries and executables are fairly straightforward
- get_property(CMAKE_LIBRARY_TARGET_LIST GLOBAL PROPERTY
CMAKE_LIBRARY_TARGET_LIST)
- get_property(CMAKE_EXEC_TARGET_LIST GLOBAL PROPERTY CMAKE_EXEC_TARGET_LIST)
- mark_as_advanced(CMAKE_LIBRARY_TARGET_LIST)
- mark_as_advanced(CMAKE_EXEC_TARGET_LIST)
- list(REMOVE_DUPLICATES CMAKE_LIBRARY_TARGET_LIST)
- list(REMOVE_DUPLICATES CMAKE_EXEC_TARGET_LIST)
- foreach(ctarget ${CMAKE_LIBRARY_TARGET_LIST} ${CMAKE_EXEC_TARGET_LIST})
- if(TARGET ${ctarget})
- add_dependencies(${ctarget} timestamp)
- get_target_property(not_in_all ${ctarget} EXCLUDE_FROM_ALL)
- get_target_property(not_in_default ${ctarget} EXCLUDE_FROM_DEFAULT_BUILD)
- if(NOT not_in_all AND NOT not_in_default)
- add_dependencies(buildtimedelta ${ctarget})
- endif(NOT not_in_all AND NOT not_in_default)
- endif(TARGET ${ctarget})
- endforeach(ctarget ${CMAKE_LIBRARY_TARGET_LIST} ${CMAKE_EXEC_TARGET_LIST})
+# First, use the SUBDIRECTORIES property to build up a list of all
+# active directories in CMake:
+# https://cmake.org/cmake/help/latest/prop_dir/SUBDIRECTORIES.html
+#
+# We do this because we need to use get_property on them, and get_property will
+# produce an error if we give it a non-CMake processed directory. As a side
+# benefit, it should also be considerably faster than using FILE_GLOB and
+# trying to trim down the results.
+set(ALL_DIRS)
+get_property(SUBDIRS DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY SUBDIRECTORIES)
+while(SUBDIRS)
+ # TODO - once we require 3.15.7 or greater, use list(POP_FRONT) for this...
+ list(GET SUBDIRS 0 CDIR)
+ list(REMOVE_AT SUBDIRS 0)
+ set(ALL_DIRS ${ALL_DIRS} ${CDIR})
+ get_property(CSUBDIRS DIRECTORY "${CDIR}" PROPERTY SUBDIRECTORIES)
+ set(SUBDIRS ${SUBDIRS} ${CSUBDIRS})
+endwhile(SUBDIRS)
- # For the custom targets, we need to avoid circular dependencies
- get_property(CMAKE_CUSTOM_TARGET_LIST GLOBAL PROPERTY
CMAKE_CUSTOM_TARGET_LIST)
- mark_as_advanced(CMAKE_CUSTOM_TARGET_LIST)
- list(REMOVE_DUPLICATES CMAKE_CUSTOM_TARGET_LIST)
- foreach(custtarget ${CMAKE_CUSTOM_TARGET_LIST})
- if(NOT ${custtarget} MATCHES "timestamp")
- add_dependencies(${custtarget} timestamp)
- endif(NOT ${custtarget} MATCHES "timestamp")
- if(NOT ${custtarget} MATCHES "buildtimedelta")
- get_target_property(not_in_all ${custtarget} EXCLUDE_FROM_ALL)
- get_target_property(not_in_default ${custtarget}
EXCLUDE_FROM_DEFAULT_BUILD)
- if(NOT not_in_all AND NOT not_in_default)
- add_dependencies(buildtimedelta ${custtarget})
- endif(NOT not_in_all AND NOT not_in_default)
- endif(NOT ${custtarget} MATCHES "buildtimedelta")
- endforeach(custtarget ${CMAKE_CUSTOM_TARGET_LIST})
+# Next, for all active directories, collect the list of targets using the
+# BUILDSYSTEM_TARGETS property set on each directory.
- # Theoretical logic to handle external targets - not currently in use
- get_property(CMAKE_EXTERNAL_TARGET_LIST GLOBAL PROPERTY
CMAKE_EXTERNAL_TARGET_LIST)
- mark_as_advanced(CMAKE_EXTERNAL_TARGET_LIST)
- if(CMAKE_EXTERNAL_TARGET_LIST)
- list(REMOVE_DUPLICATES CMAKE_EXTERNAL_TARGET_LIST)
- endif(CMAKE_EXTERNAL_TARGET_LIST)
- foreach(externaltarget ${CMAKE_EXTERNAL_TARGET_LIST})
- get_target_property(target_confcmd ${externaltarget} _EP_CONFIGURE_COMMAND)
- if(target_confcmd)
- add_dependencies(${externaltarget} timestamp)
- add_dependencies(buildtimedelta ${externaltarget})
- endif(target_confcmd)
- endforeach(externaltarget ${CMAKE_EXTERNAL_TARGET_LIST})
+# Iterate over all the SUBDIRECTORIES identified directories to build up the
+# comprehensive set. As target names are unique, we don't need to worry about
+# removing duplicates. Because we're using the set of all active directories
+# assembled above, this should collect all build targets we need to care about
+# for timestamping purposes.
+set(ALL_TARGETS)
+foreach(ad ${ALL_DIRS})
+ get_property(DIR_TARGETS DIRECTORY "${ad}" PROPERTY BUILDSYSTEM_TARGETS SET)
+ if (DIR_TARGETS)
+ get_property(DIR_TARGETS DIRECTORY "${ad}" PROPERTY BUILDSYSTEM_TARGETS)
+ set(ALL_TARGETS ${ALL_TARGETS} ${DIR_TARGETS})
+ endif (DIR_TARGETS)
+endforeach(ad ${ALL_DIRS})
-endif(NOT BRLCAD_IS_SUBBUILD)
+# Now, set up the target dependencies for tiemstamp and buildtimedelta. These
+# dependencies will produce a build-tool-independent ordering that gives us the
+# timing behavior we want.
+foreach(ctarget ${ALL_TARGETS})
+ if(NOT ${ctarget} MATCHES "timestamp")
+ add_dependencies(${ctarget} timestamp)
+ endif(NOT ${ctarget} MATCHES "timestamp")
+ if(NOT ${ctarget} MATCHES "buildtimedelta")
+ get_target_property(not_in_all ${ctarget} EXCLUDE_FROM_ALL)
+ get_target_property(not_in_default ${ctarget} EXCLUDE_FROM_DEFAULT_BUILD)
+ if(NOT not_in_all AND NOT not_in_default)
+ add_dependencies(buildtimedelta ${ctarget})
+ endif(NOT not_in_all AND NOT not_in_default)
+ endif(NOT ${ctarget} MATCHES "buildtimedelta")
+endforeach(ctarget ${ALL_TARGETS})
+#------------------------------------------------------------------------------
+# Use the set of all directories assembled above to also set up distclean
rules.
+# This eliminates the need to override add_subdirectory. Needs CMake 3.7 for
+# BINARY_DIR property.
+foreach(ad ${ALL_DIRS})
+ get_property(BDIR DIRECTORY "${ad}" PROPERTY BINARY_DIR)
+ DISTCLEAN("${BDIR}/CMakeFiles")
+ DISTCLEAN("${BDIR}/cmake_install.cmake")
+ foreach(clearpattern ${DISTCLEAN_OUTFILES})
+ DISTCLEAN("${BDIR}/${clearpattern}")
+ endforeach(clearpattern ${DISTCLEAN_OUTFILES})
+endforeach(ad ${ALL_DIRS})
-# TODO - the below logic will have to be rethought in a superbuild setup...
-
+#------------------------------------------------------------------------------
# To set correct install paths for CMake at build time, rather than CMake
# time, some rather special logic is necessary - a build target that needs
# to be run when the current build type changes, and introspective scripting
@@ -3457,7 +3314,9 @@
# do for BRL-CAD reporting purposes - must get the fully qualified path at
build time.
string(REPLACE "\${BUILD_TYPE}" "----BUILD_TYPE----"
CMAKE_INSTALL_PREFIX_CFG "${CMAKE_INSTALL_PREFIX}")
configure_file("${BRLCAD_CMAKE_DIR}/multiconfig_path_clean.cmake.in"
"${CMAKE_BINARY_DIR}/CMakeTmp/multiconfig_path_clean.cmake" @ONLY)
+ DISTCLEAN("${CMAKE_BINARY_DIR}/CMakeTmp/multiconfig_path_clean.cmake")
configure_file("${BRLCAD_CMAKE_DIR}/multiconfig_path_read.cmake.in"
"${CMAKE_BINARY_DIR}/CMakeTmp/multiconfig_path_read.cmake" @ONLY)
+ DISTCLEAN("${CMAKE_BINARY_DIR}/CMakeTmp/multiconfig_path_read.cmake")
if(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/CURRENT_PATH")
file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/CMakeTmp/CURRENT_PATH")
endif(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/CURRENT_PATH")
@@ -3482,6 +3341,7 @@
if(NOT BRLCAD_IS_SUBBUILD)
configure_file("${BRLCAD_CMAKE_DIR}/source_archive_setup.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp/source_archive_setup.cmake" @ONLY)
+ DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp/source_archive_setup.cmake")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "BRL-CAD - a powerful cross-platform
open source solid modeling system")
set(CPACK_PACKAGE_VENDOR "BRL-CAD Development Team")
@@ -3625,10 +3485,15 @@
set(CPACK_SOURCE_IGNORE_FILES "\\\\.svn/")
configure_file("${BRLCAD_CMAKE_DIR}/BRLCAD_CPackOptions.cmake.in"
"${CMAKE_BINARY_DIR}/BRLCAD_CPackOptions.cmake" @ONLY)
+ DISTCLEAN("${CMAKE_BINARY_DIR}/BRLCAD_CPackOptions.cmake")
set(CPACK_PROJECT_CONFIG_FILE
"${CMAKE_BINARY_DIR}/BRLCAD_CPackOptions.cmake")
include(CPack)
+ DISTCLEAN("${CMAKE_BINARY_DIR}/CPackConfig.cmake")
+ DISTCLEAN("${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
+ DISTCLEAN("${CMAKE_BINARY_DIR}/DartConfiguration.tcl")
+
# Some files to ignore for distcheck. For this case
# only, we add CMakeLists.txt (others are handled
# by add_subdirectory wrapper
@@ -3766,6 +3631,7 @@
get_property(CMAKE_DISTCLEAN_TARGET_LIST GLOBAL PROPERTY
CMAKE_DISTCLEAN_TARGET_LIST)
list(REMOVE_DUPLICATES CMAKE_DISTCLEAN_TARGET_LIST)
configure_file("${BRLCAD_CMAKE_DIR}/distclean.cmake.in"
"${BRLCAD_BINARY_DIR}/distclean.cmake" @ONLY)
+DISTCLEAN("${BRLCAD_BINARY_DIR}/distclean.cmake")
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
add_custom_target(distclean
COMMAND ${CMAKE_COMMAND} -P "${BRLCAD_BINARY_DIR}/distclean.cmake"
@@ -3814,6 +3680,11 @@
COMMAND false
)
set_target_properties(print-warning-message PROPERTIES FOLDER "Compilation
Utilities")
+
+# NOTE: set to NEW and remove slashes after 3.19 is required
+if(POLICY CMP0110)
+ cmake_policy(SET CMP0110 OLD)
+endif(POLICY CMP0110)
add_test(NAME "NOTE:\\ some\\ 'test'\\ tests\\ are\\ expected\\ to\\ fail,\\
'regress'\\ must\\ pass" COMMAND ${CMAKE_COMMAND} --build . --target
print-warning-message)
# Local Variables:
Modified: brlcad/branches/swrast/INSTALL
===================================================================
--- brlcad/branches/swrast/INSTALL 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/INSTALL 2020-11-20 22:38:53 UTC (rev 77773)
@@ -671,16 +671,6 @@
Aliases: ENABLE_OPENNURBS
---- BRLCAD_SPSR ---
-
-Option for enabling and disabling compilation of the Screened Poisson
-Surface Reconstruction library provided with BRL-CAD's source code.
-Default is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option
-and testing first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
-
-Aliases: ENABLE_SPSR
-
-
--- BRLCAD_SC ---
Option for enabling and disabling compilation of the NIST Step Class
@@ -691,17 +681,6 @@
Aliases: ENABLE_SCL, ENABLE_STEP, ENABLE_STEP_CLASS_LIBRARIES
---- BRLCAD_VDS ---
-
-Option for enabling and disabling compilation of the libvds triangle
-simplification library provided with BRL-CAD's source code. Default
-is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
-testing first for a system version if BRLCAD_BUNDLED_LIBS is also
-AUTO.
-
-Aliases: ENABLE_VDS
-
-
--- BRLCAD_OSG ---
Option for enabling and disabling compilation of the OpenSceneGraph
@@ -712,17 +691,6 @@
Aliases: ENABLE_OPENSCENEGRAPH
---- BRLCAD_GDIAM ---
-
-Option for enabling and disabling compilation of the libgdiam approximate
-tight bounding box library provided with BRL-CAD's source code. Default
-is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
-testing first for a system version if BRLCAD_BUNDLED_LIBS is also
-AUTO.
-
-Aliases: ENABLE_GDIAM
-
-
--- BRLCAD_PROJ4 ---
Option for enabling and disabling compilation of the PROJ.4 geographic
Modified: brlcad/branches/swrast/NEWS
===================================================================
--- brlcad/branches/swrast/NEWS 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/NEWS 2020-11-20 22:38:53 UTC (rev 77773)
@@ -13,6 +13,16 @@
--- 2020-xx-xx Release 7.32.2 ---
----------------------------------------------------------------------
+* changed 'mvall' to rename all refs even w/ no object - Sean Morrison
+* fixed MGED search command crash on empty database - Sean Morrison
+* improved performance calculating BoT bounding boxes - Vikram Atreya
+* fixed MGED crash closing multiple rt views on Windows - Cliff Yapp
+* fixed 'n' key binding override with MGED key forwarding - Cliff Yapp
+* fixed mged crash when there are no display managers - Sean Morrison
+* added pixcmp -n length flag for subset comparisons - Sean Morrison
+* added pixcmp -s same and -d different printing flags - Sean Morrison
+* updated non-shape objects list for search shape filter - Cliff Yapp
+* added volume type to search -type filters - Cliff Yapp
* applied shorter default title in fast4-g conversions - Cliff Yapp
* improved pixcmp support for subset image comparisons - Sean Morrison
* added subtract subcommand to MGED analyze command - Cliff Yapp
@@ -24,6 +34,7 @@
* fixed help message for -F option on gdiff command - Cliff Yapp
* fixed mged -c bomb attaching to graphical displays - Sean Morrison
* fixed titlebar bug opening .g with filename spaces - Sean Morrison
+* added a new 'N' graphics window keybinding to run nirt - Cliff Yapp
----------------------------------------------------------------------
--- 2020-09-14 Release 7.32.0 ---
Property changes on: brlcad/branches/swrast/NEWS
___________________________________________________________________
Modified: svn:mergeinfo
## -9,4 +9,4 ##
/brlcad/branches/osg/NEWS:62110-62113
/brlcad/branches/prep-cache/NEWS:68236-68933
/brlcad/branches/tcltk86/NEWS:68300-75257
-/brlcad/trunk/NEWS:76973-77302
\ No newline at end of property
+/brlcad/trunk/NEWS:76973-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/TODO
===================================================================
--- brlcad/branches/swrast/TODO 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/TODO 2020-11-20 22:38:53 UTC (rev 77773)
@@ -174,6 +174,52 @@
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
+* extract a skin or other exterior surface for a given model. 3 options:
+ 1. Implement a "shrinkwrap" feature that calculates a concave hull
+ 2. Shoot rays from outside, construct exterior mesh based on hits
+ (akin to marching cubes, a surface reconstruction)
+ 3. Shoot rays from outside at exterior vertices, retain all mesh faces
+ and objects encountered (i.e., not reconstructed, but extracted)
+
+* RTAREA
+
+ * add an option to rtarea for onehit. this is probably best as an
+ option that reports the requested objects only and then has a
+ verbose option for the more detailed hiearchical report that is
+ currently produced.
+
+ * verify rtarea. There are reports that the rtarea
+ command may have a bug in its calculations. This needs to be
+ investigated.
+
+ * review and fix rtarea's taxonomy for describing
+ presented/projected areas. users expect presented area to
+ represent what is currently referred to as exposed area. may make
+ more sense to introduce a different terms for other shotline
+ encounters.
+
+ * make rtarea display a cross-hair and perhaps coordinates for the
+ center of area if run from within mged.
+
+=======
+ * add an option to rtarea for onehit. this is probably best as an
+ option that reports the requested objects only and then has a
+ verbose option for the more detailed hiearchical report that is
+ currently produced.
+
+ * verify rtarea. There are reports that the rtarea
+ command may have a bug in its calculations. This needs to be
+ investigated.
+
+ * review and fix rtarea's taxonomy for describing
+ presented/projected areas. users expect presented area to
+ represent what is currently referred to as exposed area. may make
+ more sense to introduce a different terms for other shotline
+ encounters.
+
+ * make rtarea display a cross-hair and perhaps coordinates for the
+ center of area if run from within mged.
+
* bot -V check solid bot.s visualizations don't show up if bot.s is
first drawn in MGED - should properly "overlay" them so the user
doesn't have to first erase the solid from the scene visual.
@@ -191,6 +237,7 @@
* procedural studio box generation allowing for specification of size,
shape, material, and lighting characteristics
+>>>>>>> .r77755
* verify all of the src/util utilities behave correctly on Windows
with respect to mode (i.e. correctly using setmode/O_BINARY when
performing file I/O.)
@@ -864,11 +911,6 @@
file for FIXME note); add tests for both functions (note only
g-dot.c wants to use the functions at the moment)
-* verify/fix/improve rtarea. There are reports that the rtarea
- command may have a bug in its calculations. This needs to be
- investigated along with a review of the taxonomy used by rtarea for
- describing presented/projected areas.
-
* eliminate dbi_filepath (perhaps replace with dbi_filedir) as we
shouldn't need to search. we were told where the database was.
@@ -1033,9 +1075,6 @@
normals. Consider adding an option to smoothly interpolate normals
(per face or vertex).
-* make rtarea display a cross-hair and perhaps coordinates for the
- center of area if run from within mged.
-
* refactor and manage libbn tolerance uses by providing an interface
default (e.g., an init macro) and making everyone use that where it
is hardcoded to 0.0005 presently (and a few places where it's
@@ -2142,8 +2181,12 @@
* implement a ls-dyna "keyword" file format importer. perhaps extract
as nmg/bot boundary representation meshes. lots of great vehicle
datasets at http://www.ncac.gwu.edu/vml/models.html
+ Update - above link seems to be down as of 2020, see:
+ https://www.nhtsa.gov/crash-simulation-vehicle-models
+ https://www.ccsa.gmu.edu/models/
+
STEP
----
Index: brlcad/branches/swrast/bench
===================================================================
--- brlcad/branches/swrast/bench 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/bench 2020-11-20 22:38:53 UTC (rev 77773)
Property changes on: brlcad/branches/swrast/bench
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg/bench:62110-62113
/brlcad/branches/prep-cache/bench:68236-68933
/brlcad/branches/tcltk86/bench:68300-75257
-/brlcad/trunk/bench:77084-77302
\ No newline at end of property
+/brlcad/trunk/bench:77084-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/bench/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/bench/CMakeLists.txt 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/bench/CMakeLists.txt 2020-11-20 22:38:53 UTC (rev
77773)
@@ -15,6 +15,7 @@
configure_file(run.sh "${CMAKE_CURRENT_BINARY_DIR}/benchmark" COPYONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/benchmark" DESTINATION
${BIN_DIR})
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/benchmark")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/benchmark-${CMAKE_CFG_INTDIR}-done
@@ -47,7 +48,7 @@
if(SH_EXEC AND TARGET m35.g)
# CTest enabled short run of the benchmark suite
- add_test(NAME benchmark COMMAND ${SH_EXEC}
"$<TARGET_FILE_DIR:bark>/benchmark" run TIMEFRAME=1)
+ BRLCAD_ADD_TEST(NAME benchmark COMMAND ${SH_EXEC}
"$<TARGET_FILE_DIR:bark>/benchmark" run TIMEFRAME=1)
set_tests_properties(benchmark PROPERTIES LABELS "Benchmark")
add_custom_target(benchmark-check
COMMAND ${CMAKE_CTEST_COMMAND} -L Benchmark --output-on-failure
Modified: brlcad/branches/swrast/bench/pixcmp.c
===================================================================
--- brlcad/branches/swrast/bench/pixcmp.c 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/bench/pixcmp.c 2020-11-20 22:38:53 UTC (rev
77773)
@@ -47,11 +47,18 @@
#define FILE_ERROR 126
/* exit codes for normal operation */
-#define OFF_BY_NONE 0
-#define OFF_BY_ONE 1
-#define OFF_BY_MANY 2
+#define EXIT_OFF_BY_NONE 0
+#define EXIT_OFF_BY_ONE 1
+#define EXIT_OFF_BY_MANY 2
+enum diff {
+ MATCHING,
+ OFF_BY_ONE,
+ OFF_BY_MANY,
+ MISSING
+};
+
HIDDEN void
usage(const char *name)
{
@@ -59,27 +66,40 @@
if (!name) {
name = unknown;
}
- /* this must be split, ISO C90 has a max static string length of 509 */
- bu_log("Usage: %s [OPTIONS] FILE1 [FILE2 [SKIP1 [SKIP2]]]\n%s", name,
- "Compare two PIX image files pixel by pixel.\n\n"
- " -l List pixel numbers and values for all pixels that differ.\n"
- " -b Output and process by bytes instead of pixels.\n"
+
+ /* split to fit within ISO C90 max static string length < 509 chars */
+ bu_log("Usage: %s [OPTIONS] FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
+ "\n"
+ " Compare two PIX files pixel by pixel (or byte by byte),
optionally"
+ " skipping initial pixels (or bytes) in one or both input files.\n"
+ "\n", name);
+ bu_log("Options:"
+ " -b Iterate and print by bytes instead of by pixels.\n"
+ " -s Print all that have the same matching values.\n"
+ " -d Print all that have different values.\n"
+ " -q Quiet. Suppress printing header and summary.\n"
" -i SKIP\n"
- " Skip the first SKIP pixels of input (for FILE1 and
FILE2)\n");
- bu_log(" -i SKIP1:SKIP2\n"
- " Skip the first SKIP1 pixels in FILE1 and SKIP2 pixels in
FILE2.\n"
- " -s Silent output. Only return an exit status.\n\n"
- "If FILE is `-' or is missing, then input is read from standard
input.\n"
- "If the `-b' option is used, SKIP values are bytes instead of
pixels.\n"
- "Pixel numbers and bytes are indexed linearly from one.\n");
+ " Discard initial SKIP pixels (or bytes w/ -b) in FILE1 and
FILE2 input.\n"
+ " -i SKIP1:SKIP2\n"
+ " Skip initial SKIP1 pixels (or bytes w/ -b) in FILE1 and
SKIP2 in FILE2.\n"
+ " -n COUNT\n"
+ " Compare COUNT pixels (or bytes w/ -b). Stops by default at
EOF.\n"
+ "\n");
+ bu_log("If either FILE is `-' or is missing, then input is read from
standard input.\n"
+ "If FILE1 and FILE2 are both standard input, then values must be
interleaved.\n"
+ "If the `-b' option is used, SKIP and COUNT values are bytes instead
of pixels.\n"
+ "Pixel numbers and bytes are indexed linearly from one.\n"
+ "\n");
return;
}
HIDDEN void
-handle_i_opt(const char *arg, size_t *skip1, size_t *skip2)
+handle_range_opt(const char *arg, size_t *skip1, size_t *skip2)
{
const char *endptr = arg;
+ long val;
+
if ((arg == NULL) || ((skip1 == NULL) && (skip2 == NULL))) {
/* nothing to do */
return;
@@ -91,12 +111,14 @@
/* probably empty string */
if (skip2) {
endptr++;
- *skip2 = strtol(endptr, NULL, 10);
+ val = strtol(endptr, NULL, 10);
+ *skip2 = (val < 0) ? 0 : val;
}
} else if ((endptr == NULL) || (endptr[0] == '\0')) {
/* no : found */
if (skip2) {
- *skip2 = strtol(arg, NULL, 10);
+ val = strtol(arg, NULL, 10);
+ *skip2 = (val < 0) ? 0 : val;
}
if (skip1 && skip2) {
*skip1 = *skip2;
@@ -104,11 +126,13 @@
} else if (endptr[0] == ':') {
/* found : */
if (skip1) {
- *skip1 = strtol(arg, NULL, 10);
+ val = strtol(arg, NULL, 10);
+ *skip1 = (val < 0) ? 0 : val;
}
if (skip2) {
endptr++; /* skip over : */
- *skip2 = strtol(endptr, NULL, 10);
+ val = strtol(endptr, NULL, 10);
+ *skip2 = (val < 0) ? 0 : val;
}
} else {
bu_exit(OPTS_ERROR, "Unexpected input processing [%s]\n", arg);
@@ -116,9 +140,65 @@
}
+HIDDEN enum diff
+compare_rgb(int r1, int g1, int b1, int r2, int g2, int b2, size_t *matching,
size_t *off1, size_t *offmany, size_t *missing)
+{
+ enum diff result = MISSING;
+
+ if ((r1 == r2 && r1 != -1)
+ && (g1 == g2 && g1 != -1)
+ && (b1 == b2 && b1 != -1))
+ {
+ result = MATCHING;
+ (*matching)++;
+ } else if (r1 == -1 || r2 == -1 || g1 == -1 || g2 == -1 || b1 == -1 || b2
== -1) {
+ /* image sizes don't match (or other I/O error) */
+ result = MISSING;
+ (*missing)++;
+ } else if (((r1 != r2) && (g1 == g2) && (b1 == b2))
+ || ((r1 == r2) && (g1 != g2) && (b1 == b2))
+ || ((r1 == r2) && (g1 == g2) && (b1 != b2)))
+ {
+ /* off by one channel */
+ if (r1 != r2) {
+ if ((r1 > r2 ? r1 - r2 : r2 - r1) > 1) {
+ result = OFF_BY_MANY;
+ (*offmany)++;
+ } else {
+ result = OFF_BY_ONE;
+ (*off1)++;
+ }
+ } else if (g1 != g2) {
+ if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
+ result = OFF_BY_MANY;
+ (*offmany)++;
+ } else {
+ result = OFF_BY_ONE;
+ (*off1)++;
+ }
+ } else if (b1 != b2) {
+ if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
+ result = OFF_BY_MANY;
+ (*offmany)++;
+ } else {
+ result = OFF_BY_ONE;
+ (*off1)++;
+ }
+ }
+ } else {
+ result = OFF_BY_MANY;
+ (*offmany)++;
+ }
+
+ return result;
+}
+
+
int
main(int argc, char *argv[])
{
+ const char *argv0 = argv[0];
+
FILE *f1 = NULL;
FILE *f2 = NULL;
struct stat sf1 = {0};
@@ -127,35 +207,50 @@
size_t matching = 0;
size_t off1 = 0;
size_t offmany = 0;
+ size_t missing = 0;
int c;
- int list_pixel_values = 0;
+ int list_diff = 0;
+ int list_same = 0;
int print_bytes = 0;
- int silent = 0;
+ int quiet = 0;
+
+ size_t bytes = 0;
size_t f1_skip = 0;
size_t f2_skip = 0;
- size_t bytes = 0;
+ size_t stop_after = 0;
bu_setprogname(argv[0]);
/* process opts */
- while ((c = bu_getopt(argc, argv, "lbi:s")) != -1) {
+ while ((c = bu_getopt(argc, argv, "sdbi:n:q?")) != -1) {
switch (c) {
- case 'l':
- list_pixel_values = 1;
+ case 's':
+ list_same = 1;
break;
+ case 'd':
+ list_diff = 1;
+ break;
case 'b':
print_bytes = 1;
break;
case 'i':
- handle_i_opt(bu_optarg, &f1_skip, &f2_skip);
+ handle_range_opt(bu_optarg, &f1_skip, &f2_skip);
break;
- case 's':
- silent = 1;
+ case 'n':
+ {
+ long num = strtol(bu_optarg, NULL, 10);
+ stop_after = (num < 0) ? 0 : num;
break;
+ }
+ case 'q':
+ quiet = 1;
+ break;
+ case '?':
+ case 'h':
+ usage(argv0);
+ return 0;
default:
- bu_log("\n");
- usage(argv[0]);
exit(OPTS_ERROR);
}
}
@@ -165,17 +260,17 @@
/* validate what is left over */
if (argc < 1 || argc > 4) {
bu_log("ERROR: incorrect number of arguments provided\n\n");
- usage(argv[0]);
+ usage(argv0);
exit(OPTS_ERROR);
}
if ((argc > 0 && !argv[0]) || (argc > 1 && !argv[1])) {
bu_log("ERROR: bad filename\n\n");
- usage(argv[0]);
+ usage(argv0);
exit(OPTS_ERROR);
}
if ((argc > 2 && !argv[2]) || (argc > 3 && !argv[3])) {
bu_log("ERROR: bad skip value\n\n");
- usage(argv[0]);
+ usage(argv0);
exit(OPTS_ERROR);
}
@@ -187,13 +282,24 @@
} else {
snprintf(range, 64, "%s", argv[2]);
}
- handle_i_opt(range, &f1_skip, &f2_skip);
+ handle_range_opt(range, &f1_skip, &f2_skip);
}
- /* printf("Skip from FILE1: %ld and from FILE2: %ld\n", f1_skip, f2_skip);
*/
if (!print_bytes) {
+ if ((f1_skip > ((size_t)-1)/3)
+ || (f2_skip > ((size_t)-1)/3))
+ {
+ bu_log("ERROR: overflow, -i skip value(s) are too big {%zu:%zu}\n",
f1_skip, f2_skip);
+ exit(OPTS_ERROR);
+ }
f1_skip *= 3;
f2_skip *= 3;
+ if (stop_after > ((size_t)-1)/3)
+ {
+ bu_log("ERROR: overflow, -n number is too big {%zu}\n", stop_after);
+ exit(OPTS_ERROR);
+ }
+ stop_after *= 3;
}
if (BU_STR_EQUAL(argv[0], "-")) {
@@ -202,6 +308,7 @@
perror(argv[0]);
exit(FILE_ERROR);
}
+
if ((argc < 2) || BU_STR_EQUAL(argv[1], "-")) {
f2 = stdin;
} else if ((f2 = fopen(argv[1], "rb")) == NULL) {
@@ -209,115 +316,155 @@
exit(FILE_ERROR);
}
+ setmode(fileno(stdin), O_BINARY);
+ /* we're writing out ascii */
+ /* setmode(fileno(stdout), O_BINARY); */
+
+ if (f1_skip != f2_skip && f1 == stdin && f2 == stdin) {
+ bu_exit(OPTS_ERROR, "ERROR: cannot skip the same input stream by
different amounts\n");
+ }
+
fstat(fileno(f1), &sf1);
fstat(fileno(f2), &sf2);
- if ((sf1.st_size - f1_skip) != (sf2.st_size - f2_skip)) {
+ bu_log("FILE1_size(%zu) FILE1_skip(%zu) FILE2_size(%zu)
FILE2_skip(%zu)\n", (size_t)sf1.st_size, f1_skip, (size_t)sf2.st_size, f2_skip);
+
+ if (!quiet && ((sf1.st_size - f1_skip) != (sf2.st_size - f2_skip))) {
bu_log("WARNING: Different image sizes detected\n");
if (print_bytes) {
- bu_log("\t%s: %7zu bytes (%8zu bytes, skipping %7zu)\n",
- argv[0], sf1.st_size - f1_skip, sf1.st_size, f1_skip);
- bu_log("\t%s: %7zu bytes (%8zu bytes, skipping %7zu)\n",
- argv[1], sf2.st_size - f2_skip, sf2.st_size, f2_skip);
+ bu_log("\t%s: %7llu bytes (%8llu bytes, skipping %7llu)\n",
+ argv[0], (unsigned long long)(sf1.st_size - f1_skip),
(unsigned long long)sf1.st_size, (unsigned long long)f1_skip);
+ bu_log("\t%s: %7llu bytes (%8llu bytes, skipping %7llu)\n",
+ argv[1], (unsigned long long)(sf2.st_size - f2_skip),
(unsigned long long)sf2.st_size, (unsigned long long)f2_skip);
} else {
- bu_log("\t%s: %7zu pixels (%8zu bytes, skipping %7zu)\n",
- argv[0], (sf1.st_size - f1_skip)/3, sf1.st_size, f1_skip);
- bu_log("\t%s: %7zu pixels (%8zu bytes, skipping %7zu)\n",
- argv[1], (sf2.st_size - f2_skip)/3, sf2.st_size, f2_skip);
+ bu_log("\t%s: %7llu pixels (%8llu bytes, skipping %7llu)\n",
+ argv[0], (unsigned long long)((sf1.st_size - f1_skip)/3),
(unsigned long long)sf1.st_size, (unsigned long long)f1_skip);
+ bu_log("\t%s: %7llu pixels (%8llu bytes, skipping %7llu)\n",
+ argv[1], (unsigned long long)((sf2.st_size - f2_skip)/3),
(unsigned long long)sf2.st_size, (unsigned long long)f2_skip);
}
- bu_exit(1, "ERROR: Cannot pixcmp due to different images sizes
(unimplemented).\n");
}
+ /* make sure we read all bytes */
+ if (stop_after == 0) {
+ stop_after = FMAX((sf1.st_size - f1_skip), (sf2.st_size - f2_skip));
+ if (f1 == stdin && f2 == stdin) {
+ /* dual stdin is interleaved */
+ stop_after = (stop_after+1)/2;
+ }
+ }
+
+ /*
+ bu_log("mode is [%d] and [%d]\n", S_ISFIFO(sf1.st_mode),
S_ISFIFO(sf2.st_mode));
+ bu_log("tty is [%d] and [%d]\n", isatty(fileno(f1)), isatty(fileno(f2)));
+ */
+
/* skip requested pixels/bytes in FILE1 */
- if (f1_skip && fseek(f1, f1_skip, SEEK_SET)) {
- bu_log("ERROR: Unable to seek %zd %s%s in FILE1\n",
- f1_skip,
- print_bytes?"byte":"pixel",
- f1_skip==1?"":"s");
- perror("FILE1 fseek failure");
- exit(FILE_ERROR);
+ if (f1_skip) {
+ if (S_ISFIFO(sf1.st_mode)) {
+ size_t skipped = 0;
+ for (skipped = 0; skipped < f1_skip; skipped++) {
+ (void)fgetc(f1);
+ }
+ } else if (fseek(f1, f1_skip, SEEK_SET)) {
+ bu_log("ERROR: Unable to seek %zd %s%s in FILE1\n",
+ f1_skip,
+ print_bytes?"byte":"pixel",
+ f1_skip==1?"":"s");
+ perror("FILE1 fseek failure");
+ exit(FILE_ERROR);
+ }
}
/* skip requested pixels in FILE2 */
- if (f2_skip && fseek(f2, f2_skip, SEEK_SET)) {
- bu_log("ERROR: Unable to seek %zd %s%s in FILE2\n",
- f1_skip,
- print_bytes?"byte":"pixel",
- f1_skip==1?"":"s");
- perror("FILE2 fseek failure");
- exit(FILE_ERROR);
+ if (f2_skip) {
+ if (S_ISFIFO(sf2.st_mode)) {
+ size_t skipped = 0;
+ for (skipped = 0; skipped < f2_skip; skipped++) {
+ (void)fgetc(f2);
+ }
+ } else if (fseek(f2, f2_skip, SEEK_SET)) {
+ bu_log("ERROR: Unable to seek %zd %s%s in FILE2\n",
+ f2_skip,
+ print_bytes?"byte":"pixel",
+ f2_skip==1?"":"s");
+ perror("FILE2 fseek failure");
+ exit(FILE_ERROR);
+ }
}
+ /* print header to stderr, output to stdout */
+ if (!quiet && (list_same || list_diff)) {
+ if (print_bytes) {
+ bu_log("#Byte FILE1 FILE2 LABEL\n");
+ } else {
+ bu_log("#Pixel\t(FILE1 R, G, B) (FILE2 R, G, B)\n");
+ }
+ }
+
/* iterate over the pixels/bytes in the files */
- while ((!feof(f1) && !feof(f2)) &&
- (!ferror(f1) && !ferror(f2))) {
- register int r1, r2, g1, g2, b1, b2;
+ while (bytes < stop_after) {
+ enum diff result;
+ int r1, r2, g1, g2, b1, b2;
r1 = r2 = g1 = g2 = b1 = b2 = -1;
+ /* bu_log("\tbytes[%zu] < stop[%zu\n", bytes, stop_after); */
+
r1 = fgetc(f1);
r2 = fgetc(f2);
- if (feof(f1) || feof(f2)) break;
bytes++;
- if (!print_bytes) {
+
+ if (print_bytes) {
+ /* replicate */
+ b1 = g1 = 0;
+ b2 = g2 = 0;
+ } else {
g1 = fgetc(f1);
g2 = fgetc(f2);
- if (feof(f1) || feof(f2)) break;
bytes++;
b1 = fgetc(f1);
b2 = fgetc(f2);
- if (feof(f1) || feof(f2)) break;
bytes++;
}
- if ((r1 == r2) && (g1 == g2) && (b1 == b2)) {
- matching++;
- continue;
- }
+ result = compare_rgb(r1, g1, b1, r2, g2, b2, &matching, &off1,
&offmany, &missing);
- /* tabulate differing pixels */
- if (((r1 != r2) && (g1 == g2) && (b1 == b2)) ||
- ((r1 == r2) && (g1 != g2) && (b1 == b2)) ||
- ((r1 == r2) && (g1 == g2) && (b1 != b2))) {
- /* off by one channel */
- if (r1 != r2) {
- if ((r1 > r2 ? r1 - r2 : r2 - r1) > 1) {
- offmany++;
- } else {
- off1++;
- }
- } else if (g1 != g2) {
- if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
- offmany++;
- } else {
- off1++;
- }
- } else if (b1 != b2) {
- if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
- offmany++;
- } else {
- off1++;
- }
+ /* print them? */
+ if ((result==MATCHING && list_same)
+ || (result!=MATCHING && list_diff))
+ {
+ const char *label = NULL;
+ switch (result) {
+ case MATCHING:
+ label = "MATCHING";
+ break;
+ case OFF_BY_MANY:
+ label = "OFF_BY_MANY";
+ break;
+ case OFF_BY_ONE:
+ label = "OFF_BY_ONE";
+ break;
+ case MISSING:
+ default:
+ label = "MISSING";
+ break;
}
- } else {
- /* off by many */
- offmany++;
- }
-
- /* they're different, so print something */
- if (list_pixel_values) {
if (print_bytes) {
- printf("%ld %3d %3d\n", bytes, r1, r2);
+ printf("%ld %3d %3d %s\n", bytes, r1, r2, label);
} else {
- printf("%ld\t(%3d, %3d, %3d)\t(%3d, %3d, %3d)\n", bytes / 3,
r1, g1, b1, r2, g2, b2);
+ printf("%ld\t(%3d, %3d, %3d)\t(%3d, %3d, %3d) %s\n", bytes / 3,
r1, g1, b1, r2, g2, b2, label);
}
}
}
/* print summary */
- if (!silent) {
- printf("pixcmp %s: %8zd matching, %8zd off by 1, %8zd off by many\n",
- print_bytes?"bytes":"pixels",
- matching, off1, offmany);
+ if (!quiet) {
+ printf("pixcmp %s: %8zd matching, %8zd off by 1, %8zd off by many",
+ print_bytes?"bytes":"pixels", matching, off1, offmany);
+ if (missing) {
+ printf(", %8zd missing\n", missing);
+ } else {
+ printf("\n");
+ }
}
/* check for errors */
@@ -326,21 +473,16 @@
return FILE_ERROR;
}
- /* if files were of different lengths, consider it an error */
- if (feof(f1) != feof(f2)) {
- return FILE_ERROR;
- }
-
/* indicate how many differences there were overall */
- if (offmany) {
- return OFF_BY_MANY;
+ if (offmany || missing) {
+ return EXIT_OFF_BY_MANY;
}
if (off1) {
- return OFF_BY_ONE;
+ return EXIT_OFF_BY_ONE;
}
/* Success! */
- return OFF_BY_NONE;
+ return EXIT_OFF_BY_NONE;
}
Modified: brlcad/branches/swrast/bench/run.sh
===================================================================
--- brlcad/branches/swrast/bench/run.sh 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/bench/run.sh 2020-11-20 22:38:53 UTC (rev 77773)
@@ -608,17 +608,18 @@
"$RT"
$ECHO
$ECHO "ERROR: RT does not seem to work as expected"
- $ECHO " (output was [$out])"
+ $ECHO " (returned $ret, output was [$out])"
exit 2
fi
# sanity check: make sure $CMP runs
-out=`echo "" | eval \"$CMP\" - - 2>&1`
+out=`eval \"$CMP\" - - 2>&1 <<EOF
+EOF`
ret=$?
if test ! "x${ret}" = "x0" ; then
$ECHO
$ECHO "ERROR: CMP does not seem to work as expected"
- $ECHO " (output was [$out])"
+ $ECHO " (returned $ret, output was [$out])"
exit 2
fi
@@ -627,7 +628,7 @@
if test ! "x${ret}" = "x0" ; then
$ECHO
$ECHO "ERROR: ELP does not seem to work as expected"
- $ECHO " (output was [$out])"
+ $ECHO " (returned $ret, output was [$out])"
exit 2
fi
@@ -1140,7 +1141,7 @@
ls -la *.pix*
fi
$VERBOSE_ECHO "DEBUG: $CMP $PIX/${bench_testname}.pix
${bench_testname}.pix"
- cmp_result="`eval \\\"${CMP}\\\" \\\"${PIX}/${bench_testname}.pix\\\"
${bench_testname}.pix 2>&1`"
+ cmp_result="`eval \\\"${CMP}\\\" \\\"${PIX}/${bench_testname}.pix\\\"
${bench_testname}.pix 2>&1 | grep pixels`"
ret=$?
$ECHO "$cmp_result"
Modified: brlcad/branches/swrast/configure
===================================================================
--- brlcad/branches/swrast/configure 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/configure 2020-11-20 22:38:53 UTC (rev 77773)
@@ -166,10 +166,6 @@
shift;;
--disable-opennurbs) options="$options
-DBRLCAD_OPENNURBS=SYSTEM";
shift;;
- --enable-spsr) options="$options -DBRLCAD_SPSR=BUNDLED";
- shift;;
- --disable-spsr) options="$options -DBRLCAD_SPSR=SYSTEM";
- shift;;
--enable-scl) options="$options -DBRLCAD_SC=BUNDLED";
shift;;
--disable-scl) options="$options -DBRLCAD_SC=SYSTEM";
@@ -182,18 +178,10 @@
shift;;
--disable-step-class-libraries) options="$options
-DBRLCAD_SC=SYSTEM";
shift;;
- --enable-vds) options="$options -DBRLCAD_VDS=BUNDLED";
- shift;;
- --disable-vds) options="$options -DBRLCAD_VDS=SYSTEM";
- shift;;
--enable-openscenegraph) options="$options
-DBRLCAD_OSG=BUNDLED";
shift;;
--disable-openscenegraph) options="$options
-DBRLCAD_OSG=SYSTEM";
shift;;
- --enable-gdiam) options="$options -DBRLCAD_GDIAM=BUNDLED";
- shift;;
- --disable-gdiam) options="$options -DBRLCAD_GDIAM=SYSTEM";
- shift;;
--enable-proj4) options="$options -DBRLCAD_PROJ4=BUNDLED";
shift;;
--disable-proj4) options="$options -DBRLCAD_PROJ4=SYSTEM";
Index: brlcad/branches/swrast/db
===================================================================
--- brlcad/branches/swrast/db 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/db 2020-11-20 22:38:53 UTC (rev 77773)
Property changes on: brlcad/branches/swrast/db
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg/db:62110-62113
/brlcad/branches/prep-cache/db:68236-68933
/brlcad/branches/tcltk86/db:68300-75257
-/brlcad/trunk/db:77084-77223
\ No newline at end of property
+/brlcad/trunk/db:77084-77223,77303-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/db/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/db/CMakeLists.txt 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/db/CMakeLists.txt 2020-11-20 22:38:53 UTC (rev
77773)
@@ -57,6 +57,7 @@
set(OUTPUT_FILE "${output_file}")
# Use the model name for the script, since the output file is specific to
this input
configure_file("${CMAKE_SOURCE_DIR}/db/conv_run.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
+ DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
# Define the target
add_custom_command(
@@ -158,6 +159,7 @@
pic.asc
pinewood.asc
prim.asc
+ radialgrid.asc
rounds.asc
tank_car.asc
terra.asc
@@ -226,12 +228,13 @@
${G_SAMPLE_MODELS}
CMakeLists.txt
aet.rt
+ conv_run.cmake.in
cornell.rt
cube.rt
db.php
include/ctype.inc
include/debug.inc
-)
+ )
# Local Variables:
# tab-width: 8
Copied: brlcad/branches/swrast/db/radialgrid.asc (from rev 77772,
brlcad/trunk/db/radialgrid.asc)
===================================================================
--- brlcad/branches/swrast/db/radialgrid.asc (rev 0)
+++ brlcad/branches/swrast/db/radialgrid.asc 2020-11-20 22:38:53 UTC (rev
77773)
@@ -0,0 +1,36 @@
+title {Sample geometry with a radial gridlines and a shadow-casting light}
+units m
+put {cylinder.r} comb region yes tree {- {- {- {- {- {l c1.tgc} {l c1i.tgc}}
{l c1c1.arb8}} {l c1c2.arb8}} {l c1c3.tgc}} {l c1c4.tgc}}
+attr set {cylinder.r} {region} {R} {region_id} {1003} {material_id} {1} {los}
{100}
+put {50m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a
50000 r_h 100
+put {40m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a
40000 r_h 100
+put {30m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a
30000 r_h 100
+put {20m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a
20000 r_h 100
+put {10m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a
10000 r_h 100
+put {c1c2.arb8} arb8 V1 {-1449.999999999999545252649
-99.99999999999998578914528 0} V2 {-1449.999999999999545252649 100 0} V3
{-1449.999999999999545252649 100 1900} V4 {-1449.999999999999545252649
-99.99999999999998578914528 1900} V5 {-449.9999999999999431565811
-99.99999999999998578914528 0} V6 {-449.9999999999999431565811 100 0} V7
{-449.9999999999999431565811 100 1900} V8 {-449.9999999999999431565811
-99.99999999999998578914528 1900}
+put {c1c1.arb8} arb8 V1 {1450 -500 1250} V2 {1450 500 1250} V3 {1450 500
1750} V4 {1450 -500 1750} V5 {450 -500 1250} V6 {450 500 1250} V7 {450 500
1750} V8 {450 -500 1750}
+put {ground.s} arb8 V1 {60000.00000000002182787284 -60000.00000000002182787284
-100} V2 {60000.00000000002182787284 60000.00000000002182787284 -100} V3
{60000.00000000002182787284 60000.00000000002182787284 0} V4
{60000.00000000002182787284 -60000.00000000002182787284 0} V5
{-60000.00000000001455191523 -60000.00000000002182787284 -100} V6
{-60000.00000000001455191523 60000.00000000002182787284 -100} V7
{-60000.00000000001455191523 60000.00000000002182787284 0} V8
{-60000.00000000001455191523 -60000.00000000002182787284 0}
+put {ground.r} comb region yes tree {l ground.s}
+attr set {ground.r} {region} {R} {region_id} {1000} {material_id} {1} {los}
{100} {color} {0/255/0}
+put {c1c4.tgc} tgc V {-6.123233995736766242944808E-14 -500 1000} H {0 -1000
6.123233995736767505122256E-14} A {200 0 0} B {0
1.224646799147353374806706E-14 -200} C {200 0 0} D {0
1.224646799147353374806706E-14 -200}
+put {c1c3.tgc} tgc V {0 500 1500} H {0 1000 6.123233995736764980767359E-14}
A {200 0 0} B {0 1.224646799147353374806706E-14 -200} C {200 0 0} D {0
1.224646799147353374806706E-14 -200}
+put {165deg.s} tgc V {53125.92044589875149540603 -14235.04748063865554286167
0} H {-106251.8408917975175427273 28470.09496127731472370215
6.735557395310443447840915E-12} A {-5.91458985689334876413324E-15
1.584809575715884060677382E-15 -100} B {-25.88190451025210236934981
-96.59258262890682544821175 0} C {-5.91458985689334876413324E-15
1.584809575715884060677382E-15 -100} D {-25.88190451025210236934981
-96.59258262890682544821175 0}
+put {135deg.s} tgc V {38890.87296526011050445959 -38890.8729652601177804172 0}
H {-77781.74593052023556083441 77781.74593052025011274964
6.735557395310443447840915E-12} A {-4.329780281177466281177668E-15
4.329780281177467070038573E-15 -100} B {-70.71067811865475505328504
-70.71067811865474084243033 0} C {-4.329780281177466281177668E-15
4.329780281177467070038573E-15 -100} D {-70.71067811865475505328504
-70.71067811865474084243033 0}
+put {105deg.s} tgc V {14235.04748063864644791465 -53125.92044589875877136365
0} H {-28470.09496127729653380811 106251.8408917975320946425
6.735557395310443447840915E-12} A {-1.58480957571588307460125E-15
5.914589856893349552994145E-15 -100} B {-96.59258262890682544821175
-25.88190451025208460578142 0} C {-1.58480957571588307460125E-15
5.914589856893349552994145E-15 -100} D {-96.59258262890682544821175
-25.88190451025208460578142 0}
+put {150deg.s} tgc V {47631.39720814413158223033 -27499.99999999999636202119
0} H {-95262.79441628826316446066 55000 6.735557395310443447840915E-12} A
{-5.302876193624534820650073E-15 3.061616997868382648155861E-15 -100} B
{-49.99999999999999289457264 -86.60254037844387653422018 0} C
{-5.302876193624534820650073E-15 3.061616997868382648155861E-15 -100} D
{-49.99999999999999289457264 -86.60254037844387653422018 0}
+put {120deg.s} tgc V {27499.99999999998908606358 -47631.39720814413158223033
0} H {-54999.99999999998544808477 95262.79441628826316446066
6.735557395310443447840915E-12} A {-3.061616997868381859294956E-15
5.302876193624534820650073E-15 -100} B {-86.60254037844387653422018
-49.99999999999997868371793 0} C {-3.061616997868381859294956E-15
5.302876193624534820650073E-15 -100} D {-86.60254037844387653422018
-49.99999999999997868371793 0}
+put {light.s} ell V {0 0 1500} A {10 0 0} B {0 10 0} C {0 0 10}
+put {light.r} comb region yes tree {l light.s}
+attr set {light.r} {oshader} {light {f 10 s 32 v 0}} {region} {R} {shader}
{light {f 10.0 s 32 v 0}} {region_id} {1002} {material_id} {1} {los} {100}
{color} {255/255/255}
+put {c1i.tgc} tgc V {0 0 0} H {0 0 1900} A {900 0 0} B {0 900 0} C {900 0
0} D {0 900 0}
+put {75deg.s} tgc V {-14235.04748063864099094644 -53125.92044589875877136365
0} H {28470.09496127728561987169 106251.8408917975320946425
6.735557395310443447840915E-12} A {1.584809575715882482955572E-15
5.914589856893349552994145E-15 -100} B {-96.59258262890682544821175
25.88190451025207394764038 0} C {1.584809575715882482955572E-15
5.914589856893349552994145E-15 -100} D {-96.59258262890682544821175
25.88190451025207394764038 0}
+put {45deg.s} tgc V {-38890.8729652601177804172 -38890.8729652601177804172 0}
H {77781.74593052025011274964 77781.74593052025011274964
6.735557395310443447840915E-12} A {4.329780281177467070038573E-15
4.329780281177467070038573E-15 -100} B {-70.71067811865475505328504
70.71067811865475505328504 0} C {4.329780281177467070038573E-15
4.329780281177467070038573E-15 -100} D {-70.71067811865475505328504
70.71067811865475505328504 0}
+put {15deg.s} tgc V {-53125.92044589875877136365 -14235.04748063864099094644
0} H {106251.8408917975320946425 28470.09496127728561987169
6.735557395310443447840915E-12} A {5.914589856893349552994145E-15
1.584809575715882482955572E-15 -100} B {-25.88190451025207394764038
96.59258262890682544821175 0} C {5.914589856893349552994145E-15
1.584809575715882482955572E-15 -100} D {-25.88190451025207394764038
96.59258262890682544821175 0}
+put {90deg.s} tgc V {-3.367778697655221320023674E-12 -55000 0} H
{6.735557395310443447840915E-12 110000.0000000000145519152
6.735557395310443447840915E-12} A {3.749399456654643800636173E-31
6.123233995736766085172627E-15 -100} B {-100 6.123233995736766085172627E-15 0}
C {3.749399456654643800636173E-31 6.123233995736766085172627E-15 -100} D
{-100 6.123233995736766085172627E-15 0}
+put {60deg.s} tgc V {-27500.00000000000727595761 -47631.39720814412430627272
0} H {55000.00000000002182787284 95262.79441628826316446066
6.735557395310443447840915E-12} A {3.061616997868383437016766E-15
5.302876193624534031789167E-15 -100} B {-86.60254037844386232336547
50.00000000000001421085472 0} C {3.061616997868383437016766E-15
5.302876193624534031789167E-15 -100} D {-86.60254037844386232336547
50.00000000000001421085472 0}
+put {30deg.s} tgc V {-47631.39720814413158223033 -27499.99999999999636202119
0} H {95262.79441628826316446066 55000 6.735557395310443447840915E-12} A
{5.302876193624534820650073E-15 3.061616997868382253725408E-15 -100} B
{-49.99999999999999289457264 86.60254037844387653422018 0} C
{5.302876193624534820650073E-15 3.061616997868382253725408E-15 -100} D
{-49.99999999999999289457264 86.60254037844387653422018 0}
+put {grid.r} comb region yes tree {u {u {u {u {u {l 50m_ring.s} {l
40m_ring.s}} {u {l 30m_ring.s} {l 20m_ring.s}}} {u {u {l 10m_ring.s} {l
0deg.s}} {u {l 15deg.s} {l 30deg.s}}}} {u {u {u {l 45deg.s} {l 60deg.s}} {u {l
75deg.s} {l 90deg.s}}} {u {u {l 105deg.s} {l 120deg.s}} {u {l 135deg.s} {l
150deg.s}}}}} {l 165deg.s}}
+attr set {grid.r} {region} {R} {shader} {plastic} {region_id} {1001}
{material_id} {1} {los} {100} {color} {255/255/255}
+put {c1.tgc} tgc V {0 0 0} H {0 0 2000} A {1000 0 0} B {0 1000 0} C {1000
0 0} D {0 1000 0}
+put {0deg.s} tgc V {-55000 0 0} H {110000.0000000000145519152 0
6.735557395310443447840915E-12} A {6.123233995736766085172627E-15 0 -100} B
{0 100 0} C {6.123233995736766085172627E-15 0 -100} D {0 100 0}
+put {all.g} comb region no tree {u {u {u {- {l ground.r} {l grid.r}} {- {l
grid.r} {l c1.tgc}}} {l cylinder.r}} {l light.r}}
Index: brlcad/branches/swrast/doc
===================================================================
--- brlcad/branches/swrast/doc 2020-11-20 22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/doc 2020-11-20 22:38:53 UTC (rev 77773)
Property changes on: brlcad/branches/swrast/doc
___________________________________________________________________
Modified: svn:mergeinfo
## -9,4 +9,4 ##
/brlcad/branches/osg/doc:62110-62113
/brlcad/branches/prep-cache/doc:68236-68933
/brlcad/branches/tcltk86/doc:68300-75257
-/brlcad/trunk/doc:76973-77302
\ No newline at end of property
+/brlcad/trunk/doc:76973-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/doc/BRL-CAD.bib
===================================================================
--- brlcad/branches/swrast/doc/BRL-CAD.bib 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/doc/BRL-CAD.bib 2020-11-20 22:38:53 UTC (rev
77773)
@@ -2246,6 +2246,19 @@
timestamp = {2018.06.06}
}
+@TECHREPORT{Dean18a,
+ author = {Dean, Allen and Thomas, Jr., John},
+ title = {Development of Large and Small Missile Target Models},
+ institution = {United States Air Force Research Laboratory, Munitions
Directorate},
+ year = {2018},
+ month = dec,
+ number = {AFRL-RW-EG-TR-2018-100},
+ address = {Air Force Research Laboratory, Eglin Air Force Base, FL
32542-6810},
+ note = {Distribution authorized to Department of Defense and U.S. DoD
contractors only; critical technology; distribution limitations applied
November 2018. Other requests must be referred to AFRL/RWML, Eglin AFB FL
32542-5910.},
+ owner = {morrison},
+ timestamp = {2020.10.30}
+}
+
@comment{jabref-meta: selector_journal:}
@comment{jabref-meta: selector_author:}
Modified: brlcad/branches/swrast/doc/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/doc/CMakeLists.txt 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/doc/CMakeLists.txt 2020-11-20 22:38:53 UTC (rev
77773)
@@ -203,6 +203,7 @@
ADD_DOC(documentation_mged_old_DATA mged_old)
configure_file(pad_file.xml.in "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml"
@ONLY)
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml" DESTINATION
${DOC_DIR})
CMAKEFILES(
Modified: brlcad/branches/swrast/doc/README.Windows
===================================================================
--- brlcad/branches/swrast/doc/README.Windows 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/doc/README.Windows 2020-11-20 22:38:53 UTC (rev
77773)
@@ -86,6 +86,18 @@
look for Windows SDK installs in the "Apps & Features" Setup
interface.
+=======================================================
+
+=== Tracking down the source of a header inclusion ===
+
+If a Windows system header is reporting an error, it can be helpful to
+identify where the header is being included from. By default MSVC
+doesn't report this, but in Visual Studio there is a "ShowIncludes"
+setting that may be enabled to find this information:
+
+https://stackoverflow.com/a/1138045
+
+
===========================================
=== Notes on Visual Studio 14 2015 ===
Modified: brlcad/branches/swrast/doc/docbook/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/doc/docbook/CMakeLists.txt 2020-11-20 22:33:37 UTC
(rev 77772)
+++ brlcad/branches/swrast/doc/docbook/CMakeLists.txt 2020-11-20 22:38:53 UTC
(rev 77773)
@@ -17,6 +17,7 @@
# Apache FOP needs a couple of config files set up
set(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(${CMAKE_SOURCE_DIR}/doc/docbook/fop.xconf.in
${CMAKE_BINARY_DIR}/doc/docbook/fop.xconf)
+ DISTCLEAN("${CMAKE_BINARY_DIR}/doc/docbook/fop.xconf")
endif(BRLCAD_EXTRADOCS_PDF)
# For the html files, we need brlcad.css
Index: brlcad/branches/swrast/doc/docbook/articles
===================================================================
--- brlcad/branches/swrast/doc/docbook/articles 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/doc/docbook/articles 2020-11-20 22:38:53 UTC (rev
77773)
Property changes on: brlcad/branches/swrast/doc/docbook/articles
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,4 ##
/brlcad/branches/RELEASE/doc/docbook/articles:70323-70333,71915-72242,72525-72534,72826-72858,74376-74454
/brlcad/branches/brep-debug/doc/docbook/articles:69168,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
-/brlcad/branches/tcltk86/doc/docbook/articles:68300-75257
\ No newline at end of property
+/brlcad/branches/tcltk86/doc/docbook/articles:68300-75257
+/brlcad/trunk/doc/docbook/articles:77303-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/doc/docbook/articles/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/doc/docbook/articles/CMakeLists.txt 2020-11-20
22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/doc/docbook/articles/CMakeLists.txt 2020-11-20
22:38:53 UTC (rev 77773)
@@ -2,11 +2,13 @@
if(BRLCAD_EXTRADOCS_HTML)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_HTML)
if(BRLCAD_EXTRADOCS_PHP)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PHP)
# Files for PDF products
@@ -14,6 +16,7 @@
# Style sheet for XSLT transformation to PDF
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-article-fo-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-fo-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-article-fo-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PDF)
# For HTML and FO (FO is an intermediate file used in the
Modified: brlcad/branches/swrast/doc/docbook/articles/mged.xml
===================================================================
--- brlcad/branches/swrast/doc/docbook/articles/mged.xml 2020-11-20
22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/doc/docbook/articles/mged.xml 2020-11-20
22:38:53 UTC (rev 77773)
@@ -2715,6 +2715,14 @@
</row>
<row>
<entry>
+ N
+ </entry>
+ <entry>
+ shoot a ray with nirt
+ </entry>
+ </row>
+ <row>
+ <entry>
< F1 >
</entry>
<entry>
Index: brlcad/branches/swrast/doc/docbook/books
===================================================================
--- brlcad/branches/swrast/doc/docbook/books 2020-11-20 22:33:37 UTC (rev
77772)
+++ brlcad/branches/swrast/doc/docbook/books 2020-11-20 22:38:53 UTC (rev
77773)
Property changes on: brlcad/branches/swrast/doc/docbook/books
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,4 ##
/brlcad/branches/RELEASE/doc/docbook/books:70323-70333,71915-72242,72525-72534,72826-72858,74376-74454
/brlcad/branches/brep-debug/doc/docbook/books:69168,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
-/brlcad/branches/tcltk86/doc/docbook/books:68300-75257
\ No newline at end of property
+/brlcad/branches/tcltk86/doc/docbook/books:68300-75257
+/brlcad/trunk/doc/docbook/books:77303-77772
\ No newline at end of property
Modified: brlcad/branches/swrast/doc/docbook/books/CMakeLists.txt
===================================================================
--- brlcad/branches/swrast/doc/docbook/books/CMakeLists.txt 2020-11-20
22:33:37 UTC (rev 77772)
+++ brlcad/branches/swrast/doc/docbook/books/CMakeLists.txt 2020-11-20
22:38:53 UTC (rev 77773)
@@ -2,11 +2,13 @@
if(BRLCAD_EXTRADOCS_HTML)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_HTML)
if(BRLCAD_EXTRADOCS_PHP)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PHP)
# Files for PDF products
@@ -14,6 +16,7 @@
# Style sheet for XSLT transformation to PDF
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-book-fo-stylesheet.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-fo-stylesheet.xsl)
+
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-book-fo-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PDF)
# For HTML and FO (FO is an intermediate file used in the
@@ -89,10 +92,12 @@
set(CURRENT_TITLE "An Overview of BRL-CAD")
configure_file(${CMAKE_SOURCE_DIR}/doc/docbook/resources/brlcad/tutorial-cover-template.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI-cover.xsl @ONLY)
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI-cover.xsl")
string(REPLACE " " "%20" TUTORIAL_COVER_XSL
${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI-cover.xsl)
configure_file(${CMAKE_SOURCE_DIR}/doc/docbook/resources/brlcad/tutorial-template.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI.xsl @ONLY)
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI.xsl")
set(XSL_FO_STYLESHEET
"${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeI.xsl")
@@ -103,10 +108,12 @@
set(CURRENT_TITLE "Introduction to MGED")
configure_file(${CMAKE_SOURCE_DIR}/doc/docbook/resources/brlcad/tutorial-cover-template.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeII-cover.xsl @ONLY)
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeII-cover.xsl")
string(REPLACE " " "%20" TUTORIAL_COVER_XSL
${CMAKE_CURRENT_BINARY_DIR}/BRL-CAD_Tutorial_Series-VolumeII-cover.xsl)
configure_file(${CMAKE_SOURCE_DIR}/doc/docbook/resources/brlcad/tutorial-template.xsl.in
@@ Diff output truncated at 100000 characters. @@
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