ソースを参照

Windows Fixes

master
Trevor Irons 3年前
コミット
5577a61e40

+ 1
- 0
CMake/SuperBuild.cmake ファイルの表示

@@ -74,6 +74,7 @@ endif()
74 74
 
75 75
 if (LEMMA_PYTHON3_BINDINGS)
76 76
     if (pybind11_FOUND)
77
+	    find_package(PythonLibs 3.0 REQUIRED)
77 78
         message( STATUS "pybind11 was found" )
78 79
     else()
79 80
         message( STATUS "pybind11 was NOT found, please build or remove LEMMA_PYTHON3_BINDINGS" )

+ 6
- 1
CMakeLists.txt ファイルの表示

@@ -264,7 +264,12 @@ endif()
264 264
 option( MSVC_EXTENDED_ALIGNMENT "Turn on MSVC compiler definition _ENABLE_EXTENDED_ALIGNED_STORAGE " OFF  )
265 265
 if (MSVC_EXTENDED_ALIGNMENT)
266 266
     add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
267
-    SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
267
+    #if (${CMAKE_BUILD_TYPE} STREQUAL "Release") 
268
+    #    SET(CMAKE_EXE_LINKER_FLAGS     "${CMAKE_EXE_LINKER_FLAGS}    /LTCG")
269
+    #    SET(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} /LTCG")
270
+    #    SET(CMAKE_STATIC_LINKER_FLAGS  "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
271
+    #    SET(CMAKE_MODULE_LINKER_FLAGS  "${CMAKE_MODULE_LINKER_FLAGS} /LTCG")
272
+    #endif()
268 273
     #add_definitions(-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE)
269 274
     #set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
270 275
     #include(GenerateExportHeader)

+ 4
- 5
Modules/FDEM1D/include/EMEarth1D.h ファイルの表示

