Revision: 77279
          http://sourceforge.net/p/brlcad/code/77279
Author:   starseeker
Date:     2020-09-29 21:55:16 +0000 (Tue, 29 Sep 2020)
Log Message:
-----------
Whole lot of weird things going on, but checkpoint first compile of BRL-CAD 
with new setup.

Modified Paths:
--------------
    brlcad/branches/thirdparty_rework/CMakeLists.txt
    brlcad/branches/thirdparty_rework/misc/CMake/FindLEMON.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindPERPLEX.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindRE2C.cmake
    brlcad/branches/thirdparty_rework/misc/tools/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/bwish/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/bwish/cmd.c
    brlcad/branches/thirdparty_rework/src/libanalyze/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/libged/env/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/util/CMakeLists.txt

Modified: brlcad/branches/thirdparty_rework/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/CMakeLists.txt    2020-09-29 21:13:18 UTC 
(rev 77278)
+++ brlcad/branches/thirdparty_rework/CMakeLists.txt    2020-09-29 21:55:16 UTC 
(rev 77279)
@@ -2094,6 +2094,13 @@
 # tests so the CACHE reflects BRL-CAD's test results.
 add_subdirectory(src/other)
 
+set(ITCL_VERSION "3.4")
+CONFIG_H_APPEND(BRLCAD "#cmakedefine ITCL_VERSION \"${ITCL_VERSION}\"\n")
+
+set(IWIDGETS_VERSION "4.1.1")
+CONFIG_H_APPEND(BRLCAD "#cmakedefine IWIDGETS_VERSION 
\"${IWIDGETS_VERSION}\"\n")
+
+
 if(BRLCAD_PRINT_MSGS)
   message("***********************************************************")
   message("*        Stage 9 of 9 - Output and Summarize Config       *")

Modified: brlcad/branches/thirdparty_rework/misc/CMake/FindLEMON.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindLEMON.cmake        
2020-09-29 21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindLEMON.cmake        
2020-09-29 21:55:16 UTC (rev 77279)
@@ -44,7 +44,29 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
 
-find_program(LEMON_EXECUTABLE lemon DOC "path to the lemon executable")
+set(_LEMON_SEARCHES)
+
+# Search LEMON_ROOT first if it is set.
+if(LEMON_ROOT)
+  set(_LEMON_SEARCH_ROOT PATHS ${LEMON_ROOT} NO_DEFAULT_PATH)
+  list(APPEND _LEMON_SEARCHES _LEMON_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_LEMON_x86 "(x86)")
+set(_LEMON_SEARCH_NORMAL
+    PATHS  "$ENV{ProgramFiles}/lemon"
+          "$ENV{ProgramFiles${_LEMON_x86}}/lemon")
+unset(_LEMON_x86)
+list(APPEND _LEMON_SEARCHES _LEMON_SEARCH_NORMAL)
+
+set(LEMON_NAMES lemon)
+
+# Try each search configuration.
+foreach(search ${_LEMON_SEARCHES})
+  find_program(LEMON_EXECUTABLE lemon ${${search}} PATH_SUFFIXES bin)
+endforeach()
+
 mark_as_advanced(LEMON_EXECUTABLE)
 
 if (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)

Modified: brlcad/branches/thirdparty_rework/misc/CMake/FindPERPLEX.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindPERPLEX.cmake      
2020-09-29 21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindPERPLEX.cmake      
2020-09-29 21:55:16 UTC (rev 77279)
@@ -44,7 +44,29 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
 
-find_program(PERPLEX_EXECUTABLE perplex DOC "path to the perplex executable")
+set(_PERPLEX_SEARCHES)
+
+# Search PERPLEX_ROOT first if it is set.
+if(PERPLEX_ROOT)
+  set(_PERPLEX_SEARCH_ROOT PATHS ${PERPLEX_ROOT} NO_DEFAULT_PATH)
+  list(APPEND _PERPLEX_SEARCHES _PERPLEX_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_PERPLEX_x86 "(x86)")
+set(_PERPLEX_SEARCH_NORMAL
+    PATHS  "$ENV{ProgramFiles}/perplex"
+          "$ENV{ProgramFiles${_PERPLEX_x86}}/perplex")
+unset(_PERPLEX_x86)
+list(APPEND _PERPLEX_SEARCHES _PERPLEX_SEARCH_NORMAL)
+
+set(PERPLEX_NAMES perplex)
+
+# Try each search configuration.
+foreach(search ${_PERPLEX_SEARCHES})
+  find_program(PERPLEX_EXECUTABLE perplex ${${search}} PATH_SUFFIXES bin)
+endforeach()
+
 mark_as_advanced(PERPLEX_EXECUTABLE)
 
 if(PERPLEX_EXECUTABLE AND NOT PERPLEX_TEMPLATE)

