clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors
This commit is contained in:
@@ -58,6 +58,8 @@ macro(InitializeFreeCADBuildOptions)
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
message(STATUS "Visit: https://github.com/FreeCAD/FreeCAD-Libpack/releases/ for Windows libpack downloads.")
|
||||
endif()
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
option(FREECAD_WARN_ERROR "Make all warnings into errors. " OFF)
|
||||
else(MSVC)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
|
||||
@@ -268,3 +268,9 @@ MACRO(SET_PYTHON_PREFIX_SUFFIX ProjectName)
|
||||
set_target_properties(${ProjectName} PROPERTIES SUFFIX ".so")
|
||||
endif(WIN32)
|
||||
ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
|
||||
|
||||
function(target_compile_warn_error ProjectName)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
target_compile_options(${ProjectName} PRIVATE -Werror)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -342,6 +342,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(FreeCADApp SHARED ${FreeCADApp_SRCS})
|
||||
target_link_libraries(FreeCADApp ${FreeCADApp_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADApp)
|
||||
endif()
|
||||
|
||||
add_dependencies(FreeCADApp fc_version)
|
||||
|
||||
|
||||
@@ -388,6 +388,9 @@ endif(FREECAD_USE_PCH)
|
||||
add_library(FreeCADBase SHARED ${FreeCADBase_SRCS})
|
||||
|
||||
target_link_libraries(FreeCADBase ${FreeCADBase_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADBase)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADBase FreeCADBase)
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ if (FREECAD_USE_3DCONNEXION)
|
||||
endif(FREECAD_USE_3DCONNEXION)
|
||||
|
||||
if(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
add_definitions(-DUSE_3DCONNEXION_NAVLIB)
|
||||
if(APPLE)
|
||||
add_definitions(-D__APPLE__)
|
||||
endif(APPLE)
|
||||
set(3DCONNEXION_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/3Dconnexion/inc)
|
||||
add_definitions(-DUSE_3DCONNEXION_NAVLIB)
|
||||
if(APPLE)
|
||||
add_definitions(-D__APPLE__)
|
||||
endif(APPLE)
|
||||
set(3DCONNEXION_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/3Dconnexion/inc)
|
||||
endif(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
|
||||
if (BUILD_VR)
|
||||
@@ -1344,6 +1344,9 @@ endif ()
|
||||
|
||||
add_library(FreeCADGui SHARED ${FreeCADGui_SRCS})
|
||||
target_link_libraries(FreeCADGui ${FreeCADGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADGui FreeCADGui)
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ if(BUILD_GUI)
|
||||
|
||||
add_executable(FreeCADMain WIN32 ${FreeCAD_SRCS})
|
||||
target_link_libraries(FreeCADMain ${FreeCAD_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADMain)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADMain FreeCAD)
|
||||
|
||||
@@ -92,6 +95,9 @@ endif(NOT BUILD_DYNAMIC_LINK_PYTHON)
|
||||
target_link_libraries(FreeCADMainCmd
|
||||
${FreeCADMainCmd_LIBS}
|
||||
)
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADMainCmd)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADMainCmd FreeCADCmd)
|
||||
|
||||
@@ -120,6 +126,9 @@ SET(FreeCADMainPy_SRCS
|
||||
add_library(FreeCADMainPy SHARED ${FreeCADMainPy_SRCS})
|
||||
|
||||
target_link_libraries(FreeCADMainPy FreeCADApp)
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADMainPy)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADMainPy FreeCAD)
|
||||
SET_PYTHON_PREFIX_SUFFIX(FreeCADMainPy)
|
||||
@@ -145,6 +154,9 @@ if(BUILD_GUI)
|
||||
add_library(FreeCADGuiPy SHARED ${FreeCADGuiPy_SRCS})
|
||||
|
||||
target_link_libraries(FreeCADGuiPy FreeCADGui)
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FreeCADGuiPy)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(FreeCADGuiPy FreeCADGui)
|
||||
SET_PYTHON_PREFIX_SUFFIX(FreeCADGuiPy)
|
||||
|
||||
@@ -52,6 +52,9 @@ SET(Assembly_SRCS
|
||||
|
||||
add_library(Assembly SHARED ${Assembly_SRCS})
|
||||
target_link_libraries(Assembly ${Assembly_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Assembly)
|
||||
endif()
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
|
||||
@@ -67,6 +67,9 @@ SET(AssemblyGuiIcon_SVG
|
||||
|
||||
add_library(AssemblyGui SHARED ${AssemblyGui_SRCS} ${AssemblyGuiIcon_SVG})
|
||||
target_link_libraries(AssemblyGui ${AssemblyGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(AssemblyGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(AssemblyGui AssemblyGui /Mod/Assembly)
|
||||
SET_PYTHON_PREFIX_SUFFIX(AssemblyGui)
|
||||
|
||||
@@ -17,7 +17,6 @@ include_directories(
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
set(Path_LIBS
|
||||
# Robot
|
||||
Part
|
||||
area-native
|
||||
FreeCADApp
|
||||
@@ -120,6 +119,9 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
|
||||
add_library(Path SHARED ${Path_SRCS})
|
||||
target_link_libraries(Path ${Path_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Path)
|
||||
endif()
|
||||
|
||||
# Boost >= 1.75.0
|
||||
if(NOT ${Boost_VERSION} LESS 107500)
|
||||
|
||||
@@ -85,6 +85,9 @@ SET(PathGuiIcon_SVG
|
||||
|
||||
add_library(PathGui SHARED ${PathGui_SRCS} ${PathGuiIcon_SVG})
|
||||
target_link_libraries(PathGui ${PathGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PathGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(PathGui PathGui /Mod/CAM)
|
||||
SET_PYTHON_PREFIX_SUFFIX(PathGui)
|
||||
|
||||
@@ -43,6 +43,9 @@ SOURCE_GROUP("Python" FILES ${Python_SRCS})
|
||||
|
||||
add_library(PathSimulator SHARED ${PathSimulator_SRCS})
|
||||
target_link_libraries(PathSimulator ${PathSimulator_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PathSimulator)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(PathSimulator PathSimulator /Mod/CAM)
|
||||
SET_PYTHON_PREFIX_SUFFIX(PathSimulator)
|
||||
|
||||
@@ -96,6 +96,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(CAMSimulator SHARED ${CAMSimulator_SRCS})
|
||||
target_link_libraries(CAMSimulator ${CAMSimulator_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(CAMSimulator)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(CAMSimulator CAMSimulator /Mod/CAM)
|
||||
SET_PYTHON_PREFIX_SUFFIX(CAMSimulator)
|
||||
|
||||
@@ -31,6 +31,9 @@ SET(DraftUtils_SRCS
|
||||
|
||||
add_library(DraftUtils SHARED ${DraftUtils_SRCS})
|
||||
target_link_libraries(DraftUtils ${DraftUtils_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(DraftUtils)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(DraftUtils DraftUtils /Mod/Draft)
|
||||
|
||||
@@ -67,6 +67,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
|
||||
target_link_libraries(Drawing ${Drawing_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Drawing)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Drawing Drawing /Mod/Drawing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Drawing)
|
||||
|
||||
@@ -83,6 +83,9 @@ SET(DrawingGuiIcon_SVG
|
||||
add_library(DrawingGui SHARED ${DrawingGui_SRCS} ${DrawingGuiView_SRCS}
|
||||
${DrawingGuiViewProvider_SRCS} ${DrawingGuiIcon_SVG})
|
||||
target_link_libraries(DrawingGui ${DrawingGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(DrawingGui)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(DrawingGui DrawingGui /Mod/Drawing)
|
||||
|
||||
@@ -197,6 +197,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Fem SHARED ${Fem_SRCS})
|
||||
target_link_libraries(Fem ${Fem_LIBS} ${VTK_LIBRARIES})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Fem)
|
||||
endif()
|
||||
|
||||
find_package(OpenMP 4.0)
|
||||
if(OpenMP_CXX_FOUND)
|
||||
|
||||
@@ -369,6 +369,9 @@ SET(FemGuiSymbol_IV
|
||||
|
||||
add_library(FemGui SHARED ${FemGui_SRCS} ${FemGuiIcon_SVG} ${FemGuiSymbol_IV})
|
||||
target_link_libraries(FemGui ${FemGui_LIBS} ${VTK_LIBRARIES})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(FemGui)
|
||||
endif()
|
||||
|
||||
fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiIcon_SVG})
|
||||
fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiSymbol_IV})
|
||||
|
||||
@@ -87,6 +87,9 @@ generate_from_xml(StepShapePy)
|
||||
|
||||
add_library(Import SHARED ${Import_SRCS})
|
||||
target_link_libraries(Import ${Import_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Import)
|
||||
endif()
|
||||
|
||||
ADD_CUSTOM_TARGET(ImportPy ALL
|
||||
SOURCES ${SCL_Resources}
|
||||
|
||||
@@ -39,6 +39,9 @@ SET(ImportGui_SRCS
|
||||
|
||||
add_library(ImportGui SHARED ${ImportGui_SRCS})
|
||||
target_link_libraries(ImportGui ${ImportGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(ImportGui)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(ImportGui ImportGui /Mod/Import)
|
||||
|
||||
@@ -38,6 +38,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Inspection SHARED ${Inspection_SRCS} ${Inspection_Scripts})
|
||||
target_link_libraries(Inspection ${Inspection_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Inspection)
|
||||
endif()
|
||||
|
||||
fc_target_copy_resource_flat(Inspection
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
||||
@@ -57,6 +57,9 @@ SET(InspectionGuiIcon_SVG
|
||||
|
||||
add_library(InspectionGui SHARED ${InspectionGui_SRCS} ${InspectionGui_Scripts} ${InspectionGuiIcon_SVG})
|
||||
target_link_libraries(InspectionGui ${InspectionGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(InspectionGui)
|
||||
endif()
|
||||
|
||||
|
||||
fc_target_copy_resource_flat(InspectionGui
|
||||
|
||||
@@ -56,6 +56,9 @@ SOURCE_GROUP("Module" FILES ${JtReader_SRCS})
|
||||
|
||||
add_library(JtReader SHARED ${JtReader_SRCS} ${JRJT_SRCS} ${JtReader_Scripts})
|
||||
target_link_libraries(JtReader ${JtReader_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(JtReader)
|
||||
endif()
|
||||
|
||||
fc_target_copy_resource_flat(JtReader
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
||||
@@ -118,6 +118,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Materials SHARED ${Materials_SRCS})
|
||||
target_link_libraries(Materials ${Materials_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Materials)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Materials Materials /Mod/Material)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Materials)
|
||||
|
||||
@@ -156,6 +156,9 @@ SET(MatGuiImages
|
||||
|
||||
add_library(MatGui SHARED ${MatGui_SRCS} ${MatGuiIcon_SVG} ${MatGuiImages})
|
||||
target_link_libraries(MatGui ${MatGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(MatGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(MatGui MatGui /Mod/Material)
|
||||
SET_PYTHON_PREFIX_SUFFIX(MatGui)
|
||||
|
||||
@@ -71,6 +71,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Measure SHARED ${Measure_SRCS})
|
||||
target_link_libraries(Measure ${Measure_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Measure)
|
||||
endif()
|
||||
|
||||
#if(MSVC)
|
||||
# set_target_properties(Measure PROPERTIES SUFFIX ".pyd")
|
||||
|
||||
@@ -86,6 +86,9 @@ SET(MeasureGuiIcon_SVG
|
||||
|
||||
add_library(MeasureGui SHARED ${MeasureGui_SRCS} ${MeasureGuiIcon_SVG})
|
||||
target_link_libraries(MeasureGui ${MeasureGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(MeasureGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(MeasureGui MeasureGui /Mod/Measure)
|
||||
SET_PYTHON_PREFIX_SUFFIX(MeasureGui)
|
||||
|
||||
@@ -412,6 +412,9 @@ add_library(Mesh SHARED ${Core_SRCS} ${WildMagic4_SRCS} ${Mesh_SRCS})
|
||||
target_link_libraries(Mesh ${Mesh_LIBS})
|
||||
set_target_properties(Mesh PROPERTIES CXX_STANDARD_REQUIRED ON)
|
||||
set_target_properties(Mesh PROPERTIES CXX_STANDARD 17)
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Mesh)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(Mesh Mesh /Mod/Mesh)
|
||||
|
||||
@@ -170,6 +170,9 @@ endif ()
|
||||
|
||||
add_library(MeshGui SHARED ${MeshGui_SRCS} ${MeshGuiIcon_SVG})
|
||||
target_link_libraries(MeshGui ${MeshGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(MeshGui)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(MeshGui MeshGui /Mod/Mesh)
|
||||
|
||||
@@ -75,6 +75,9 @@ endif()
|
||||
|
||||
add_library(MeshPart SHARED ${MeshPart_SRCS} ${MeshPart_Scripts})
|
||||
target_link_libraries(MeshPart ${MeshPart_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(MeshPart)
|
||||
endif()
|
||||
|
||||
|
||||
fc_target_copy_resource_flat(MeshPart
|
||||
|
||||
@@ -81,6 +81,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(MeshPartGui SHARED ${MeshPartGui_SRCS} ${MeshPartGui_Scripts} ${FLATMESH_PY_SRCS})
|
||||
target_link_libraries(MeshPartGui ${MeshPartGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(MeshPartGui)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(MeshPartGui MeshPartGui /Mod/MeshPart)
|
||||
|
||||
@@ -582,6 +582,9 @@ endif()
|
||||
|
||||
add_library(Part SHARED ${Part_SRCS})
|
||||
target_link_libraries(Part ${Part_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Part)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Part Part /Mod/Part)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Part)
|
||||
|
||||
@@ -259,6 +259,9 @@ SET(PartGuiIcon_SVG
|
||||
|
||||
add_library(PartGui SHARED ${PartGui_SRCS} ${PartGuiIcon_SVG})
|
||||
target_link_libraries(PartGui ${PartGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PartGui)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(PartGui PartGui /Mod/Part)
|
||||
|
||||
@@ -143,6 +143,9 @@ SET(PartDesign_SRCS
|
||||
|
||||
add_library(PartDesign SHARED ${PartDesign_SRCS})
|
||||
target_link_libraries(PartDesign ${PartDesign_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PartDesign)
|
||||
endif()
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
|
||||
@@ -259,6 +259,9 @@ SET(PartDesignGuiIcon_SVG
|
||||
|
||||
add_library(PartDesignGui SHARED ${PartDesignGui_SRCS} ${PartDesignGuiIcon_SVG})
|
||||
target_link_libraries(PartDesignGui ${PartDesignGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PartDesignGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(PartDesignGui PartDesignGui /Mod/PartDesign)
|
||||
SET_PYTHON_PREFIX_SUFFIX(PartDesignGui)
|
||||
|
||||
@@ -66,6 +66,9 @@ add_library(Points SHARED ${Points_SRCS} ${Points_Scripts})
|
||||
link_directories(${CMAKE_BINARY_DIR}/src/3rdParty/libE57Format)
|
||||
|
||||
target_link_libraries(Points E57Format ${Points_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Points)
|
||||
endif()
|
||||
|
||||
|
||||
fc_target_copy_resource_flat(Points
|
||||
|
||||
@@ -66,6 +66,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(PointsGui SHARED ${PointsGui_SRCS} ${PointsGui_Scripts} ${PointsGuiIcon_SVG})
|
||||
target_link_libraries(PointsGui ${PointsGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PointsGui)
|
||||
endif()
|
||||
|
||||
fc_target_copy_resource_flat(PointsGui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
||||
@@ -74,6 +74,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(ReverseEngineering SHARED ${Reen_SRCS})
|
||||
target_link_libraries(ReverseEngineering ${Reen_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(ReverseEngineering)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(ReverseEngineering ReverseEngineering /Mod/ReverseEngineering)
|
||||
SET_PYTHON_PREFIX_SUFFIX(ReverseEngineering)
|
||||
|
||||
@@ -70,6 +70,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(ReverseEngineeringGui SHARED ${ReenGui_SRCS} ${ReverseEngineeringGuiIcon_SVG})
|
||||
target_link_libraries(ReverseEngineeringGui ${ReenGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(ReverseEngineeringGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(ReverseEngineeringGui ReverseEngineeringGui /Mod/ReverseEngineering)
|
||||
SET_PYTHON_PREFIX_SUFFIX(ReverseEngineeringGui)
|
||||
|
||||
@@ -123,6 +123,9 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
|
||||
add_library(Robot SHARED ${Robot_SRCS})
|
||||
target_link_libraries(Robot ${Robot_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Robot)
|
||||
endif()
|
||||
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
|
||||
@@ -127,6 +127,9 @@ SET(RobotGuiIcon_SVG
|
||||
|
||||
add_library(RobotGui SHARED ${RobotGui_SRCS} ${RobotGuiIcon_SVG})
|
||||
target_link_libraries(RobotGui ${RobotGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(RobotGui)
|
||||
endif()
|
||||
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
|
||||
@@ -145,6 +145,9 @@ SET(Sketcher_PCH_SRCS
|
||||
|
||||
add_library(Sketcher SHARED ${Sketcher_SRCS})
|
||||
target_link_libraries(Sketcher ${Sketcher_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Sketcher)
|
||||
endif()
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
|
||||
@@ -197,7 +197,9 @@ SET(SketcherGuiIcon_SVG
|
||||
|
||||
add_library(SketcherGui SHARED ${SketcherGui_SRCS} ${SketcherGuiIcon_SVG})
|
||||
target_link_libraries(SketcherGui ${SketcherGui_LIBS})
|
||||
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SketcherGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(SketcherGui SketcherGui /Mod/Sketcher)
|
||||
SET_PYTHON_PREFIX_SUFFIX(SketcherGui)
|
||||
|
||||
@@ -57,6 +57,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Spreadsheet SHARED ${Spreadsheet_SRCS})
|
||||
target_link_libraries(Spreadsheet ${Spreadsheet_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Spreadsheet)
|
||||
endif()
|
||||
|
||||
|
||||
SET_BIN_DIR(Spreadsheet Spreadsheet /Mod/Spreadsheet)
|
||||
|
||||
@@ -110,6 +110,9 @@ set(SpreadsheetGui_UIC_SRCS
|
||||
|
||||
add_library(SpreadsheetGui SHARED ${SpreadsheetGui_SRCS} ${SpreadsheetGuiIcon_SVG})
|
||||
target_link_libraries(SpreadsheetGui ${SpreadsheetGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SpreadsheetGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(SpreadsheetGui SpreadsheetGui /Mod/Spreadsheet)
|
||||
SET_PYTHON_PREFIX_SUFFIX(SpreadsheetGui)
|
||||
|
||||
@@ -43,6 +43,9 @@ SET(Start_SRCS
|
||||
|
||||
add_library(Start SHARED ${Start_SRCS})
|
||||
target_link_libraries(Start ${Start_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Start)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Start Start /Mod/Start)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Start)
|
||||
|
||||
@@ -91,6 +91,9 @@ endif (FREECAD_USE_PCH)
|
||||
add_library(StartGui SHARED ${StartGui_SRCS} ${StartGuiIcon_SVG} ${StartGuiThumbnail_PNG})
|
||||
# target_link_libraries(StartGui ${StartGui_LIBS} Qt::Quick Qt::Qml Qt::QuickWidgets)
|
||||
target_link_libraries(StartGui ${StartGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(StartGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(StartGui StartGui /Mod/Start)
|
||||
SET_PYTHON_PREFIX_SUFFIX(StartGui)
|
||||
|
||||
@@ -71,6 +71,9 @@ endif(FREECAD_USE_PCH)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(Surface SHARED ${Surface_SRCS})
|
||||
target_link_libraries(Surface ${Surface_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Surface)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Surface Surface /Mod/Surface)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Surface)
|
||||
|
||||
@@ -72,6 +72,9 @@ endif(FREECAD_USE_PCH)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(SurfaceGui SHARED ${SurfaceGui_SRCS} ${SurfaceGuiIcon_SVG})
|
||||
target_link_libraries(SurfaceGui ${SurfaceGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SurfaceGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(SurfaceGui SurfaceGui /Mod/Surface)
|
||||
SET_PYTHON_PREFIX_SUFFIX(SurfaceGui)
|
||||
|
||||
@@ -277,6 +277,9 @@ endif(FREECAD_USE_PCH)
|
||||
add_library(TechDraw SHARED ${TechDraw_SRCS} ${Draw_SRCS} ${TechDrawAlgos_SRCS}
|
||||
${Geometry_SRCS} ${Python_SRCS})
|
||||
target_link_libraries(TechDraw ${TechDrawLIBS} ${TechDraw})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(TechDraw)
|
||||
endif()
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET TechDraw
|
||||
POST_BUILD
|
||||
|
||||
@@ -479,6 +479,9 @@ endif(FREECAD_USE_PCH)
|
||||
add_library(TechDrawGui SHARED ${TechDrawGui_SRCS} ${TechDrawGuiView_SRCS} ${TechDrawGuiViewProvider_SRCS}
|
||||
${TechDrawGuiNav_SRCS} ${TechDrawGuiIcon_SVG} ${TechDrawGuiFonts} ${MRTE_SRCS})
|
||||
target_link_libraries(TechDrawGui ${TechDrawGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(TechDrawGui)
|
||||
endif()
|
||||
|
||||
fc_copy_sources(TechDrawGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/TechDraw/" ${TechDrawGuiIcon_SVG})
|
||||
INSTALL(FILES ${TechDrawGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/TechDraw/Resources/icons")
|
||||
|
||||
@@ -61,6 +61,9 @@ add_library(QtUnitGui SHARED ${TestGui_SRCS} ${TestGuiPy_SRCS} ${TestGuiIcon_SVG
|
||||
|
||||
target_link_libraries(QtUnitGui ${TestGui_LIBS})
|
||||
add_dependencies(QtUnitGui Test)
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(QtUnitGui)
|
||||
endif()
|
||||
|
||||
fc_copy_sources(QtUnitGui "${CMAKE_BINARY_DIR}/Mod/Test" qtunittest.py)
|
||||
fc_copy_sources(QtUnitGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Test" ${TestGuiIcon_SVG})
|
||||
|
||||
@@ -31,6 +31,9 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Web SHARED ${Web_SRCS})
|
||||
target_link_libraries(Web ${Web_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Web)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Web Web /Mod/Web)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Web)
|
||||
|
||||
Reference in New Issue
Block a user