Skip to content

Commit

Permalink
smesh: [skip ci] build FEM & MeshPart with C++14 when using external …
Browse files Browse the repository at this point in the history
…smesh because it doesn't support C++17 yet
  • Loading branch information
wwmayer committed Mar 31, 2021
1 parent 663ac99 commit 5169a7e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Mod/Fem/App/CMakeLists.txt
Expand Up @@ -176,7 +176,7 @@ SET(FemConstraints_SRCS
FemConstraintContact.h
FemConstraintTransform.cpp
FemConstraintTransform.h
)
)
SOURCE_GROUP("Constraints" FILES ${FemConstraints_SRCS})


Expand All @@ -198,6 +198,12 @@ endif(FREECAD_USE_PCH)
add_library(Fem SHARED ${Fem_SRCS})
target_link_libraries(Fem ${Fem_LIBS} ${VTK_LIBRARIES})

# external SMESH doesn't support C++17 yet
if(FREECAD_USE_EXTERNAL_SMESH)
set_target_properties(Fem PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(Fem PROPERTIES CXX_STANDARD 14)
endif()


SET_BIN_DIR(Fem Fem /Mod/Fem)
SET_PYTHON_PREFIX_SUFFIX(Fem)
Expand Down
6 changes: 6 additions & 0 deletions src/Mod/Fem/Gui/CMakeLists.txt
Expand Up @@ -394,6 +394,12 @@ SET(FemGuiIcon_SVG
add_library(FemGui SHARED ${FemGui_SRCS} ${FemGuiIcon_SVG})
target_link_libraries(FemGui ${FemGui_LIBS} ${VTK_LIBRARIES})

# external SMESH doesn't support C++17 yet
if(FREECAD_USE_EXTERNAL_SMESH)
set_target_properties(FemGui PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(FemGui PROPERTIES CXX_STANDARD 14)
endif()


fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiIcon_SVG})

Expand Down
6 changes: 6 additions & 0 deletions src/Mod/MeshPart/App/CMakeLists.txt
Expand Up @@ -65,6 +65,12 @@ set(MeshPart_Scripts
add_library(MeshPart SHARED ${MeshPart_SRCS} ${MeshPart_Scripts})
target_link_libraries(MeshPart ${MeshPart_LIBS})

# external SMESH doesn't support C++17 yet
if(FREECAD_USE_EXTERNAL_SMESH)
set_target_properties(MeshPart PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(MeshPart PROPERTIES CXX_STANDARD 14)
endif()


fc_target_copy_resource_flat(MeshPart
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
6 changes: 6 additions & 0 deletions src/Mod/MeshPart/Gui/CMakeLists.txt
Expand Up @@ -91,6 +91,12 @@ set(FLATMESH_PY_SRCS
add_library(MeshPartGui SHARED ${MeshPartGui_SRCS} ${MeshPartGui_Scripts} ${FLATMESH_PY_SRCS})
target_link_libraries(MeshPartGui ${MeshPartGui_LIBS})

# external SMESH doesn't support C++17 yet
if(FREECAD_USE_EXTERNAL_SMESH)
set_target_properties(MeshPartGui PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(MeshPartGui PROPERTIES CXX_STANDARD 14)
endif()


SET_BIN_DIR(MeshPartGui MeshPartGui /Mod/MeshPart)
SET_PYTHON_PREFIX_SUFFIX(MeshPartGui)
Expand Down

4 comments on commit 5169a7e

@adrianinsaval
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @wwmayer @looooo as mentioned here https://forum.freecad.org/viewtopic.php?p=667543#p667543 this seems to be causing trouble for compilation on conda now, is this still necessary?

@wwmayer
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looooo should know whether smesh supports C++17 now. If yes these blocks can be removed.

@adrianinsaval
Copy link

@adrianinsaval adrianinsaval commented on 5169a7e Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://forum.freecad.org/viewtopic.php?style=5&p=669533#p669533

it is not required anymore, I suspect it was fixed here: trelau/SMESH#41

could you revert this commit please @wwmayer ? conda builds are not working right now due to this. Do you want me to make a PR?

@wwmayer
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.