Fix boost link issues

This commit is contained in:
Louis Gombert 2024-08-19 14:22:54 +00:00
parent 71d64ca6f8
commit 82e0e50732
3 changed files with 9 additions and 8 deletions

View File

@ -29,8 +29,9 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
if (DEFINED EMSCRIPTEN)
list(APPEND CMAKE_FIND_ROOT_PATH "/")
message("Using Emscripten")
add_compile_options("-sUSE_BOOST_HEADERS=1" "-pthread")
add_link_options("-pthread")
add_compile_options(-sUSE_BOOST_HEADERS=1 -pthread)
add_link_options(-sUSE_BOOST_HEADERS=1 -pthread)
add_compile_definitions(__EMSCRIPTEN__)
else()
message("Not using Emscripten")
endif()

View File

@ -127,7 +127,7 @@ SET(SMESHEngine_SOURCES
SMESH_Gen_i_1.cxx
SMESH_Gen_No_Session_i.cxx
SMESH_Gen_Session_i.cxx
SMESH_PythonDump.cxx
# SMESH_PythonDump.cxx # EMscripten: duplicate symbol
SMESH_Mesh_i.cxx
SMESH_subMesh_i.cxx
SMESH_MeshEditor_i.cxx

View File

@ -153,9 +153,9 @@
#include <cstdlib>
#include <memory>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/list.hpp>
#include <boost/serialization/string.hpp>
// #include <boost/archive/text_oarchive.hpp>
// #include <boost/serialization/list.hpp>
// #include <boost/serialization/string.hpp>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
@ -4966,7 +4966,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
}
// convert orderEntryLists to string
std::ostringstream ostream;
boost::archive::text_oarchive( ostream ) << orderEntryLists;
// boost::archive::text_oarchive( ostream ) << orderEntryLists;
std::string orderEntryString = ostream.str();
// write HDF group
@ -6153,7 +6153,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
aDataset->CloseOnDisk();
std::list< std::list< std::string > > orderEntryLists;
SMESHUtils::BoostTxtArchive( dataString ) >> orderEntryLists;
// SMESHUtils::BoostTxtArchive( dataString ) >> orderEntryLists;
TListOfListOfInt anOrderIds;
for ( const std::list< std::string >& entryList : orderEntryLists )