Modified: brlcad/branches/thirdparty_rework/misc/CMake/FindRE2C.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindRE2C.cmake 2020-09-29 
21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindRE2C.cmake 2020-09-29 
21:55:16 UTC (rev 77279)
@@ -3,7 +3,29 @@
 #
 #=============================================================================
 
-find_program(RE2C_EXECUTABLE re2c DOC "path to the re2c executable")
+set(_RE2C_SEARCHES)
+
+# Search RE2C_ROOT first if it is set.
+if(RE2C_ROOT)
+  set(_RE2C_SEARCH_ROOT PATHS ${RE2C_ROOT} NO_DEFAULT_PATH)
+  list(APPEND _RE2C_SEARCHES _RE2C_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_RE2C_x86 "(x86)")
+set(_RE2C_SEARCH_NORMAL
+    PATHS  "$ENV{ProgramFiles}/re2c"
+          "$ENV{ProgramFiles${_RE2C_x86}}/re2c")
+unset(_RE2C_x86)
+list(APPEND _RE2C_SEARCHES _RE2C_SEARCH_NORMAL)
+
+set(RE2C_NAMES re2c)
+
+# Try each search configuration.
+foreach(search ${_RE2C_SEARCHES})
+  find_program(RE2C_EXECUTABLE re2c ${${search}} PATH_SUFFIXES bin)
+endforeach()
+
 mark_as_advanced(RE2C_EXECUTABLE)
 
 include(FindPackageHandleStandardArgs)

Modified: brlcad/branches/thirdparty_rework/misc/tools/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/misc/tools/CMakeLists.txt 2020-09-29 
21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/misc/tools/CMakeLists.txt 2020-09-29 
21:55:16 UTC (rev 77279)
@@ -45,89 +45,7 @@
   CMAKEFILES(${dlist})
 endforeach(ITEM ${dlists})
 
-# For those wanting to use a system version of the LEMON parser
-# generator from sqlite, remember that the presence of /usr/bin/lemon
-# is not enough.  LEMON needs a template file, lempar.c, and by
-# default it needs it in the same directory as /usr/bin/lemon.  The
-# typical approach to avoiding that requirement is to patch lemon,
-# like this Gentoo ebuild:
-#
-# http://gentoo-overlays.zugaina.org/gentoo-zh/portage/dev-util/lemon/
-#
-# LEMON packages for other major Linux/BSD distros will do the same.
-# BRL-CAD's FindLEMON.cmake macros will look for the template file in
-# the executable directory first, and if not there will check in
-# /usr/share/lemon (the location used by several distributions.)  If
-# your distribution has a working lemon with the lempar.c template
-# file in a custom location, specify the full path to the template
-# with the variable LEMON_TEMPLATE - something like:
-#
-# cmake .. -DLEMON_TEMPLATE=/etc/lemon/lempar.c
-#
-# This is not to tell LEMON what template to use - that information is
-# usually hardcoded in LEMON itself - but to let FindLEMON.cmake know
-# there is a working LEMON installation.
-set(LEMON_SKIP_INSTALL 1)
-set(lemon_DESCRIPTION "
-Option for enabling and disabling compilation of the lemon parser
-provided with BRL-CAD's source distribution.  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.
-")
-THIRD_PARTY_EXECUTABLE(lemon LEMON lemon REQUIRED "BRLCAD_LEVEL2" ALIASES 
"ENABLE_LEMON" DESCRIPTION lemon_DESCRIPTION)
-if("${BRLCAD_BUNDLED_LIBS}" STREQUAL "BUNDLED" OR "${BRLCAD_LEMON}" MATCHES 
"BUNDLED")
-  set(LEMON_TEMPLATE "${BRLCAD_SOURCE_DIR}/misc/tools/lemon/lempar.c" CACHE 
STRING "Lemon template file" FORCE)
-  set(LEMON_EXECUTABLE_TARGET "lemon" CACHE STRING "lemon target" FORCE)
-endif("${BRLCAD_BUNDLED_LIBS}" STREQUAL "BUNDLED" OR "${BRLCAD_LEMON}" MATCHES 
"BUNDLED")
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/lemon/Makefile)
-# Make sure we load FindLEMON.cmake to be able to define LEMON targets.
-include(${BRLCAD_CMAKE_DIR}/FindLEMON.cmake)
-SetTargetFolder(lemon "Compilation Utilities")
-SetTargetFolder(lempar_cp "Compilation Utilities")
 
