Quellcode durchsuchen

Merge branch 'enhancement_3' of https://git.lemmasoftware.org/Lemma into enhancement_3

enhancement_3
Trevor Irons vor 8 Jahren
Ursprung
Commit
0d776143cf

+ 5
- 1
CMakeLists.txt Datei anzeigen

@@ -70,7 +70,8 @@ ExternalProject_Add(YAML-CPP
70 70
 	UPDATE_COMMAND ""
71 71
 	PATCH_COMMAND ""
72 72
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
73
-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
73
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
74
+		-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
74 75
 )
75 76
 add_compile_options(-DHAVE_YAMLCPP) 
76 77
 
@@ -165,11 +166,14 @@ endif()
165 166
 include(CheckCXXCompilerFlag)
166 167
 CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
167 168
 CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
169
+CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
168 170
 
169 171
 if(COMPILER_SUPPORTS_CXX14)
170 172
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
171 173
 elseif(COMPILER_SUPPORTS_CXX11)
172 174
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
175
+elseif(COMPILER_SUPPORTS_CXX0X)
176
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
173 177
 else()
174 178
 	message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
175 179
 endif()

+ 4
- 1
LemmaCore/include/LemmaObject.h Datei anzeigen

@@ -57,7 +57,10 @@ class LemmaObject {
57 57
 
58 58
         // ====================  INQUIRY       ==============================
59 59
 
60
-        /** Returns the name of the underlying class, similiar to Python's type */
60
+        /** Returns the name of the underlying class; Run-time type information (RTTI). This approach
61
+            Was chosen over typeid due to name mangling among various compilers, and the need for consistency
62
+            in Serialized objects.
63
+         */
61 64
         virtual inline std::string GetName() const {
62 65
             return this->CName;
63 66
         }

+ 0
- 10
LemmaCore/src/LayeredEarth.cpp Datei anzeigen

@@ -17,16 +17,6 @@ namespace Lemma {
17 17
 
18 18
 	// ====================    FRIENDS     ======================
19 19
 
20
-    /*
21
-	std::ostream &operator<<(std::ostream &stream,
22
-				const LayeredEarth &ob) {
23
-		stream << *(EarthModel*)(&ob);
24
-  		//stream << "Class Name : "<< ob.Name  << "\n";
25
-  		stream << "Number of Layers "<< ob.NumberOfLayers  << "\n";
26
-  		return stream;
27
-	}
28
-    */
29
-
30 20
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
31 21
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
32 22
         return stream;

+ 5
- 0
Modules/FDEM1D/CMakeLists.txt Datei anzeigen

@@ -5,6 +5,11 @@ add_subdirectory("src")
5 5
 
6 6
 add_library( fdem1d ${FEM1DSOURCE} )  
7 7
 target_link_libraries(fdem1d "lemmacore")
8
+set_target_properties(fdem1d PROPERTIES 
9
+	VERSION  "${LEMMA_VERSION}"
10
+	SOVERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
11
+	PROJECT_LABEL "Lemma ${LABEL_SUFFIX}"
12
+)
8 13
 
9 14
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
10 15
 

+ 5
- 0
Modules/FDEM1D/include/LayeredEarthEM.h Datei anzeigen

@@ -232,6 +232,11 @@ namespace Lemma {
232 232
              */
233 233
             VectorXr GetLayerBreathPermitivity( );
234 234
 
235
+            /** Returns the name of the underlying class, similiar to Python's type */
236
+            virtual inline std::string GetName() const {
237
+                return CName;
238
+            }
239
+
235 240
         protected:
236 241
 
237 242
             // ====================  LIFECYCLE     ===========================

Laden…
Abbrechen
Speichern