@@ -53,8 +53,7 @@ namespace Lemma {
53 53
     // =======================================================================
54 54
     class EMEarth1D : public LemmaObject {
55 55
 
56
-		friend std::ostream &operator<<(std::ostream &stream,
57
-			const EMEarth1D &ob);
56
+	friend std::ostream &operator<<(std::ostream &stream, const EMEarth1D &ob);
58 57
 
59 58
         public:
60 59
 
@@ -66,10 +65,10 @@ namespace Lemma {
66 65
             explicit EMEarth1D ( const ctor_key& );
67 66
 
68 67
             /** Default protected constructor. */
69
-			EMEarth1D ( const YAML::Node& node, const ctor_key& );
68
+            EMEarth1D ( const YAML::Node& node, const ctor_key& );
70 69
 
71 70
             /** Default protected constructor. */
72
-            ~EMEarth1D ();
71
+            virtual ~EMEarth1D ();
73 72
 
74 73
             /**
75 74
              *  Returns pointer to new EMEarth1D. Location is
@@ -81,7 +80,7 @@ namespace Lemma {
81 80
 
82 81
             /** stream debugging info to std::out
83 82
              */
84
-            void Query();
83
+            //void Query();
85 84
 
86 85
             /** YAML Serializing method
87 86
              */

+ 3
- 5
Modules/FDEM1D/python/CMakeLists.txt ファイルの表示

@@ -1,12 +1,10 @@
1 1
 
2 2
 #pybind11_add_module(pyFDEM1D   MODULE pyFDEM1D.cpp)
3 3
 add_library(pyFDEM1D MODULE pyFDEM1D.cpp)
4
-target_link_libraries(pyFDEM1D PRIVATE pybind11::module lemmacore fdem1d )
4
+target_link_libraries(pyFDEM1D PRIVATE pybind11::module lemmacore fdem1d)
5 5
 set_target_properties(pyFDEM1D PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
6
-	SUFFIX "${PYTHON_MODULE_EXTENSION}"
7
-    OUTPUT_NAME "FDEM1D"
8
-	CXX_STANDARD 14 
9
-	CXX_STANDARD_REQUIRED ON
6
+	                       SUFFIX "${PYTHON_MODULE_EXTENSION}"
7
+                               OUTPUT_NAME "FDEM1D"
10 8
 )
11 9
 
12 10
 install(TARGETS pyFDEM1D

+ 9
- 7
Modules/FDEM1D/python/pyFDEM1D.cpp ファイルの表示

@@ -27,7 +27,6 @@ namespace py = pybind11;
27 27
 PYBIND11_MODULE(FDEM1D, m) {
28 28
 
29 29
     py::add_ostream_redirect(m, "ostream_redirect");
30
-
31 30
     m.doc() = "Python binding of Lemma::FDEM1D, additional details can be found at https://lemmasoftware.org";
32 31
 
33 32
 
@@ -230,18 +229,20 @@ PYBIND11_MODULE(FDEM1D, m) {
230 229
             "Calculates complex resistivity based on cole-cole parameters")
231 230
         ;
232 231
 
232
+
233 233
     py::class_<Lemma::EMEarth1D, std::shared_ptr<Lemma::EMEarth1D> >
234 234
         EMEarth1D(m, "EMEarth1D");
235 235
 
236 236
         // lifecycle
237 237
         EMEarth1D.def(py::init(&Lemma::EMEarth1D::NewSP))
238
+/*
238 239
         //.def_static("DeSerialize", py::overload_cast<const std::string&>
239 240
         //    (&Lemma::EMEarth1D::DeSerialize),"Construct object from yaml representation")
240 241
 
241 242
         // print
242 243
         .def("Serialize", &Lemma::EMEarth1D::Print, "YAML representation of the class")
243 244
         .def("__repr__", &Lemma::EMEarth1D::Print)
244
-
245
+	
245 246
         // accessors
246 247
         .def("GetName", &Lemma::EMEarth1D::GetName, "Returns the name of the class")
247 248
         .def("GetFieldPoints", &Lemma::EMEarth1D::GetFieldPoints, "Returns the FieldPoint class")
@@ -264,15 +265,18 @@ PYBIND11_MODULE(FDEM1D, m) {
264 265
             "Sets the TxRx mode flag")
265 266
 
266 267
         //methods
267
-#ifdef KIHALEE_EM1D
268
+	#ifdef KIHALEE_EM1D
268 269
         .def("MakeCalc", &Lemma::EMEarth1D::MakeCalc, "Calls KiHa Lee's EM1D FORTRAN77 code")
269
-#endif
270
+	#endif
270 271
 
271 272
         .def("MakeCalc3", &Lemma::EMEarth1D::MakeCalc3, "Native Lemma EM calculation")
272 273
         .def("CalculateWireAntennaFields", &Lemma::EMEarth1D::CalculateWireAntennaFields,
273 274
             "Native Lemma calculation of a wire antenna")
275
+*/
276
+	
274 277
         ;
275 278
 
279
+
276 280
     py::class_<Lemma::FieldPoints, std::shared_ptr<Lemma::FieldPoints> >
277 281
         FieldPoints(m, "FieldPoints");
278 282
 
@@ -334,8 +338,6 @@ PYBIND11_MODULE(FDEM1D, m) {
334 338
         .def("ClearFields", &Lemma::FieldPoints::ClearFields, "Clears calculated fields")
335 339
         .def("MaskPoint", &Lemma::FieldPoints::MaskPoint, "Masks the index resulting in no calculation")
336 340
         .def("UnMaskPoint", &Lemma::FieldPoints::UnMaskPoint, "Unmasks the index resulting in a calculation")
337
-
341
+	
338 342
         ;
339 343
 }
340
-
341
-

+ 3
- 1
Modules/FDEM1D/src/EMEarth1D.cpp ファイルの表示

@@ -164,6 +164,7 @@ namespace Lemma {
164 164
         HankelType = type;
165 165
     }
166 166
 
167
+    /*
167 168
     void EMEarth1D::Query() {
168 169
         std::cout << "EmEarth1D::Query()" << std::endl;
169 170
 
@@ -183,6 +184,7 @@ namespace Lemma {
183 184
 
184 185
         std::cout << "icalcinner " << icalcinner << std::endl;
185 186
     }
187
+    */
186 188
 
187 189
     // ====================  OPERATIONS    ===================================
188 190
 
@@ -258,7 +260,7 @@ namespace Lemma {
258 260
 
259 261
             } else if (Receivers->GetNumberOfPoints() > Antenna->GetNumberOfFrequencies()) {
260 262
 
261
-                //** Progress display bar for long calculations */
263
+                /* Progress display bar for long calculations */
262 264
                 std::unique_ptr<ProgressBar> mdisp;
263 265
                 if (progressbar) {
264 266
                     mdisp = std::make_unique< ProgressBar > ( Receivers->GetNumberOfPoints()*Antenna->GetNumberOfFrequencies() );

+ 2
- 0
Modules/LemmaCore/python/CMakeLists.txt ファイルの表示

@@ -7,6 +7,8 @@ target_link_libraries(pyLemmaCore PRIVATE pybind11::module lemmacore )
7 7
 set_target_properties(pyLemmaCore PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
8 8
                                              SUFFIX "${PYTHON_MODULE_EXTENSION}"
9 9
                                              OUTPUT_NAME "LemmaCore"
10
+					     CXX_STANDARD 14 
11
+					     CXX_STANDARD_REQUIRED ON
10 12
 )
11 13
 
12 14
 

読み込み中…
キャンセル
保存