Browse Source

msvc

lagkey
John Daily 6 years ago
parent
commit
60df651aea
3 changed files with 13 additions and 11 deletions
  1. 2
    1
      CMake/SuperBuild.cmake
  2. 3
    3
      CMakeLists.txt
  3. 8
    7
      Modules/FDEM1D/examples/Hantenna.cpp

+ 2
- 1
CMake/SuperBuild.cmake View File

37
     #message( STATUS "YAML-CPP LIBRARIES ${YAML_CPP_LIBRARIES}" )
37
     #message( STATUS "YAML-CPP LIBRARIES ${YAML_CPP_LIBRARIES}" )
38
     #message( STATUS "YAML-CPP LIBRARY ${yaml-cpp_LIBRARY}" )
38
     #message( STATUS "YAML-CPP LIBRARY ${yaml-cpp_LIBRARY}" )
39
 else()
39
 else()
40
-    message( STATUS "YAML-CPP WAS NOT FOUND" )
40
+    message( STATUS "YAML-CPP WAS NOT FOUND, BUILDING" )
41
+    message( STATUS "CMAKE BUILD TYPE ${CMAKE_BUILD_TYPE}" )
41
 	ExternalProject_Add(YAML_CPP
42
 	ExternalProject_Add(YAML_CPP
42
 		GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git"
43
 		GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git"
43
 		GIT_TAG   "yaml-cpp-0.6.1" # "master" 
44
 		GIT_TAG   "yaml-cpp-0.6.1" # "master" 

+ 3
- 3
CMakeLists.txt View File

24
 ## Options--what do you want to do
24
 ## Options--what do you want to do
25
 
25
 
26
 option ( BUILD_SHARED_LIBS      "Shared or static libraries"  OFF )
26
 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)
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 )
30
 set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel )
31
  
31
  
32
 option ( LEMMA_ENABLE_TESTING       "Turn on unit testing" OFF )
32
 option ( LEMMA_ENABLE_TESTING       "Turn on unit testing" OFF )

+ 8
- 7
Modules/FDEM1D/examples/Hantenna.cpp View File

36
 
36
 
37
 #elif defined(__GNUC__) || defined(__GNUG__)
37
 #elif defined(__GNUC__) || defined(__GNUG__)
38
 	/* GNU GCC/G++. --------------------------------------------- */
38
 	/* GNU GCC/G++. --------------------------------------------- */
39
-    const char* compiler = "gcc (GCC) "  __VERSION__;
40
-
39
+    const char* compiler = "gcc (GCC) ";//  __VERSION__;
40
+    const char* ver = __VERSION__;
41
 #elif defined(_MSC_VER)
41
 #elif defined(_MSC_VER)
42
 	/* Microsoft Visual Studio. --------------------------------- */
42
 	/* Microsoft Visual Studio. --------------------------------- */
43
-    const char* compiler = "msvc " _MSC_FULL_VER;
43
+    const char* compiler = "msvc ";
44
+    const int ver = _MSC_FULL_VER;
44
 
45
 
45
 #elif defined(__PGI)
46
 #elif defined(__PGI)
46
 	/* Portland Group PGCC/PGCPP. ------------------------------- */
47
 	/* Portland Group PGCC/PGCPP. ------------------------------- */
59
     std::cout
60
     std::cout
60
     << "===========================================================================\n"
61
     << "===========================================================================\n"
61
     << "Lemma " << LEMMA_VERSION << "\n"
62
     << "Lemma " << LEMMA_VERSION << "\n"
62
-    << "[" << compiler << " " <<  buildString << "]\n"
63
+    << "[" << compiler << " " << ver << " " <<  buildString << "]\n"
63
     << "This program is part of Lemma, a geophysical modelling and inversion API. \n"
64
     << "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
     << "     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
     << "     License, v. 2.0. If a copy of the MPL was not distributed with this\n"
151
     auto earth = LayeredEarthEM::NewSP();
152
     auto earth = LayeredEarthEM::NewSP();
152
     VectorXcr sigma;
153
     VectorXcr sigma;
153
     VectorXr  thick;
154
     VectorXr  thick;
154
- 	earth->SetNumberOfLayers(CondMod[0]+1);
155
- 	sigma.resize(CondMod[0]+1); sigma(0) = 0; // airlayer
156
-    thick.resize(CondMod[0]-1);
155
+ 	earth->SetNumberOfLayers(static_cast<int>(CondMod[0])+1);
156
+ 	sigma.resize(static_cast<int>(CondMod[0])+1); sigma(0) = 0; // airlayer
157
+    thick.resize(static_cast<int>(CondMod[0])-1);
157
     int ilay=1;
158
     int ilay=1;
158
     for ( ; ilay/2<CondMod[0]-1; ilay+=2) {
159
     for ( ; ilay/2<CondMod[0]-1; ilay+=2) {
159
         sigma(ilay/2+1) =  1./CondMod[ilay];
160
         sigma(ilay/2+1) =  1./CondMod[ilay];

Loading…
Cancel
Save