+ add option to switch off precompiled header

This commit is contained in:
wmayer
2018-07-25 20:17:11 +02:00
parent 08fcd58e9d
commit d3ef6905ff
17 changed files with 49 additions and 28 deletions

View File

@@ -80,11 +80,11 @@ SET(Drawing_Templates
Templates/A4_Portrait_plain.svg
)
if(MSVC)
if(BUILD_USE_PCH)
#add_definitions(-D_PreComp_)
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Drawing_CPP_SRCS ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
#ADD_MSVC_PRECOMPILED_HEADER(Drawing PreCompiled.h PreCompiled.cpp Drawing_CPP_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
target_link_libraries(Drawing ${Drawing_LIBS})

View File

@@ -83,11 +83,11 @@ SET(DrawingGuiTaskDlgs_SRCS
)
SOURCE_GROUP("TaskDialogs" FILES ${DrawingGuiTaskDlgs_SRCS})
if(MSVC)
if(BUILD_USE_PCH)
#add_definitions(-D_PreComp_)
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS})
#ADD_MSVC_PRECOMPILED_HEADER(DrawingGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
add_library(DrawingGui SHARED ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS})
target_link_libraries(DrawingGui ${DrawingGui_LIBS})

View File

@@ -47,11 +47,11 @@ SET(Measure_SRCS
${Python_SRCS}
)
if(MSVC)
if(BUILD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Measure_CPP_SRCS ${Measure_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(Measure PreCompiled.h PreCompiled.cpp Measure_CPP_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
# Set special compiler flag to convert a SIGSEV into an exception
# to handle issue #0000478.

View File

@@ -37,6 +37,11 @@
# define MeshExport
#endif
#ifdef FC_OS_WIN32
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#endif
#ifdef _PreComp_
// standard
@@ -63,4 +68,4 @@
#elif defined(FC_OS_WIN32)
#include <windows.h>
#endif // _PreComp_
#endif
#endif

View File

@@ -361,11 +361,11 @@ SET(Mesh_SRCS
Segment.h
)
if(MSVC)
if(BUILD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Core_SRCS} ${Mesh_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(Mesh PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
add_library(Mesh SHARED ${Core_SRCS} ${WildMagic4_SRCS} ${Mesh_SRCS})
target_link_libraries(Mesh ${Mesh_LIBS})

View File

@@ -162,11 +162,11 @@ SET(TechDraw_LineGroupFile
LineGroup/LineGroup.csv
)
if(MSVC)
if(BUILD_USE_PCH)
#add_definitions(-D_PreComp_)
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" TechDrawCPP_SRCS ${TechDraw_SRCS} ${Draw_SRCS} )
#ADD_MSVC_PRECOMPILED_HEADER(TechDraw PreCompiled.h PreCompiled.cpp TechDrawCPP_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
add_library(TechDraw SHARED ${TechDraw_SRCS} ${Draw_SRCS} ${TechDrawAlgos_SRCS}
${Geometry_SRCS} ${Python_SRCS})

View File

@@ -226,11 +226,11 @@ SET(TechDrawGuiTaskDlgs_SRCS
)
SOURCE_GROUP("TaskDialogs" FILES ${TechDrawGuiTaskDlgs_SRCS})
if(MSVC)
if(BUILD_USE_PCH)
#add_definitions(-D_PreComp_)
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${TechDrawGui_SRCS} ${TechDrawGuiView_SRCS} ${TechDrawGuiViewProvider_SRCS})
#ADD_MSVC_PRECOMPILED_HEADER(TechDrawGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(MSVC)
endif(BUILD_USE_PCH)
add_library(TechDrawGui SHARED ${TechDrawGui_SRCS} ${TechDrawGuiView_SRCS} ${TechDrawGuiViewProvider_SRCS})
target_link_libraries(TechDrawGui ${TechDrawGui_LIBS})