[brlcad-commits] SF.net SVN: brlcad:[58291] brlcad/trunk/src/other/CMakeLists.txt
Revision: 58291 http://sourceforge.net/p/brlcad/code/58291 Author: starseeker Date: 2013-10-25 12:15:58 + (Fri, 25 Oct 2013) Log Message: --- d_rossberg noticed that clearing the src/other flags on MSVC causes problems, since the MSVC defaults are different from the CMake defaults and we don't wipe-and-reset all flags on MSVC currently. Modified Paths: -- brlcad/trunk/src/other/CMakeLists.txt Modified: brlcad/trunk/src/other/CMakeLists.txt === --- brlcad/trunk/src/other/CMakeLists.txt 2013-10-25 03:00:48 UTC (rev 58290) +++ brlcad/trunk/src/other/CMakeLists.txt 2013-10-25 12:15:58 UTC (rev 58291) @@ -27,31 +27,35 @@ #--- # Clear all pre-defined CMake flags +# TODO - clearing these flags on MSVC currently causes +# problems... -set(CMAKE_C_FLAGS ) -set(CMAKE_CXX_FLAGS ) -set(CMAKE_SHARED_LINKER_FLAGS ) -set(CMAKE_EXE_LINKER_FLAGS ) +if(NOT MSVC) + set(CMAKE_C_FLAGS ) + set(CMAKE_CXX_FLAGS ) + set(CMAKE_SHARED_LINKER_FLAGS ) + set(CMAKE_EXE_LINKER_FLAGS ) -if(CMAKE_BUILD_TYPE) - string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER) - set(CMAKE_C_FLAGS_${BUILD_TYPE_UPPER} ) - set(CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER} ) - set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) - set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) -endif(CMAKE_BUILD_TYPE) + if(CMAKE_BUILD_TYPE) +string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER) +set(CMAKE_C_FLAGS_${BUILD_TYPE_UPPER} ) +set(CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER} ) +set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) +set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) + endif(CMAKE_BUILD_TYPE) -foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER ${CFG_TYPE} CFG_TYPE_UPPER) - set(CMAKE_C_FLAGS_${CFG_TYPE_UPPER} ) - set(CMAKE_CXX_FLAGS_${CFG_TYPE_UPPER} ) - set(CMAKE_SHARED_LINKER_FLAGS_${CFG_TYPE_UPPER} ) - set(CMAKE_EXE_LINKER_FLAGS_${CFG_TYPE_UPPER} ) -endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) +string(TOUPPER ${CFG_TYPE} CFG_TYPE_UPPER) +set(CMAKE_C_FLAGS_${CFG_TYPE_UPPER} ) +set(CMAKE_CXX_FLAGS_${CFG_TYPE_UPPER} ) +set(CMAKE_SHARED_LINKER_FLAGS_${CFG_TYPE_UPPER} ) +set(CMAKE_EXE_LINKER_FLAGS_${CFG_TYPE_UPPER} ) + endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) -set(CMAKE_C_FLAGS $ENV{CFLAGS}) -set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS}) -set(CMAKE_SHARED_LINKER_FLAGS $ENV{LDFLAGS}) + set(CMAKE_C_FLAGS $ENV{CFLAGS}) + set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS}) + set(CMAKE_SHARED_LINKER_FLAGS $ENV{LDFLAGS}) +endif(NOT MSVC) # Quiet all warnings in this directory if(BRLCAD_DISABLE_SRC_OTHER_WARN) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58292] brlcad/trunk/misc/CMake/Distcheck.cmake
Revision: 58292 http://sourceforge.net/p/brlcad/code/58292 Author: starseeker Date: 2013-10-25 12:26:14 + (Fri, 25 Oct 2013) Log Message: --- Quote CMake path in distcheck cmds Modified Paths: -- brlcad/trunk/misc/CMake/Distcheck.cmake Modified: brlcad/trunk/misc/CMake/Distcheck.cmake === --- brlcad/trunk/misc/CMake/Distcheck.cmake 2013-10-25 12:15:58 UTC (rev 58291) +++ brlcad/trunk/misc/CMake/Distcheck.cmake 2013-10-25 12:26:14 UTC (rev 58292) @@ -142,10 +142,10 @@ set(DISTCHECK_REGRESS_CMD $(MAKE) regress) set(DISTCHECK_TEST_CMD $(MAKE) test) else(${CMAKE_GENERATOR} MATCHES Make) - set(DISTCHECK_BUILD_CMD ${CMAKE_COMMAND} -E build .) - set(DISTCHECK_INSTALL_CMD ${CMAKE_COMMAND} -E build . --target install) - set(DISTCHECK_REGRESS_CMD ${CMAKE_COMMAND} -E build . --target regress) - set(DISTCHECK_TEST_CMD ${CMAKE_COMMAND} -E build . --target test) + set(DISTCHECK_BUILD_CMD \${CMAKE_COMMAND}\ -E build .) + set(DISTCHECK_INSTALL_CMD \${CMAKE_COMMAND}\ -E build . --target install) + set(DISTCHECK_REGRESS_CMD \${CMAKE_COMMAND}\ -E build . --target regress) + set(DISTCHECK_TEST_CMD \${CMAKE_COMMAND}\ -E build . --target test) set(TARGET_REDIRECT ) endif(${CMAKE_GENERATOR} MATCHES Make) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58293] brlcad/trunk/src/libnmg/CMakeLists.txt
Revision: 58293 http://sourceforge.net/p/brlcad/code/58293 Author: starseeker Date: 2013-10-25 12:29:24 + (Fri, 25 Oct 2013) Log Message: --- Fix quote location Modified Paths: -- brlcad/trunk/src/libnmg/CMakeLists.txt Modified: brlcad/trunk/src/libnmg/CMakeLists.txt === --- brlcad/trunk/src/libnmg/CMakeLists.txt 2013-10-25 12:26:14 UTC (rev 58292) +++ brlcad/trunk/src/libnmg/CMakeLists.txt 2013-10-25 12:29:24 UTC (rev 58293) @@ -41,7 +41,7 @@ nmg_visit.c ) -BRLCAD_ADDLIB(libnmg ${LIBNMG_SOURCES} libbn;libbu;${OPENNURBS_LIBRARY}) +BRLCAD_ADDLIB(libnmg ${LIBNMG_SOURCES} libbn;libbu;${OPENNURBS_LIBRARY}) SET_TARGET_PROPERTIES(libnmg PROPERTIES VERSION 19.0.1 SOVERSION 19) # Local Variables: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58294] brlcad/trunk/src/libbrep/intersect.cpp
Revision: 58294 http://sourceforge.net/p/brlcad/code/58294 Author: phoenixyjll Date: 2013-10-25 12:49:09 + (Fri, 25 Oct 2013) Log Message: --- Planar optimizations for SSI. Modified Paths: -- brlcad/trunk/src/libbrep/intersect.cpp Modified: brlcad/trunk/src/libbrep/intersect.cpp === --- brlcad/trunk/src/libbrep/intersect.cpp 2013-10-25 12:29:24 UTC (rev 58293) +++ brlcad/trunk/src/libbrep/intersect.cpp 2013-10-25 12:49:09 UTC (rev 58294) @@ -2943,6 +2943,9 @@ if (DEBUG_BREP_INTERSECT) bu_log(%d overlap events.\n, overlapevents.Count()); +if (surfA-IsPlanar() surfB-IsPlanar() overlapevents.Count()) + return x.Count() - original_count; + /* Second step: calculate the intersection of the bounding boxes. * Only the children of intersecting b-box pairs need to be considered. * The children will be generated only when they are needed, using the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58295] brlcad/trunk/src/tclscripts/archer/ArcherCore. tcl
Revision: 58295 http://sourceforge.net/p/brlcad/code/58295 Author: bob1961 Date: 2013-10-25 13:27:20 + (Fri, 25 Oct 2013) Log Message: --- Fixed a bug that breaks ArcherCore::redrawWho. This appears to have been introduced in r56397. Revision Links: -- http://sourceforge.net/p/brlcad/code/56397 Modified Paths: -- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl === --- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2013-10-25 12:49:09 UTC (rev 58294) +++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2013-10-25 13:27:20 UTC (rev 58295) @@ -1601,7 +1601,7 @@ set rmode [lindex $rdata 0] set rtrans [lindex $rdata 1] - if [ $rmode == $DISPLAY_MODE_HIDDEN ] { + if {$rmode == $DISPLAY_MODE_HIDDEN} { gedCmd draw -h $obj } else { gedCmd draw -m$rmode -x$rtrans $obj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58296] brlcad/trunk/src/libged/open.c
Revision: 58296 http://sourceforge.net/p/brlcad/code/58296 Author: bob1961 Date: 2013-10-25 17:10:32 + (Fri, 25 Oct 2013) Log Message: --- Updated ged_reopen to properly set the rt material head. This would have impacted Archer and its ilk. Modified Paths: -- brlcad/trunk/src/libged/open.c Modified: brlcad/trunk/src/libged/open.c === --- brlcad/trunk/src/libged/open.c 2013-10-25 13:27:20 UTC (rev 58295) +++ brlcad/trunk/src/libged/open.c 2013-10-25 17:10:32 UTC (rev 58296) @@ -36,7 +36,7 @@ int ged_reopen(struct ged *gedp, int argc, const char *argv[]) { -struct db_i *dbip; +struct db_i *new_dbip; static const char *usage = [filename]; GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR); @@ -54,12 +54,25 @@ /* set database filename */ if (argc == 2) { char *av[2]; + struct db_i *old_dbip = gedp-ged_wdbp-dbip; + struct mater *old_materp = rt_material_head(); +struct mater *new_materp; - if ((dbip = _ged_open_dbip(argv[1], 0)) == DBI_NULL) { + rt_new_material_head(MATER_NULL); + + if ((new_dbip = _ged_open_dbip(argv[1], 0)) == DBI_NULL) { + /* Restore RT's material head */ + rt_new_material_head(old_materp); + bu_vls_printf(gedp-ged_result_str, ged_reopen: failed to open %s\n, argv[1]); return GED_ERROR; } + new_materp = rt_material_head(); + + gedp-ged_wdbp-dbip = old_dbip; +rt_new_material_head(old_materp); + av[0] = zap; av[1] = (char *)0; ged_zap(gedp, 1, (const char **)av); @@ -67,7 +80,8 @@ /* close current database */ db_close(gedp-ged_wdbp-dbip); - gedp-ged_wdbp-dbip = dbip; + gedp-ged_wdbp-dbip = new_dbip; + rt_new_material_head(new_materp); bu_vls_printf(gedp-ged_result_str, %s, gedp-ged_wdbp-dbip-dbi_filename); return GED_OK; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58297] brlcad/trunk/CMakeLists.txt
Revision: 58297 http://sourceforge.net/p/brlcad/code/58297 Author: brlcad Date: 2013-10-25 17:41:59 + (Fri, 25 Oct 2013) Log Message: --- these should be indented Modified Paths: -- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 17:10:32 UTC (rev 58296) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 17:41:59 UTC (rev 58297) @@ -933,9 +933,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(*Stage 1 of 9 - Top Level Configure Options *) -message(***) + message(***) + message(*Stage 1 of 9 - Top Level Configure Options *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # # Now we define the various options for BRL-CAD - ways to enable and @@ -1411,9 +1411,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 2 of 9 - Check for Programs *) -message(***) + message(***) + message(* Stage 2 of 9 - Check for Programs *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # A variety of tools, such as the benchmark utilities, need @@ -1447,9 +1447,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 3 of 9 - Check for Compiler Characteristics *) -message(***) + message(***) + message(* Stage 3 of 9 - Check for Compiler Characteristics *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # load our compiler testing macro definitions @@ -1480,9 +1480,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 4 of 9 - Check for Libraries *) -message(***) + message(***) + message(* Stage 4 of 9 - Check for Libraries *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # While the primary purpose of this section is to identify libraries, @@ -1579,9 +1579,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 5 of 9 - Check for Headers *) -message(***) + message(***) + message(* Stage 5 of 9 - Check for Headers *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # C89 headers: assert.h, ctype.h, errno.h, float.h, limits.h, locale.h, @@ -1712,9 +1712,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 6 of 9 - Check for Types/Structures *) -message(***) + message(***) + message(* Stage 6 of 9 - Check for Types/Structures *) + message(***) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) @@ -1765,9 +1765,9 @@ # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) -message(***) -message(* Stage 7 of 9 - Check for Functions *)
[brlcad-commits] SF.net SVN: brlcad:[58298] brlcad/trunk/CMakeLists.txt
Revision: 58298 http://sourceforge.net/p/brlcad/code/58298 Author: brlcad Date: 2013-10-25 17:44:21 + (Fri, 25 Oct 2013) Log Message: --- ws cleanup Modified Paths: -- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 17:41:59 UTC (rev 58297) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 17:44:21 UTC (rev 58298) @@ -181,13 +181,13 @@ if(BRLCAD_ROOT) if(NOT BRLCAD_ROOT_OVERRIDE) message(WARNING }}\nBRLCAD_ROOT should only be used to override an install directory at runtime. BRLCAD_ROOT is presently set to \${BRLCAD_ROOT}\ It is *highly* recommended that BRLCAD_ROOT be unset and not used.\n}}) -if(CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ) +if(CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(${BRLCAD_ROOT} STREQUAL ${CMAKE_INSTALL_PREFIX}) message(BRLCAD_ROOT is not necessary and may cause unexpected behavior) else(${BRLCAD_ROOT} STREQUAL ${CMAKE_INSTALL_PREFIX}) message(FATAL_ERROR BRLCAD_ROOT environment variable conflicts with CMAKE_INSTALL_PREFIX) endif(${BRLCAD_ROOT} STREQUAL ${CMAKE_INSTALL_PREFIX}) -endif(CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ) +endif(CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(SLEEP_EXEC) execute_process(COMMAND ${SLEEP_EXEC} 2) endif(SLEEP_EXEC) @@ -676,10 +676,10 @@ # the build directory AND install directory. Thanks to plplot for # identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX. # Documentation of these options is available at -# http://www.cmake.org/Wiki/CMake_RPATH_handling +# http://www.cmake.org/Wiki/CMake_RPATH_handling # use, i.e. don't skip the full RPATH for the build tree -set(CMAKE_SKIP_BUILD_RPATH FALSE) +set(CMAKE_SKIP_BUILD_RPATH FALSE) # when building, don't use the install RPATH already # (but later on when installing) @@ -1036,7 +1036,7 @@ if(NOT BRLCAD_BUNDLED_LIBS MATCHES AUTO AND NOT BRLCAD_BUNDLED_LIBS MATCHES BUNDLED AND NOT BRLCAD_BUNDLED_LIBS MATCHES SYSTEM) message(WARNING Unknown value BRLCAD_BUNDLED_LIBS supplied for BRLCAD_BUNDLED_LIBS - defaulting to AUTO) message(WARNING Valid options are AUTO, BUNDLED and SYSTEM) - set(BRLCAD_BUNDLED_LIBS AUTO CACHE STRING Build bundled libraries. FORCE) + set(BRLCAD_BUNDLED_LIBS AUTO CACHE STRING Build bundled libraries. FORCE) endif(NOT BRLCAD_BUNDLED_LIBS MATCHES AUTO AND NOT BRLCAD_BUNDLED_LIBS MATCHES BUNDLED AND NOT BRLCAD_BUNDLED_LIBS MATCHES SYSTEM) # Enable Aqua widgets on Mac OSX. This impacts Tcl/Tk building and OpenGL @@ -1110,7 +1110,7 @@ Default depends on whether OpenGL is successfully detected - if it is, default is to enable. ) -BRLCAD_OPTION(${OPENGL_FOUND} BRLCAD_ENABLE_OPENGL BRLCAD_ENABLE_OPENGL_ALIASES BRLCAD_ENABLE_OPENGL_DESCRIPTION) +BRLCAD_OPTION(${OPENGL_FOUND} BRLCAD_ENABLE_OPENGL BRLCAD_ENABLE_OPENGL_ALIASES BRLCAD_ENABLE_OPENGL_DESCRIPTION) # Enable RTGL. Requires an enabled OpenGL. option(BRLCAD_ENABLE_RTGL Enable experimental RTGL code. OFF) @@ -1304,7 +1304,7 @@ #-- # There are extra documentation files available requiring DocBook # They are quite useful in graphical interfaces, but also add considerably -# to the overall build time. If necessary BRL-CAD provides its own +# to the overall build time. If necessary BRL-CAD provides its own # xsltproc (see src/other/xmltools), so the html and man page # outputs are always potentially available. PDF output, on the other hand, # needs Apache FOP. FOP is not a candidate for bundling with BRL-CAD for @@ -1348,7 +1348,7 @@ set(BRLCAD_EXTRADOCS_DESCRIPTION The core option that enables and disables building of BRL-CAD's DocBook based documentation (includes manuals and man pages for commands, among -other things.) Defaults to ON, but only HTML and MAN formats are enabled +other things.) Defaults to ON, but only HTML and MAN formats are enabled by default - PDF must be enabled separately by use of this option or one of its aliases. Note that you may set environment variable APACHE_FOP to point to your locally installed fop executable file (which on Linux is @@ -1380,7 +1380,7 @@ set(BRLCAD_EXTRADOCS_PDF_DESCRIPTION Option that enables building of BRL-CAD's DocBook PDF-based documentation (includes manuals and man pages for commands, among -other things.) Defaults to OFF. +other things.) Defaults to OFF. Note that you may set environment variable APACHE_FOP to point to your locally installed fop executable file (which on Linux is usually a shell script with 0755 permissions). @@ -1476,7 +1476,7 @@
[brlcad-commits] SF.net SVN: brlcad:[58299] brlcad/trunk/CMakeLists.txt
Revision: 58299 http://sourceforge.net/p/brlcad/code/58299 Author: brlcad Date: 2013-10-25 17:45:47 + (Fri, 25 Oct 2013) Log Message: --- no space on linker opts, mention why it's there Modified Paths: -- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 17:44:21 UTC (rev 58298) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 17:45:47 UTC (rev 58299) @@ -1476,7 +1476,9 @@ CONFIG_H_APPEND(BRLCAD #define _FORTIFY_SOURCE 2\n) endif(${BRLCAD_OPTIMIZED_BUILD} MATCHES ON) -#CHECK_C_COMPILER_FLAG(Wl, --no-undefined NO_UNDEFINED_LINKER_FLAG) +# Enable this flag for additional reporting of undefined symbols. +# TODO: Fixing these is a work in progress. +# CHECK_C_COMPILER_FLAG(Wl,--no-undefined NO_UNDEFINED_LINKER_FLAG) # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58300] brlcad/trunk
Revision: 58300 http://sourceforge.net/p/brlcad/code/58300 Author: brlcad Date: 2013-10-25 17:49:08 + (Fri, 25 Oct 2013) Log Message: --- separation of macro definition from macro use. move the compiler logic into the compiler section of the top-level CMakeLists.txt file so that we can unconditionally include the macro definitions like a template header. Modified Paths: -- brlcad/trunk/CMakeLists.txt brlcad/trunk/misc/CMake/CompilerFlags.cmake Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 17:45:47 UTC (rev 58299) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 17:49:08 UTC (rev 58300) @@ -1459,6 +1459,216 @@ include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake) endif(NOT MSVC) +# Clear out most CMake-assigned defaults - We're managing +# our own compile flags, and don't (for example) want NDEBUG +# if we have debugging flags enabled for a Release build. +# At the same time, pull in any flags that have been set +# in the environment. + +set(CMAKE_C_FLAGS ) +set(CMAKE_CXX_FLAGS ) +set(CMAKE_SHARED_LINKER_FLAGS ) +set(CMAKE_EXE_LINKER_FLAGS ) + +if(CMAKE_BUILD_TYPE) + string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER) + set(CMAKE_C_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) +endif(CMAKE_BUILD_TYPE) + +foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER ${CFG_TYPE} CFG_TYPE_UPPER) + set(CMAKE_C_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_CXX_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_SHARED_LINKER_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_EXE_LINKER_FLAGS_${CFG_TYPE_UPPER} ) +endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + +set(CMAKE_C_FLAGS $ENV{CFLAGS}) +set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS}) +set(CMAKE_SHARED_LINKER_FLAGS $ENV{LDFLAGS}) +#set(CMAKE_EXE_LINKER_FLAGS ) + +# try to use -pipe to speed up the compiles +CHECK_C_FLAG(pipe) +CHECK_CXX_FLAG(pipe) + +# check for -fno-strict-aliasing +# XXX - THIS FLAG IS REQUIRED if any level of optimization is +# enabled with GCC as we do use aliasing and type-punning. +CHECK_C_FLAG(fno-strict-aliasing) +CHECK_CXX_FLAG(fno-strict-aliasing) + +# check for -fno-common (libtcl needs it on darwin) +CHECK_C_FLAG(fno-common) +CHECK_CXX_FLAG(fno-common) + +# check for -fexceptions +# this is needed to resolve __Unwind_Resume when compiling and +# linking against openNURBS in librt for some binaries, for +# example rttherm (i.e. any -static binaries) +CHECK_C_FLAG(fexceptions) +CHECK_CXX_FLAG(fexceptions) + +# check for -ftemplate-depth-NN this is needed in libpc and +# other code using boost where the template instantiation depth +# needs to be increased from the default ANSI minimum of 17. +CHECK_CXX_FLAG(ftemplate-depth-128) + +# dynamic SSE optimizations for NURBS processing +# +# XXX disable the SSE flags for now as they can cause illegal instructions. +# the test needs to also be tied to run-time functionality since gcc +# may still output SSE instructions (e.g., for cross-compiling). +# CHECK_C_FLAG(msse) +# CHECK_C_FLAG(msse2) +CHECK_C_FLAG(msse3 BUILD_TYPES Debug) + +# Check for c90 support with gnu extensions if we're not building for +# a release so we get more broad portability testing. Since the +# default is debug, it will be the more difficult to keep working +# given it's the lesser feature-rich C standard. If we're going for +# a strictly standard compliant build, use the c** options instead +# of the gnu variations +if(ENABLE_STRICT_COMPILER_STANDARD_COMPLIANCE) + CHECK_C_FLAG(std=c99 BUILD_TYPES Debug) + CHECK_C_FLAG(std=c99 BUILD_TYPES Release VARS C99_FLAG) + # we need to define some things as empty to avoid false positives + # for bu_* functions using varargs and print specifiers + CHECK_C_FLAG(D_BU_ATTR_PRINTF12='') + CHECK_C_FLAG(D_BU_ATTR_PRINTF23='') + CHECK_C_FLAG(D_BU_ATTR_SCANF23='') + # a hack to temp work around signal() handling in interrupt.c + CHECK_C_FLAG(DC99_POSIX_USE_BSD) +else() + CHECK_C_FLAG(std=gnu89 BUILD_TYPES Debug) + CHECK_C_FLAG(std=gnu99 BUILD_TYPES Release VARS C99_FLAG) +endif() + +# What POSIX do we want to target, initially? See +# http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html +# for options... +if(ENABLE_POSIX_COMPLIANCE) + # use this version so three non-C99 functions (without bu* + # replacements) will work: + CHECK_C_FLAG(D_POSIX_C_SOURCE=200112L) + # need this for glibc 2.12 (for gethostname): + CHECK_C_FLAG(D_XOPEN_SOURCE=500) +endif() + +# Silence check for unused arguments (used to silence clang warnings about +# unused options on the command line). By default clang generates a lot of +# warnings about such arguments, and we don't really care. +CHECK_C_FLAG(Qunused-arguments) +CHECK_CXX_FLAG(Qunused-arguments) + +# 64bit compilation flags +if(${CMAKE_WORD_SIZE}
[brlcad-commits] SF.net SVN: brlcad:[58301] brlcad/trunk/misc/CMake/CompilerFlags.cmake
Revision: 58301 http://sourceforge.net/p/brlcad/code/58301 Author: brlcad Date: 2013-10-25 17:56:46 + (Fri, 25 Oct 2013) Log Message: --- pull includes together, document the macros as api not as how they are implemented. Modified Paths: -- brlcad/trunk/misc/CMake/CompilerFlags.cmake Modified: brlcad/trunk/misc/CMake/CompilerFlags.cmake === --- brlcad/trunk/misc/CMake/CompilerFlags.cmake 2013-10-25 17:49:08 UTC (rev 58300) +++ brlcad/trunk/misc/CMake/CompilerFlags.cmake 2013-10-25 17:56:46 UTC (rev 58301) @@ -33,9 +33,12 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ### + include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +include(CMakeParseArguments) + # To reduce verbosity in this file, determine up front which # build configuration type (if any) we are using and stash # the variables we want to assign flags to into a common @@ -69,8 +72,9 @@ endif(${NEW_FLAG}) endmacro(ADD_NEW_FLAG) -# Convenience language based wrapper for calling the correct compiler -# flag test macro + +# This macro tests for a specified C or C++ compiler flag, setting the +# result in the specified variable. macro(CHECK_COMPILER_FLAG FLAG_LANG NEW_FLAG RESULTVAR) if(${FLAG_LANG} STREQUAL C) CHECK_C_COMPILER_FLAG(${NEW_FLAG} ${RESULTVAR}) @@ -114,8 +118,6 @@ # BUILD_TYPES Debug Release # GROUPS DEBUG_FLAGS # VARS DEBUG1 DEBUG2) - -include (CMakeParseArguments) macro(CHECK_FLAG) # Set up some variables and names set(FLAG_LANG ${ARGV0}) @@ -174,15 +176,21 @@ endmacro(CHECK_FLAG) -# Convenience wrappers to call the primary checking function with a -# default language. + +# This macro checks whether a specified C flag is available. See +# CHECK_FLAG() for arguments. macro(CHECK_C_FLAG) CHECK_FLAG(C ${ARGN}) endmacro(CHECK_C_FLAG) + + +# This macro checks whether a specified C++ flag is available. See +# CHECK_FLAG() for arguments. macro(CHECK_CXX_FLAG) CHECK_FLAG(CXX ${ARGN}) endmacro(CHECK_CXX_FLAG) + # Local Variables: # tab-width: 8 # mode: cmake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58302] brlcad/trunk/CMakeLists.txt
Revision: 58302 http://sourceforge.net/p/brlcad/code/58302 Author: brlcad Date: 2013-10-25 17:57:43 + (Fri, 25 Oct 2013) Log Message: --- should no longer need inclusion of CompilerFlags.cmake to be conditional as it just defines a bunch of macros Modified Paths: -- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 17:56:46 UTC (rev 58301) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 17:57:43 UTC (rev 58302) @@ -1453,9 +1453,9 @@ endif(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) # load our compiler testing macro definitions +include(${BRLCAD_CMAKE_DIR}/CompilerFlags.cmake) if(NOT MSVC) # alas, we heavily assume and test for gcc-style flags in both - include(${BRLCAD_CMAKE_DIR}/CompilerFlags.cmake) include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake) endif(NOT MSVC) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58303] brlcad/trunk/misc/CMake/BRLCAD_CompilerFlags. cmake
Revision: 58303 http://sourceforge.net/p/brlcad/code/58303 Author: brlcad Date: 2013-10-25 18:01:34 + (Fri, 25 Oct 2013) Log Message: --- this file is not (yet) included on Windows, simplify Modified Paths: -- brlcad/trunk/misc/CMake/BRLCAD_CompilerFlags.cmake Modified: brlcad/trunk/misc/CMake/BRLCAD_CompilerFlags.cmake === --- brlcad/trunk/misc/CMake/BRLCAD_CompilerFlags.cmake 2013-10-25 17:57:43 UTC (rev 58302) +++ brlcad/trunk/misc/CMake/BRLCAD_CompilerFlags.cmake 2013-10-25 18:01:34 UTC (rev 58303) @@ -100,15 +100,8 @@ CHECK_C_FLAG(pedantic) CHECK_CXX_FLAG(pedantic) - # FIXME: The Wall warnings are too verbose with Visual C++ (for - # now). we have a lot to clean up. - if(NOT MSVC) -CHECK_C_FLAG(Wall) -CHECK_CXX_FLAG(Wall) - else(NOT MSVC) -CHECK_C_FLAG(W4) -CHECK_CXX_FLAG(W4) - endif(NOT MSVC) + CHECK_C_FLAG(Wall) + CHECK_CXX_FLAG(Wall) CHECK_C_FLAG(Wextra) CHECK_CXX_FLAG(Wextra) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58304] brlcad/trunk/CMakeLists.txt
Revision: 58304 http://sourceforge.net/p/brlcad/code/58304 Author: brlcad Date: 2013-10-25 18:04:04 + (Fri, 25 Oct 2013) Log Message: --- looks like there are some assumptions about the ordering, so preserve the previous ordering by moving the BRLCAD_CompilerFlags.cmake include after the logic that was moved. Modified Paths: -- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt === --- brlcad/trunk/CMakeLists.txt 2013-10-25 18:01:34 UTC (rev 58303) +++ brlcad/trunk/CMakeLists.txt 2013-10-25 18:04:04 UTC (rev 58304) @@ -1454,10 +1454,6 @@ # load our compiler testing macro definitions include(${BRLCAD_CMAKE_DIR}/CompilerFlags.cmake) -if(NOT MSVC) - # alas, we heavily assume and test for gcc-style flags in both - include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake) -endif(NOT MSVC) # Clear out most CMake-assigned defaults - We're managing # our own compile flags, and don't (for example) want NDEBUG @@ -1690,6 +1686,14 @@ # TODO: Fixing these is a work in progress. # CHECK_C_COMPILER_FLAG(Wl,--no-undefined NO_UNDEFINED_LINKER_FLAG) +if(NOT MSVC) + # We could include this, but these tests are almost entirely for + # gcc-style flags. This file is intentionally included after we + # wipe out the various FLAGS variables. + include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake) +endif(NOT MSVC) + + # *** if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt.prev) message(***) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58305] brlcad/trunk/src/proc-db/lens.c
Revision: 58305 http://sourceforge.net/p/brlcad/code/58305 Author: carlmoore Date: 2013-10-25 18:07:47 + (Fri, 25 Oct 2013) Log Message: --- initialize lens_1side_side in its declaration; usage will now include defaults and unit specification Modified Paths: -- brlcad/trunk/src/proc-db/lens.c Modified: brlcad/trunk/src/proc-db/lens.c === --- brlcad/trunk/src/proc-db/lens.c 2013-10-25 18:04:04 UTC (rev 58304) +++ brlcad/trunk/src/proc-db/lens.c 2013-10-25 18:07:47 UTC (rev 58305) @@ -74,6 +74,8 @@ printusage(void) { fprintf(stderr,Usage: [-T lens_type] [-r refractive_index] [-d diameter]\n); fprintf(stderr, [-t thickness] [-f focal_length] [filename]\n); +fprintf(stderr,defaults: T = 2 (the other possible value is 1), r = 1.5, d = 200, t = 40, f = 600\n); +fprintf(stderr,(units mm)\n); } static void @@ -268,7 +270,7 @@ struct rt_wdb *db_fp = NULL; struct bu_vls lens_type = BU_VLS_INIT_ZERO; struct bu_vls name = BU_VLS_INIT_ZERO; -int lens_1side_2side; +int lens_1side_2side = 2; fastf_t ref_ind, thickness, diameter, focal_length; bu_vls_trunc(lens_type, 0); @@ -278,7 +280,6 @@ diameter = 200; thickness = diameter/5; focal_length = 600; -lens_1side_2side = 2; bu_vls_printf(lens_type, DCX); bu_vls_printf(name, lens_%s_f%.1f_d%.1f, bu_vls_addr(lens_type), focal_length, diameter); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58307] brlcad/trunk/src/other/CMakeLists.txt
Revision: 58307 http://sourceforge.net/p/brlcad/code/58307 Author: brlcad Date: 2013-10-25 18:27:25 + (Fri, 25 Oct 2013) Log Message: --- needs testing, but should no longer need the MSVC conditionals. It should default to msvc's default linkage (/MT) and is synchronized with the top-level build settings. Modified Paths: -- brlcad/trunk/src/other/CMakeLists.txt Modified: brlcad/trunk/src/other/CMakeLists.txt === --- brlcad/trunk/src/other/CMakeLists.txt 2013-10-25 18:18:24 UTC (rev 58306) +++ brlcad/trunk/src/other/CMakeLists.txt 2013-10-25 18:27:25 UTC (rev 58307) @@ -27,35 +27,31 @@ #--- # Clear all pre-defined CMake flags -# TODO - clearing these flags on MSVC currently causes -# problems... -if(NOT MSVC) - set(CMAKE_C_FLAGS ) - set(CMAKE_CXX_FLAGS ) - set(CMAKE_SHARED_LINKER_FLAGS ) - set(CMAKE_EXE_LINKER_FLAGS ) +set(CMAKE_C_FLAGS ) +set(CMAKE_CXX_FLAGS ) +set(CMAKE_SHARED_LINKER_FLAGS ) +set(CMAKE_EXE_LINKER_FLAGS ) - if(CMAKE_BUILD_TYPE) -string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER) -set(CMAKE_C_FLAGS_${BUILD_TYPE_UPPER} ) -set(CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER} ) -set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) -set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) - endif(CMAKE_BUILD_TYPE) +if(CMAKE_BUILD_TYPE) + string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER) + set(CMAKE_C_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) + set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE_UPPER} ) +endif(CMAKE_BUILD_TYPE) - foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) -string(TOUPPER ${CFG_TYPE} CFG_TYPE_UPPER) -set(CMAKE_C_FLAGS_${CFG_TYPE_UPPER} ) -set(CMAKE_CXX_FLAGS_${CFG_TYPE_UPPER} ) -set(CMAKE_SHARED_LINKER_FLAGS_${CFG_TYPE_UPPER} ) -set(CMAKE_EXE_LINKER_FLAGS_${CFG_TYPE_UPPER} ) - endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) +foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER ${CFG_TYPE} CFG_TYPE_UPPER) + set(CMAKE_C_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_CXX_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_SHARED_LINKER_FLAGS_${CFG_TYPE_UPPER} ) + set(CMAKE_EXE_LINKER_FLAGS_${CFG_TYPE_UPPER} ) +endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) - set(CMAKE_C_FLAGS $ENV{CFLAGS}) - set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS}) - set(CMAKE_SHARED_LINKER_FLAGS $ENV{LDFLAGS}) -endif(NOT MSVC) +set(CMAKE_C_FLAGS $ENV{CFLAGS}) +set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS}) +set(CMAKE_SHARED_LINKER_FLAGS $ENV{LDFLAGS}) # Quiet all warnings in this directory if(BRLCAD_DISABLE_SRC_OTHER_WARN) @@ -827,9 +823,6 @@ ) THIRD_PARTY(openNURBS openNURBS opennurbs_ALIASES opennurbs_DESCRIPTION NOSYS) -if(NOT MSVC) - set(NOT_MSVC 1) -endif(NOT MSVC) # STEP Class Libraries # Need Lemon/Perplex to build STEP - conditionalize This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58308] brlcad/trunk/src/proc-db/room.c
Revision: 58308 http://sourceforge.net/p/brlcad/code/58308 Author: carlmoore Date: 2013-10-25 18:49:22 + (Fri, 25 Oct 2013) Log Message: --- remove a blank line; remove degtorad variable, because DEG2RAD global variable provides that value Modified Paths: -- brlcad/trunk/src/proc-db/room.c Modified: brlcad/trunk/src/proc-db/room.c === --- brlcad/trunk/src/proc-db/room.c 2013-10-25 18:27:25 UTC (rev 58307) +++ brlcad/trunk/src/proc-db/room.c 2013-10-25 18:49:22 UTC (rev 58308) @@ -35,7 +35,6 @@ #include raytrace.h #include wdb.h - #define HEIGHT 4000/* 4 meter high walls */ #define EAST 1 @@ -44,7 +43,6 @@ #define SOUTH 8 mat_t identity; -double degtorad = 0.0174532925199433; double sin60; struct mtab { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[58309] brlcad/trunk/src/libbn/obr.c
Revision: 58309 http://sourceforge.net/p/brlcad/code/58309 Author: starseeker Date: 2013-10-25 20:26:57 + (Fri, 25 Oct 2013) Log Message: --- Add in the Melkman code needed for convex hulls... Modified Paths: -- brlcad/trunk/src/libbn/obr.c Modified: brlcad/trunk/src/libbn/obr.c === --- brlcad/trunk/src/libbn/obr.c2013-10-25 18:49:22 UTC (rev 58308) +++ brlcad/trunk/src/libbn/obr.c2013-10-25 20:26:57 UTC (rev 58309) @@ -31,6 +31,14 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * + * + * Copyright 2001 softSurfer, 2012 Dan Sunday + * This code may be freely used and modified for any purpose + * providing that this copyright notice is included with it. + * SoftSurfer makes no warranty for this code, and cannot be held + * liable for any real or imagined damage resulting from its use. + * Users of this code must verify correctness for their application. + * */ /** @file obr.c * @@ -49,6 +57,10 @@ * http://www.geometrictools.com/LibMathematics/Containment/Wm5ContMinBox2.cpp * http://www.geometrictools.com/LibMathematics/Algebra/Wm5Vector2.inl * + * The implementation of Melkman's algorithm for convex hulls of simple + * polylines is a translation of softSurfer's implementation: + * http://geomalgorithms.com/a12-_hull-3.html + * */ @@ -132,6 +144,79 @@ return 1; } +/* isLeft(): test if a point is Left|On|Right of an infinite line. + *Input: three points L0, L1, and p + *Return: 0 for p left of the line through L0 and L1 + *=0 for p on the line + *0 for p right of the line + */ +#define isLeft(L0, L1, p) ((L1[X] - L0[X])*(p[Y] - L0[Y]) - (p[X] - L0[X])*(L1[Y] - L0[Y])) + + +/* melkman_hull(): Melkman's 2D simple polyline O(n) convex hull algorithm + *Input: polyline[] = array of 2D vertex points for a simple polyline + *n = the number of points in V[] + *Output: hull[] = output convex hull array of vertices in ccw orientation (max is n) + *Return: h = the number of points in hull[] + */ +int +melkman_hull(point_t* polyline, int n, point_t* hull) +{ +int i; + +/* initialize a deque D[] from bottom to top so that the + 1st three vertices of P[] are a ccw triangle */ +point_t* D = (point_t *)bu_calloc(2*n+1, sizeof(fastf_t)*3, dequeue); + +/* hull vertex counter */ +int h; + +/* initial bottom and top deque indices */ +int bot = n-2; +int top = bot+3; + +/* 3rd vertex is a both bot and top */ +VMOVE(D[top], polyline[2]); +VMOVE(D[bot], D[top]); +if (isLeft(polyline[0], polyline[1], polyline[2]) 0) { +VMOVE(D[bot+1],polyline[0]); +VMOVE(D[bot+2],polyline[1]); /* ccw vertices are: 2,0,1,2 */ +} +else { +VMOVE(D[bot+1],polyline[1]); +VMOVE(D[bot+2],polyline[0]); /* ccw vertices are: 2,1,0,2 */ +} + +/* compute the hull on the deque D[] */ +for (i = 3; i n; i++) { /* process the rest of vertices */ +/* test if next vertex is inside the deque hull */ +if ((isLeft(D[bot], D[bot+1], polyline[i]) 0) +(isLeft(D[top-1], D[top], polyline[i]) 0) ) + continue; /* skip an interior vertex */ + +/* incrementally add an exterior vertex to the deque hull + get the rightmost tangent at the deque bot */ +while (isLeft(D[bot], D[bot+1], polyline[i]) = 0) +++bot; /* remove bot of deque */ +VMOVE(D[--bot],polyline[i]);/* insert P[i] at bot of deque */ + +/* get the leftmost tangent at the deque top */ +while (isLeft(D[top-1], D[top], polyline[i]) = 0) +--top; /* pop top of deque */ +VMOVE(D[++top],polyline[i]);/* push P[i] onto top of deque */ +} + +/* transcribe deque D[] to the output hull array hull[] */ + +hull = bu_calloc(top - bot + 2, sizeof(fastf_t)*3, hull); +for (h=0; h = (top-bot); h++) +VMOVE(hull[h],D[bot + h]); + +bu_free(D, free queue); +return h-1; +} + + /* TODO - if three consecutive colinear points are a no-no as documented in the original code, * we're going to have to build the convex hull for all inputs in order to make sure we don't * get large colinear sets from the NMG inputs.*/ @@ -147,7 +232,7 @@ point_t **edge_unit_vects = NULL; int **visited = NULL; */ point_t center, pmin, pmax; -/*vect_t vline, vz;*/ +vect_t vline, vz, vdelta, neg_vdelta, neg_vline; if (!pnts || !p1 || !p2 || !p3 || !p4) return -1; /* Need 2d points for this to work */ while (i pnt_cnt) { @@ -155,31 +240,30 @@ i++; } dim = pnt2d_array_get_dimension(pnts, pnt_cnt, center, pmin, pmax); -#if 0 switch (dim) { case 0: /* Bound point */ -
[brlcad-commits] SF.net SVN: brlcad:[58310] brlcad/trunk/src/proc-db/lens.c
Revision: 58310 http://sourceforge.net/p/brlcad/code/58310 Author: carlmoore Date: 2013-10-25 21:54:09 + (Fri, 25 Oct 2013) Log Message: --- shortened the code Modified Paths: -- brlcad/trunk/src/proc-db/lens.c Modified: brlcad/trunk/src/proc-db/lens.c === --- brlcad/trunk/src/proc-db/lens.c 2013-10-25 20:26:57 UTC (rev 58309) +++ brlcad/trunk/src/proc-db/lens.c 2013-10-25 21:54:09 UTC (rev 58310) @@ -51,7 +51,6 @@ * soda-lime glass (1.5) and to 1/5 of the diameter * of the lens if not specified. * - * */ #include common.h @@ -298,38 +297,35 @@ } /* Make the requested lens*/ -if (lens_1side_2side == 1 focal_length 0) { - bu_log(Making Plano-Convex lens...\n); - bu_vls_trunc(lens_type, 0); - bu_vls_trunc(name, 0); - bu_vls_printf(lens_type, PCX); +if (lens_1side_2side == 1) { + if (focal_length 0) { + bu_log(Making Plano-Convex lens...\n); + bu_vls_trunc(lens_type, 0); + bu_vls_trunc(name, 0); + bu_vls_printf(lens_type, PCX); + } else if (focal_length 0) { + bu_log(Making Plano-Concave lens...\n); + bu_vls_trunc(lens_type, 0); + bu_vls_trunc(name, 0); + bu_vls_printf(lens_type, PCV); + } bu_vls_printf(name, lens_%s_f%.1f_d%.1f, bu_vls_addr(lens_type), focal_length, diameter); MakeP(db_fp, bu_vls_addr(name), diameter, focal_length, ref_ind, thickness); -} -if (lens_1side_2side == 1 focal_length 0) { - bu_log(Making Plano-Concave lens...\n); - bu_vls_trunc(lens_type, 0); - bu_vls_trunc(name, 0); - bu_vls_printf(lens_type, PCV); +} else if (lens_1side_2side == 2) { + if (focal_length 0) { + bu_log(Making BiConvex lens...\n); + bu_vls_trunc(lens_type, 0); + bu_vls_trunc(name, 0); + bu_vls_printf(lens_type, DCX); + } else if (focal_length 0) { + bu_log(Making BiConcave lens...\n); + bu_vls_trunc(lens_type, 0); + bu_vls_trunc(name, 0); + bu_vls_printf(lens_type, DCV); + } bu_vls_printf(name, lens_%s_f%.1f_d%.1f, bu_vls_addr(lens_type), focal_length, diameter); - MakeP(db_fp, bu_vls_addr(name), diameter, focal_length, ref_ind, thickness); -} -if (lens_1side_2side == 2 focal_length 0) { - bu_log(Making BiConvex lens...\n); - bu_vls_trunc(lens_type, 0); - bu_vls_trunc(name, 0); - bu_vls_printf(lens_type, DCX); - bu_vls_printf(name, lens_%s_f%.1f_d%.1f, bu_vls_addr(lens_type), focal_length, diameter); MakeD(db_fp, bu_vls_addr(name), diameter, focal_length, ref_ind, thickness); } -if (lens_1side_2side == 2 focal_length 0) { - bu_log(Making BiConcave lens...\n); - bu_vls_trunc(lens_type, 0); - bu_vls_trunc(name, 0); - bu_vls_printf(lens_type, DCV); - bu_vls_printf(name, lens_%s_f%.1f_d%.1f, bu_vls_addr(lens_type), focal_length, diameter); - MakeD(db_fp, bu_vls_addr(name), diameter, focal_length, ref_ind, thickness); -} /* Close database */ wdb_close(db_fp); @@ -337,7 +333,6 @@ return 0; } - /* * Local Variables: * mode: C This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits