Browse Source

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

enhancement_3
Trevor Irons 8 years ago
parent
commit
0d776143cf

+ 5
- 1
CMakeLists.txt View File

70
 	UPDATE_COMMAND ""
70
 	UPDATE_COMMAND ""
71
 	PATCH_COMMAND ""
71
 	PATCH_COMMAND ""
72
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
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
 add_compile_options(-DHAVE_YAMLCPP) 
76
 add_compile_options(-DHAVE_YAMLCPP) 
76
 
77
 
165
 include(CheckCXXCompilerFlag)
166
 include(CheckCXXCompilerFlag)
166
 CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
167
 CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
167
 CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
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
 if(COMPILER_SUPPORTS_CXX14)
171
 if(COMPILER_SUPPORTS_CXX14)
170
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
172
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
171
 elseif(COMPILER_SUPPORTS_CXX11)
173
 elseif(COMPILER_SUPPORTS_CXX11)
172
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
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
 else()
177
 else()
174
 	message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
178
 	message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
175
 endif()
179
 endif()

+ 4
- 1
LemmaCore/include/LemmaObject.h View File

57
 
57
 
58
         // ====================  INQUIRY       ==============================
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
         virtual inline std::string GetName() const {
64
         virtual inline std::string GetName() const {
62
             return this->CName;
65
             return this->CName;
63
         }
66
         }

+ 0
- 10
LemmaCore/src/LayeredEarth.cpp View File

17
 
17
 
18
 	// ====================    FRIENDS     ======================
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
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
20
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
31
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
21
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
32
         return stream;
22
         return stream;

+ 5
- 0
Modules/FDEM1D/CMakeLists.txt View File

5
 
5
 
6
 add_library( fdem1d ${FEM1DSOURCE} )  
6
 add_library( fdem1d ${FEM1DSOURCE} )  
7
 target_link_libraries(fdem1d "lemmacore")
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
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
14
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
10
 
15
 

+ 5
- 0
Modules/FDEM1D/include/LayeredEarthEM.h View File

232
              */
232
              */
233
             VectorXr GetLayerBreathPermitivity( );
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
         protected:
240
         protected:
236
 
241
 
237
             // ====================  LIFECYCLE     ===========================
242
             // ====================  LIFECYCLE     ===========================

Loading…
Cancel
Save