Trevor Irons před 6 roky
rodič
revize
e82ae1e149

+ 1
- 1
CMake/Mingw-Cross.cmake Zobrazit soubor

@@ -37,4 +37,4 @@ set( CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "" )
37 37
 #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
38 38
 #Static Libs
39 39
 #Set Linker flags
40
-set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
40
+set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")

+ 3
- 3
CMake/SuperBuild.cmake Zobrazit soubor

@@ -15,9 +15,9 @@ else()
15 15
 		#INSTALL_COMMAND     ""
16 16
     )
17 17
 
18
-    message("Source dir of myExtProj = ${SOURCE_DIR}")   
19
-    ExternalProject_Get_property(EIGEN SOURCE_DIR)
20
-    message("Source dir of myExtProj = ${SOURCE_DIR}")   
18
+    #message("Source dir of myExtProj = ${SOURCE_DIR}")   
19
+    #ExternalProject_Get_property(EIGEN SOURCE_DIR)
20
+    #message("Source dir of myExtProj = ${SOURCE_DIR}")   
21 21
  
22 22
     # Are these necessary?
23 23
     #include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3/")

+ 13
- 8
CMakeLists.txt Zobrazit soubor

@@ -22,13 +22,12 @@ set(LEMMA_VERSION_NOQUOTES "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMM
22 22
 ########################################
23 23
 
24 24
 ## Options--what do you want to do
25
-
26 25
 option ( BUILD_SHARED_LIBS      "Shared or static libraries"  OFF )
27
-set(CMAKE_BUILD_TYPE "Release" STRING
28
-       "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
29
-       FORCE cache)
30
-set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel )
31
- 
26
+
27
+IF( NOT CMAKE_BUILD_TYPE )
28
+   SET( CMAKE_BUILD_TYPE Release ... FORCE )
29
+ENDIF()
30
+
32 31
 option ( LEMMA_ENABLE_TESTING       "Turn on unit testing" OFF )
33 32
 option ( LEMMA_BUILD_EXAMPLES       "Compile example Lemma applications" OFF )
34 33
 option ( LEMMA_USE_OPENMP           "Use OpenMP in Lemma" OFF )
@@ -45,14 +44,20 @@ option (LEMMA_VTK8_SUPPORT "VTK 8.x library for visualisation and grids" OFF)
45 44
 ########################################################################################## 
46 45
 if (CMAKE_CROSSCOMPILING)
47 46
     message ( STATUS "Cross-compiling! Only searching in install directory for components." )
47
+    # Kind of hack-ish, CMake doesn't always find this. It's buried in Cross compilation, so, 
48
+    # hopefully anyone doing this can problem solve. 
49
+    SET( CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/CMake ${CMAKE_INSTALL_PREFIX}/share/eigen3 )
50
+    #SET( CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX} )
48 51
     SET( CMAKE_FIND_ROOT_PATH ONLY ${CMAKE_INSTALL_PREFIX})
49 52
     SET( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY  ONLY ) 
50 53
     SET( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE  ONLY ) 
51 54
     SET( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE  ONLY )
52 55
     UNSET( Eigen3_DIR CACHE ) 
53 56
     UNSET( yaml-cpp_DIR CACHE ) 
54
-    find_package (Eigen3 3.3 )# QUIET)     # Matrix/Vector & Math
55
-    find_package (yaml-cpp 0.6 ) #QUIET )  # Serialisation of classes 
57
+    UNSET( Eigen3_FOUND CACHE ) 
58
+    UNSET( yaml-cpp_FOUND CACHE ) 
59
+    find_package (yaml-cpp 0.6 PATHS ${CMAKE_INSTALL_PREFIX} ) #QUIET )  # Serialisation of classes 
60
+    find_package (Eigen3 3.3 PATHS ${CMAKE_INSTALL_PREFIX}  )   # QUIET)     # Matrix/Vector & Math
56 61
 endif()
57 62
 
58 63
 find_package (Eigen3 3.3 QUIET)     # Matrix/Vector & Math

+ 33
- 17
Modules/FDEM1D/examples/Hantenna.cpp Zobrazit soubor

@@ -27,6 +27,26 @@
27 27
 #include "FDEM1D"
28 28
 #include "timer.h"
29 29
 
30
+#if defined(__clang__)
31
+	/* Clang/LLVM. ---------------------------------------------- */
32
+    const char* compiler = "clang";
33
+#elif defined(__ICC) || defined(__INTEL_COMPILER)
34
+	/* Intel ICC/ICPC. ------------------------------------------ */
35
+    const char* compiler = "icpc";
36
+
37
+#elif defined(__GNUC__) || defined(__GNUG__)
38
+	/* GNU GCC/G++. --------------------------------------------- */
39
+    const char* compiler = "gcc (GCC) "  __VERSION__;
40
+
41
+#elif defined(_MSC_VER)
42
+	/* Microsoft Visual Studio. --------------------------------- */
43
+    const char* compiler = "msvc " _MSC_FULL_VER;
44
+
45
+#elif defined(__PGI)
46
+	/* Portland Group PGCC/PGCPP. ------------------------------- */
47
+    const char* compiler = "pgc";
48
+#endif
49
+
30 50
 using namespace Lemma;
31 51
 
32 52
 std::vector<Real>  readinpfile(const std::string& fname);
@@ -35,24 +55,20 @@ std::vector<std::string>  readinpfile2(const std::string& fname);
35 55
 
36 56
 int main(int argc, char** argv) {
37 57
 
38
-    std::cout <<
39
-    "\n"
40
-    << "Hantenna \n\n"
41
-    << "Hantenna is a programme for computing the H field from polygonal wire\n"
42
-    << "loop sources \n\n"
43
-    << "Hantenna was built using Lemma (Lemma is an Electromagnetics Modelling API)\n"
44
-    << "Lemma is Free and Open Source Software (FOSS) and is released under\n"
45
-    << "the MPL, it is covered by the following copyrights:\n"
46
-    << "Copyright (C) 2009, 2010, 2011, 2012, 218      Trevor P. Irons\n"
47
-    << "Copyright (C) 2011, 2012                       M. Andy Kass\n\n"
58
+const char *buildString = __DATE__ ", " __TIME__;
59
+    std::cout
60
+    << "===========================================================================\n"
61
+    << "Lemma " << LEMMA_VERSION << "\n"
62
+    << "[" << compiler << " " <<  buildString << "]\n"
63
+    << "This program is part of Lemma, a geophysical modelling and inversion API. \n"
64
+    << "     This Source Code Form is subject to the terms of the Mozilla Public\n"
65
+    << "     License, v. 2.0. If a copy of the MPL was not distributed with this\n"
66
+    << "     file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
67
+    << "Copyright (C) 2018 Lemma Software \n"
48 68
     << "More information may be found at: https://lemmasoftware.org\n"
49
-    << "                                     info@lemmasoftware.org\n\n"
50
-    << "=====================================================================\n"
51
-    << "This programme is part of Lemma, a geophysical modelling and inversion API \n"
52
-    << "This Source Code Form is subject to the terms of the Mozilla Public\n"
53
-    << "License, v. 2.0. If a copy of the MPL was not distributed with this\n"
54
-    << "file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
55
-    << "=====================================================================\n\n\n";
69
+    << "                                     info@lemmasoftware.org\n"
70
+    << "===========================================================================\n\n"
71
+    << "Hantenna calculates the harmonic H field from polygonal wire loop sources\n";
56 72
 
57 73
     if (argc < 5) {
58 74
         std::cout << "usage: hantenna.exe  trans.inp cond.inp points.inp config.inp \n";

Načítá se…
Zrušit
Uložit