Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
989c1e9
Update Superbuild.cmake
basisunus Mar 23, 2026
7ebfb87
Update BoostExternal.cmake
basisunus Mar 23, 2026
1a40247
boost python missing
basisunus Mar 23, 2026
849dc8e
boost-python issues
basisunus Mar 25, 2026
d66952c
Update PythonInterpreter.cc
basisunus Mar 25, 2026
53a1168
Update TetgenExternal.cmake
basisunus Mar 25, 2026
6bda6a0
Update InterfaceWithTetGenImpl.cc
basisunus Mar 25, 2026
ca833a1
updated qwt
basisunus Mar 27, 2026
0f8a4bd
work on windows
basisunus Mar 31, 2026
de97933
rewriting boost libs for windows
basisunus Mar 31, 2026
25f9ce9
fixing boost issues again
basisunus Apr 1, 2026
3c2a119
cmake always has problem with boost on windows
basisunus Apr 2, 2026
7876330
boost seems to be working
basisunus Apr 3, 2026
8654213
need to add missing boost libs to link targets for projects with link…
basisunus Apr 6, 2026
0621065
fixing qwt path
basisunus Apr 7, 2026
ca75c5f
removed target include because it should be included in top level cma…
basisunus Apr 7, 2026
d57553c
more errors are from qt
basisunus Apr 7, 2026
3ef75f6
added missing qt libs linked by qwt
basisunus Apr 8, 2026
7409ee7
updated qwt wrapper
basisunus Apr 8, 2026
bd4e6ed
Update BoostConfig.cmake.in
basisunus Apr 8, 2026
049a90c
Update BoostConfig.cmake.in
basisunus Apr 8, 2026
b735a58
Update BoostConfig.cmake.in
basisunus Apr 9, 2026
b0e04f0
Update BoostConfig.cmake.in
basisunus Apr 9, 2026
761a269
Update BoostConfig.cmake.in
basisunus Apr 9, 2026
c5e00b2
qwt is static
basisunus Apr 9, 2026
653c551
make qwt static on mac
basisunus Apr 9, 2026
b98a028
added qt path for debugging
basisunus Apr 13, 2026
b65c0d4
python debug vs release issue
basisunus Apr 16, 2026
cd84df9
restored writing jam file
basisunus Apr 16, 2026
2d471b0
building boost with python debug
basisunus Apr 17, 2026
bacb4b4
updated finding boost logic
basisunus Apr 17, 2026
97077ab
removed python release lib from core_python
basisunus Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ cmake

# Sphinx builds
docs/_build/
/build
187 changes: 181 additions & 6 deletions Superbuild/BoostConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,181 @@
set(SCI_BOOST_INCLUDE "@SCI_BOOST_INCLUDE@")

# These are IMPORTED targets created by FooBarTargets.cmake
set(SCI_BOOST_LIBRARY @SCI_BOOST_LIBRARY@)
set(SCI_BOOST_LIBRARY_DIR "@SCI_BOOST_LIBRARY_DIR@")
set(SCI_BOOST_USE_FILE "@SCI_BOOST_USE_FILE@")
# ============================================================================
# BoostConfig.cmake - generated by SCIRun superbuild
# ============================================================================

@PACKAGE_INIT@

set(Boost_FOUND TRUE)

# ---------------------------------------------------------------------------
# Paths
# ---------------------------------------------------------------------------
set(Boost_INCLUDE_DIRS "@SCI_BOOST_INCLUDE@")
set(Boost_LIBRARY_DIR "@SCI_BOOST_LIBRARY_DIR@")

# ---------------------------------------------------------------------------
# Helper: define Boost imported library target (cross-platform)
# ---------------------------------------------------------------------------
function(_scirun_define_boost_target lib)
# If Boost already created the target, just ensure includes
if(TARGET Boost::${lib})
set_target_properties(Boost::${lib} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
)
return()
endif()

# Boost.Atomic is header-only on macOS
if(APPLE AND lib STREQUAL "atomic")
add_library(Boost::atomic INTERFACE IMPORTED)
set_target_properties(Boost::atomic PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
)
return()
endif()

# Create imported library target
add_library(Boost::${lib} UNKNOWN IMPORTED)
set_target_properties(Boost::${lib} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
)

# Boost.Python static macro (SCIRun convention)
if(lib MATCHES "^python")
set_target_properties(Boost::${lib} PROPERTIES
INTERFACE_COMPILE_DEFINITIONS BOOST_PYTHON_STATIC_LIB
)
endif()