-set(RE2C_SKIP_INSTALL 1)
-set(re2c_DESCRIPTION "
-Option for enabling and disabling compilation of the re2c scanner
-utility provided with BRL-CAD's source distribution.  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.
-")
-THIRD_PARTY_EXECUTABLE(re2c RE2C re2c REQUIRED "BRLCAD_LEVEL2" ALIASES 
"ENABLE_RE2C" DESCRIPTION re2c_DESCRIPTION)
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/re2c/Makefile)
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/re2c/re2cParse_parser/parser.yy)
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/re2c/re2cParse_bootstrap_parser/parser.yy)
-SetTargetFolder(re2c "Compilation Utilities")
-SetTargetFolder(re2c_bootstrap "Compilation Utilities")
-# Make sure we load FindRE2C.cmake to be able to define RE2C targets.
-include(${BRLCAD_CMAKE_DIR}/FindRE2C.cmake)
-
-# Perplex is set up as a misc/tools sub-build, but at this time it is
-# entirely a BRL-CAD effort and not distributed or maintained as its
-# own project.
-
-# For all BRL-CAD projects, we will use the perplex template in
-# misc/tools/perplex
-set(PERPLEX_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/perplex/perplex_template.c" 
CACHE STRING "Perplex template file" FORCE)
-mark_as_advanced(PERPLEX_TEMPLATE)
-
-set(PERPLEX_SKIP_INSTALL 1)
-set(perplex_DESCRIPTION "
-Option for enabling and disabling compilation of the perplex scanner
-generator provided with BRL-CAD's source distribution.  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.  perplex requires a working re2c.
-")
-THIRD_PARTY_EXECUTABLE(perplex PERPLEX perplex REQUIRED "BRLCAD_LEVEL2" 
ALIASES "ENABLE_PERPLEX" DESCRIPTION perplex_DESCRIPTION NOSYS)
-# Make sure we load FindPERPLEX.cmake to be able to define PERPLEX targets.
-include(${BRLCAD_CMAKE_DIR}/FindPERPLEX.cmake)
-
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/perplex/Makefile)
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/perplex/PERPLEX_parser/parser.y)
-SetTargetFolder(perplex "Compilation Utilities")
-SetTargetFolder(perplex_template_cp "Compilation Utilities")
-
-
 # To enforce style guidelines rigorously, BRL-CAD bundles the
 # Artistic Style code formatter.  This tool is LGPLv3 licensed
 # and its code can *not* be used in BRL-CAD itself - it
@@ -182,18 +100,6 @@
 SetTargetFolder(xslt "Third Party Libraries")
 SetTargetFolder(exslt "Third Party Libraries")
 
-# env2c - Scanner to generate a list of environment variables used by
-# source code
-THIRD_PARTY_EXECUTABLE(env2c ENV2C env2c REQUIRED "BRLCAD_LEVEL2" NOSYS)
-SetTargetFolder(env2c "Compilation Utilities")
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/env2c/Makefile)
-
-# debug2c - Scanner to generate a list of debug variables used by
-# source code
-THIRD_PARTY_EXECUTABLE(debug2c DEBUG2C debug2c REQUIRED "BRLCAD_LEVEL2" NOSYS)
-SetTargetFolder(debug2c "Compilation Utilities")
-DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/debug2c/Makefile)
-
 # inactvhdrs - utility that tries to find local headers unused by other
 # source code in a file hierarchy
 CMAKEFILES(inactvhdrs/inactvhdrs.cpp)

Modified: brlcad/branches/thirdparty_rework/src/bwish/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/bwish/CMakeLists.txt  2020-09-29 
21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/bwish/CMakeLists.txt  2020-09-29 
21:55:16 UTC (rev 77279)
@@ -1,3 +1,4 @@
+find_package(TCL)
 
 if(TARGET libtclcad)
   set(BWISH_INCLUDE_DIRS

Modified: brlcad/branches/thirdparty_rework/src/bwish/cmd.c
===================================================================
--- brlcad/branches/thirdparty_rework/src/bwish/cmd.c   2020-09-29 21:13:18 UTC 
(rev 77278)
+++ brlcad/branches/thirdparty_rework/src/bwish/cmd.c   2020-09-29 21:55:16 UTC 
(rev 77279)
@@ -372,7 +372,7 @@
     }
 }
 
-
+#if 0
 #ifdef BWISH
 /* structure provided in libtclcad. provides -format pix-n-w support.
  * doesn't really seem to be used anywhere except here.
@@ -379,8 +379,8 @@
  */
 extern Tk_PhotoImageFormat tkImgFmtPIX;
 #endif
+#endif
 
