From ce90bf8775765ae6b0b4176c2cae6ddd41bd07dd Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 27 Aug 2019 16:31:34 +0200 Subject: [PATCH 1/3] Don't import tkinter when Netgen is loaded --- python/CMakeLists.txt | 5 ----- python/__init__.py | 4 ---- 2 files changed, 9 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 477befea..4306194d 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,8 +1,3 @@ -if(USE_GUI) - set(IMPORT_TKINTER True) -else() - set(IMPORT_TKINTER False) -endif() configure_file(__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py @ONLY) install(FILES diff --git a/python/__init__.py b/python/__init__.py index 5c8f2dc3..e74d1a49 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,10 +1,6 @@ import os import sys -# import tkinter only if Netgen was configured with USE_GUI=ON -if @IMPORT_TKINTER@: - import tkinter - _netgen_bin_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH_BIN@')) _netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH@')) From 14ce5230702d4d3db67ca80997ba7e2c89045c78 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 28 Aug 2019 09:40:02 -0700 Subject: [PATCH 2/3] Don't dll-export inline function --- libsrc/stlgeom/vsstl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/stlgeom/vsstl.hpp b/libsrc/stlgeom/vsstl.hpp index 6a98d8a6..ea1a5b72 100644 --- a/libsrc/stlgeom/vsstl.hpp +++ b/libsrc/stlgeom/vsstl.hpp @@ -18,7 +18,7 @@ namespace netgen public: DLL_HEADER VisualSceneSTLGeometry (); DLL_HEADER virtual ~VisualSceneSTLGeometry (); - DLL_HEADER void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; } + void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; } DLL_HEADER virtual void BuildScene (int zoomall = 0); DLL_HEADER virtual void DrawScene (); From 8acc8c9cb0f76628840f46edb05063957c4cfd1d Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 28 Aug 2019 09:41:42 -0700 Subject: [PATCH 3/3] User /bigobj flag on Windows builds --- libsrc/core/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt index 15198d50..710faa12 100644 --- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt @@ -24,6 +24,10 @@ if(NOT WIN32) target_compile_options(ngcore PRIVATE -fvisibility=hidden) endif(NOT WIN32) +if(WIN32) + target_compile_options(ngcore PUBLIC /bigobj) +endif(WIN32) + target_compile_definitions(ngcore PUBLIC $<$:NETGEN_ENABLE_CHECK_RANGE>) if(CHECK_RANGE)