Revision: 76038
          http://sourceforge.net/p/brlcad/code/76038
Author:   starseeker
Date:     2020-06-05 19:26:15 +0000 (Fri, 05 Jun 2020)
Log Message:
-----------
Merge changes from trunk - r76034 through r76037

Modified Paths:
--------------
    brlcad/branches/dm-fb-merge/CMakeLists.txt
    brlcad/branches/dm-fb-merge/db/conv_run.cmake.in
    brlcad/branches/dm-fb-merge/include/common.h

Property Changed:
----------------
    brlcad/branches/dm-fb-merge/
    brlcad/branches/dm-fb-merge/db/
    brlcad/branches/dm-fb-merge/include/

Index: brlcad/branches/dm-fb-merge
===================================================================
--- brlcad/branches/dm-fb-merge 2020-06-05 19:11:32 UTC (rev 76037)
+++ brlcad/branches/dm-fb-merge 2020-06-05 19:26:15 UTC (rev 76038)

Property changes on: brlcad/branches/dm-fb-merge
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
 /brlcad/branches/osg:62110-62113
 /brlcad/branches/prep-cache:68236-68933
 /brlcad/branches/tcltk86:68300-75257
-/brlcad/trunk:75440-76034
\ No newline at end of property
+/brlcad/trunk:75440-76037
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/CMakeLists.txt  2020-06-05 19:11:32 UTC (rev 
76037)
+++ brlcad/branches/dm-fb-merge/CMakeLists.txt  2020-06-05 19:26:15 UTC (rev 
76038)
@@ -1966,20 +1966,6 @@
   CONFIG_H_APPEND(BRLCAD "#define HAVE_WARN_UNUSED_RESULT_ATTRIBUTE 1\n")
 endif(HAVE_WARN_UNUSED_RESULT_ATTRIBUTE)
 
-# Check whether the compiler supports __attribute__((visibility ("default")))
-check_c_source_compiles(" __attribute__((visibility (\"default\"))) int 
*func(int *); int *func(int *v){(*v)-=1; return v;} int main(int argc, char 
*argv[]) {int v = 1; int *vp = func(&v); return *vp;}" 
HAVE_VISIBILITY_DEFAULT_ATTRIBUTE)
-if(HAVE_VISIBILITY_DEFAULT_ATTRIBUTE)
-  CONFIG_H_APPEND(BRLCAD "#define COMPILER_DLLEXPORT __attribute__ 
((visibility (\"default\")))\n")
-  CONFIG_H_APPEND(BRLCAD "#define COMPILER_DLLIMPORT __attribute__ 
((visibility (\"default\")))\n")
-endif(HAVE_VISIBILITY_DEFAULT_ATTRIBUTE)
-
-# Check whether the compiler supports __declspec(dllexport)
-check_c_source_compiles(" __declspec(dllexport) int *func(int *); int 
*func(int *v){(*v)-=1; return v;} int main(int argc, char *argv[]) {int v = 1; 
int *vp = func(&v); return *vp;}" HAVE_DECLSPEC_EXPORT_ATTRIBUTE)
-if(HAVE_DECLSPEC_EXPORT_ATTRIBUTE)
-  CONFIG_H_APPEND(BRLCAD "#define COMPILER_DLLEXPORT __declspec(dllexport)\n")
-  CONFIG_H_APPEND(BRLCAD "#define COMPILER_DLLIMPORT __declspec(dllimport)\n")
-endif(HAVE_DECLSPEC_EXPORT_ATTRIBUTE)
-
 # 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.

Index: brlcad/branches/dm-fb-merge/db
===================================================================
--- brlcad/branches/dm-fb-merge/db      2020-06-05 19:11:32 UTC (rev 76037)
+++ brlcad/branches/dm-fb-merge/db      2020-06-05 19:26:15 UTC (rev 76038)

Property changes on: brlcad/branches/dm-fb-merge/db
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
 /brlcad/branches/osg/db:62110-62113
 /brlcad/branches/prep-cache/db:68236-68933
 /brlcad/branches/tcltk86/db:68300-75257
-/brlcad/trunk/db:75988-76034
\ No newline at end of property
+/brlcad/trunk/db:75988-76037
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/db/conv_run.cmake.in
===================================================================
--- brlcad/branches/dm-fb-merge/db/conv_run.cmake.in    2020-06-05 19:11:32 UTC 
(rev 76037)
+++ brlcad/branches/dm-fb-merge/db/conv_run.cmake.in    2020-06-05 19:26:15 UTC 
(rev 76038)
@@ -1,6 +1,7 @@
 string(REPLACE "\\" "" GCV_EXEC "${EXEC}")
 set(INPUT_FILE "@INPUT_FILE@")
 set(OUTPUT_FILE "@OUTPUT_FILE@")
+set(BIN_DIR "@BIN_DIR@")
 
 # NOTE: OUTPUT_FILE needs to be defined in terms of a path relative to the root
 # of the build diretory, not as an absolute path.  Since that root may change
@@ -11,11 +12,10 @@
   message(FATAL_ERROR "Absoute output file path \"${OUTPUT_FILE}\" supplied 
for conversion of \"${INPUT_FILE}\" - path must be relative.")
 endif ("${OF_ABS}" STREQUAL "${OUTPUT_FILE}")
 
-#  Because the build directory changes at runtime in multiconfig builds, we
-#  need to deduce its current value from GCV_EXEC.
-# TODO - this breaks if the bin directory is more than one deep...
+# Because the build directory changes at runtime in multiconfig builds, we
+# need to deduce its current value from GCV_EXEC.
 get_filename_component(CBDIR "${GCV_EXEC}" DIRECTORY)
-get_filename_component(CROOT "${CBDIR}" DIRECTORY)
+string(REGEX REPLACE "${BIN_DIR}$" "" CROOT "${CBDIR}")
 
 # BRLCAD_ROOT is the hammer that makes certain we are running
 # things found in the build directory.

Index: brlcad/branches/dm-fb-merge/include
===================================================================
--- brlcad/branches/dm-fb-merge/include 2020-06-05 19:11:32 UTC (rev 76037)
+++ brlcad/branches/dm-fb-merge/include 2020-06-05 19:26:15 UTC (rev 76038)

Property changes on: brlcad/branches/dm-fb-merge/include
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
 /brlcad/branches/osg/include:62110-62113
 /brlcad/branches/prep-cache/include:68236-68933
 /brlcad/branches/tcltk86/include:68300-75257
-/brlcad/trunk/include:75463-75467,75630-75814,75880-76034
\ No newline at end of property
+/brlcad/trunk/include:75463-75467,75630-75814,75880-76037
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/include/common.h
===================================================================
--- brlcad/branches/dm-fb-merge/include/common.h        2020-06-05 19:11:32 UTC 
(rev 76037)
+++ brlcad/branches/dm-fb-merge/include/common.h        2020-06-05 19:26:15 UTC 
(rev 76038)
@@ -529,11 +529,14 @@
  * define them away so code including the *_EXPORT header logic won't
  * fail.
  */
-#ifndef COMPILER_DLLEXPORT
+#if defined(_MSC_VER)
+#  define COMPILER_DLLEXPORT __declspec(dllexport)
+#  define COMPILER_DLLIMPORT __declspec(dllimport)
+#elif defined(__GNUC__) || defined(__clang__)
+#  define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+#  define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#else
 #  define COMPILER_DLLEXPORT
-#endif
-
-#ifndef COMPILER_DLLIMPORT
 #  define COMPILER_DLLIMPORT
 #endif
 

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