# Detect architecture
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_boost_arch "x64")
else()
set(_boost_arch "x32")
endif()

set(_release_lib "")
set(_debug_lib "")

# -------------------------------------------------------------------------
# Windows: SCIRun-built Boost uses tagged .lib names
# -------------------------------------------------------------------------
if(WIN32)
file(GLOB _all_candidates
"${Boost_LIBRARY_DIR}/libboost_${lib}-*.lib"
)

list(FILTER _all_candidates INCLUDE REGEX "-${_boost_arch}-")

if(NOT _all_candidates)
message(FATAL_ERROR
"Boost '${lib}' not found for architecture ${_boost_arch}\n"
"Directory: ${Boost_LIBRARY_DIR}"
)
endif()

# -----------------------------------------------------------------------
# ABI-aware Debug / Release selection (Boost 1.8+)
#
# Rules:
# - Debug libraries contain '-g'
# - Release libraries do NOT contain '-g'
# - 'y' means Python enabled and may appear in BOTH
# -----------------------------------------------------------------------

# Debug candidates
set(_dbg_candidates "${_all_candidates}")
list(FILTER _dbg_candidates INCLUDE REGEX "-g")

if(_dbg_candidates)
list(GET _dbg_candidates 0 _debug_lib)
endif()

# Release candidates
set(_rel_candidates "${_all_candidates}")
list(FILTER _rel_candidates EXCLUDE REGEX "-g")

if(_rel_candidates)
list(GET _rel_candidates 0 _release_lib)
endif()

# -------------------------------------------------------------------------
# macOS / Linux
# -------------------------------------------------------------------------
else()
file(GLOB _all_candidates
"${Boost_LIBRARY_DIR}/libboost_${lib}.a"
"${Boost_LIBRARY_DIR}/libboost_${lib}-mt.a"
"${Boost_LIBRARY_DIR}/libboost_${lib}.dylib"
"${Boost_LIBRARY_DIR}/libboost_${lib}-mt.dylib"
)

if(NOT _all_candidates)
message(FATAL_ERROR
"Boost library '${lib}' could not be resolved.\n"
"Directory: ${Boost_LIBRARY_DIR}\n"
"Platform: ${CMAKE_SYSTEM_NAME}"
)
endif()

list(GET _all_candidates 0 _release_lib)
set(_debug_lib "${_release_lib}")
endif()

# -------------------------------------------------------------------------
# Fail fast if resolution failed
# -------------------------------------------------------------------------
if(NOT _release_lib OR NOT _debug_lib)
message(FATAL_ERROR
"Boost library '${lib}' could not be resolved for both configurations.\n"
"All candidates:\n ${_all_candidates}"
)
endif()

set_target_properties(Boost::${lib} PROPERTIES
IMPORTED_CONFIGURATIONS "Release;Debug"
IMPORTED_LOCATION_RELEASE "${_release_lib}"
IMPORTED_LOCATION_DEBUG "${_debug_lib}"
)
endfunction()

# ---------------------------------------------------------------------------
# Core Boost components
# ---------------------------------------------------------------------------
_scirun_define_boost_target(atomic)
_scirun_define_boost_target(chrono)
_scirun_define_boost_target(date_time)
_scirun_define_boost_target(filesystem)
_scirun_define_boost_target(program_options)
_scirun_define_boost_target(regex)
_scirun_define_boost_target(serialization)
_scirun_define_boost_target(thread)

# ---------------------------------------------------------------------------
# Boost.Python (optional)
# ---------------------------------------------------------------------------
if(@BUILD_WITH_PYTHON@)
_scirun_define_boost_target(python@SCI_PYTHON_VERSION_SHORT_WIN32@)
endif()

# ---------------------------------------------------------------------------
# Compatibility variables
# ---------------------------------------------------------------------------
set(Boost_LIBRARIES
Boost::atomic
Boost::chrono
Boost::date_time
Boost::filesystem
Boost::program_options
Boost::regex
Boost::serialization
Boost::thread
)

add_library(Boost::headers INTERFACE IMPORTED)
set_target_properties(Boost::headers PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
)

if(@BUILD_WITH_PYTHON@)
list(APPEND Boost_LIBRARIES Boost::python@SCI_PYTHON_VERSION_SHORT_WIN32@)
endif()
Loading
Loading