-
 int
 cmdInit(Tcl_Interp *interp)
 {
@@ -395,10 +395,12 @@
     /* Register bwish/btclsh commands */
     register_cmds(interp, bwish_cmds);
 
+#if 0
 #ifdef BWISH
     /* Add pix format for images */
     Tk_CreatePhotoImageFormat(&tkImgFmtPIX);
 #endif
+#endif
 
     /* initialize command history */
     historyInit();

Modified: brlcad/branches/thirdparty_rework/src/libanalyze/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/libanalyze/CMakeLists.txt     
2020-09-29 21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/libanalyze/CMakeLists.txt     
2020-09-29 21:55:16 UTC (rev 77279)
@@ -23,6 +23,15 @@
   file(APPEND "${DEBUG_CMD_HDRS}" "${hdr}\n")
 endforeach(hdr ${NIRT_DBG_HDRS})
 
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag(-O3 O3_COMPILER_FLAG)
+
+add_executable(debug2c ../../misc/tools/debug2c/debug2c.cxx)
+if (O3_COMPILER_FLAG)
+  # If we have the O3 flag, use it
+  target_compile_options(debug2c PRIVATE "-O3")
+endif (O3_COMPILER_FLAG)
+
 add_custom_command(OUTPUT ${DEBUG_CMD_C}
   COMMAND debug2c ${DEBUG_CMD_HDRS} ${DEBUG_CMD_C}
   DEPENDS debug2c

Modified: brlcad/branches/thirdparty_rework/src/libged/env/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/libged/env/CMakeLists.txt     
2020-09-29 21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/libged/env/CMakeLists.txt     
2020-09-29 21:55:16 UTC (rev 77279)
@@ -7,6 +7,17 @@
   ${GED_INCLUDE_DIRS}
   )
 
+find_package(Threads)
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag(-O3 O3_COMPILER_FLAG)
+
+add_executable(env2c ../../../misc/tools/env2c/env2c.cxx)
+if (O3_COMPILER_FLAG)
+  # If we have the O3 flag, use it
+  target_compile_options(env2c PRIVATE "-O3")
+endif (O3_COMPILER_FLAG)
+target_link_libraries(env2c ${CMAKE_THREAD_LIBS_INIT})
+
 set(ENV_CMD_C "${CMAKE_CURRENT_BINARY_DIR}/env_cmd.c")
 add_custom_command(OUTPUT ${ENV_CMD_C}
   COMMAND env2c ${CMAKE_BINARY_DIR}/cmakefiles.cmake ${ENV_CMD_C}

Modified: brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt  2020-09-29 
21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt  2020-09-29 
21:55:16 UTC (rev 77279)
@@ -86,8 +86,6 @@
 
 find_package(TCL)
 
-CONFIG_H_APPEND(BRLCAD "#cmakedefine ITCL_VERSION \"${ITCL_VERSION}\"\n")
-
 if(0)
 # OpenSceneGraph Libraries
 set(openscenegraph_DESCRIPTION "

Modified: brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt     
2020-09-29 21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt     
2020-09-29 21:55:16 UTC (rev 77279)
@@ -226,7 +226,7 @@
   -DSUBBUILD=ON
   -DLEMON_ROOT=$<$<BOOL:${LEMON_TARGET}>:${CMAKE_BINARY_DIR}> 
-DLEMON_TEMPLATE=$<$<BOOL:${LEMON_TARGET}>:${LEMON_TEMPLATE}>
   -DRE2C_ROOT=$<$<BOOL:${RE2C_TARGET}>:${CMAKE_BINARY_DIR}>
-  -DPERPLEX_ROOT=$<$<BOOL:${PERPLEX_TARGET}>:${CMAKE_BINARY_DIR}> 
-DPERPLEX_TEMPLATE=$<$<BOOL:${PERPLEX_TARGET}>:${PERPLEX_TEMPLATE}>
+  -DPERPLEX_ROOT=$<$<BOOL:${PERPLEX_TARGET}>:${CMAKE_BINARY_DIR}> 
-DPERPLEX_TEMPLATE=${CMAKE_SOURCE_DIR}/misc/tools/perplex/perplex_template.c
   -DREGEX_ROOT=$<$<BOOL:${REGEX_TARGET}>:${CMAKE_BINARY_DIR}> 
-DREGEX_LIBRARY=$<$<BOOL:${REGEX_TARGET}>:${CMAKE_BINARY_DIR}/${LIB_DIR}/${REGEX_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}>
   -DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BINARY_DIR}> 
-DZLIB_LIBRARY=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BINARY_DIR}/${LIB_DIR}/${ZLIB_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}>
   -DPNG_ROOT=$<$<BOOL:${PNG_TARGET}>:${CMAKE_BINARY_DIR}> 
-DPNG_LIBRARY=$<$<BOOL:${PNG_TARGET}>:${CMAKE_BINARY_DIR}/${LIB_DIR}/${PNG_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}>

Modified: brlcad/branches/thirdparty_rework/src/util/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/util/CMakeLists.txt   2020-09-29 
21:13:18 UTC (rev 77278)
+++ brlcad/branches/thirdparty_rework/src/util/CMakeLists.txt   2020-09-29 
21:55:16 UTC (rev 77279)
@@ -1,3 +1,5 @@
+find_package(PNG)
+
 set(UTIL_INCLUDE_DIRS
   ${BU_INCLUDE_DIRS}
   ${BN_INCLUDE_DIRS}

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



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to