Revision: 77413
http://sourceforge.net/p/brlcad/code/77413
Author: starseeker
Date: 2020-10-13 18:11:14 +0000 (Tue, 13 Oct 2020)
Log Message:
-----------
Update the gdal build for the OBJECT issue as well, add a comment to the
section in BRLCAD_Targets.cmake that handles this for our targets.
Modified Paths:
--------------
brlcad/branches/thirdparty_rework/misc/CMake/BRLCAD_Targets.cmake
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libgeotiff/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libtiff/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/ozi/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/png/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/rik/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/ogr/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/gdal/port/CMakeLists.txt
Modified: brlcad/branches/thirdparty_rework/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/BRLCAD_Targets.cmake
2020-10-13 17:38:26 UTC (rev 77412)
+++ brlcad/branches/thirdparty_rework/misc/CMake/BRLCAD_Targets.cmake
2020-10-13 18:11:14 UTC (rev 77413)
@@ -444,6 +444,20 @@
set_property(TARGET ${libname}-obj APPEND PROPERTY COMPILE_DEFINITIONS
"${UPPER_CORE}_DLL_EXPORTS")
endif(HIDE_INTERNAL_SYMBOLS)
+ # If the library depends on other targets in this build, not just system
+ # libraries, make sure the object targets depends them as well. In
+ # principle this isn't always required - object compilation may be
+ # independent of the dependencies needed at link time - but if compilation
+ # DOES depends on those targets having first performed some action (like
+ # staging a header in an expected location) NOT setting this dependency
+ # explicitly will eventually cause build failures.
+ #
+ # Without setting the OBJECT dependencies, success in the above case would
+ # depend on whether or not the high level build ordering happened to run
+ # the required targets before performing this step. That failure mode is
+ # semi-random and intermittent (top level build ordering without explicit
+ # dependencies varies depending on -j flag values) making it hard to debug.
+ # Ask me how I know.
if(NOT "${libslist}" STREQUAL "" AND NOT "${libslist}" STREQUAL "NONE")
foreach(ll ${libslist})
if (TARGET ${ll})
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libgeotiff/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libgeotiff/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libgeotiff/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,6 +1,7 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../libtiff
+ ${PROJ4_INCLUDE_DIRS}
)
set(libgeotiff_srcs
@@ -24,3 +25,7 @@
add_library(libgeotiff_obj OBJECT ${libgeotiff_srcs})
set_target_properties(libgeotiff_obj PROPERTIES FOLDER "Third Party
Libraries/GDAL")
+if(TARGET proj)
+ add_dependencies(libgeotiff_obj proj)
+endif(TARGET proj)
+
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libtiff/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libtiff/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/gtiff/libtiff/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,5 +1,6 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
)
set(libtiff_srcs
@@ -51,3 +52,7 @@
add_library(libtiff_obj OBJECT ${libtiff_srcs})
set_target_properties(libtiff_obj PROPERTIES FOLDER "Third Party
Libraries/GDAL")
+if (TARGET "${ZLIB_LIBRARY}")
+ add_dependencies(libtiff_obj "${ZLIB_LIBRARY}")
+endif (TARGET "${ZLIB_LIBRARY}")
+
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/ozi/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/ozi/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/ozi/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,2 +1,9 @@
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
add_library(frmt_ozi OBJECT ozidataset.cpp)
+if (TARGET "${ZLIB_LIBRARY}")
+ add_dependencies(frmt_ozi ${ZLIB_LIBRARY})
+endif (TARGET "${ZLIB_LIBRARY}")
+
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/png/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/png/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/png/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,4 +1,8 @@
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ ${PNG_INCLUDE_DIRS}
+ )
add_library(frmt_png OBJECT pngdataset.cpp)
if (TARGET png)
add_dependencies(frmt_png png)
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/rik/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/rik/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++
brlcad/branches/thirdparty_rework/src/superbuild/gdal/frmts/rik/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,2 +1,9 @@
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
add_library(frmt_rik OBJECT rikdataset.cpp)
+if (TARGET "${ZLIB_LIBRARY}")
+ add_dependencies(frmt_rik ${ZLIB_LIBRARY})
+endif (TARGET "${ZLIB_LIBRARY}")
+
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/ogr/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/gdal/ogr/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++ brlcad/branches/thirdparty_rework/src/superbuild/gdal/ogr/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -7,6 +7,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/ogrsf_frmts/mem
${CMAKE_CURRENT_SOURCE_DIR}/ogrsf_frmts/geojson
${CMAKE_CURRENT_SOURCE_DIR}/ogrsf_frmts/geojson/libjson
+ ${PROJ4_INCLUDE_DIRS}
)
set(ogr_srcs
@@ -77,4 +78,7 @@
add_library(gdal_ogr_obj OBJECT ${ogr_srcs})
set_target_properties(gdal_ogr_obj PROPERTIES FOLDER "Third Party
Libraries/GDAL")
+if(TARGET proj)
+ add_dependencies(gdal_ogr_obj proj)
+endif(TARGET proj)
Modified:
brlcad/branches/thirdparty_rework/src/superbuild/gdal/port/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/gdal/port/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
+++ brlcad/branches/thirdparty_rework/src/superbuild/gdal/port/CMakeLists.txt
2020-10-13 18:11:14 UTC (rev 77413)
@@ -1,3 +1,7 @@
+include_directories(
+ ${ZLIB_INCLUDE_DIRS}
+ )
+
set(cpl_srcs
cpl_conv.cpp
cpl_error.cpp
@@ -65,4 +69,7 @@
add_library(gdal_cpl_obj OBJECT ${cpl_srcs})
set_target_properties(gdal_cpl_obj PROPERTIES FOLDER "Third Party
Libraries/GDAL")
+if (TARGET "${ZLIB_LIBRARY}")
+ add_dependencies(gdal_cpl_obj ${ZLIB_LIBRARY})
+endif (TARGET "${ZLIB_LIBRARY}")
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