Browse Source

Compile work for MSVC, OpenMP is not found by CMake on test box

submodule
John Daily 6 years ago
parent
commit
4173863a14
2 changed files with 15 additions and 6 deletions
  1. 14
    6
      CMakeLists.txt
  2. 1
    0
      Modules/FDEM1D/src/GQChave.cpp

+ 14
- 6
CMakeLists.txt View File

70
 	PATCH_COMMAND ""
70
 	PATCH_COMMAND ""
71
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
71
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
72
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
72
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
73
-		-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
73
+ 	       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} /
74
+	       -DYAML_CPP_BUILD_TESTS=OFF 
75
+	       #-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING /  
76
+	       #-DCXX_STANDARD=11 /
77
+	       #-DCXX_STANDARD_REQUIRED=ON 
74
 )
78
 )
75
 add_compile_options(-DHAVE_YAMLCPP) 
79
 add_compile_options(-DHAVE_YAMLCPP) 
76
 
80
 
217
 option( LEMMA_BUILD_EXAMPLES "Compile example Lemma applications" OFF )
221
 option( LEMMA_BUILD_EXAMPLES "Compile example Lemma applications" OFF )
218
 
222
 
219
 option( LEMMA_USE_OPENMP  "Use OpenMP in Lemma" OFF)
223
 option( LEMMA_USE_OPENMP  "Use OpenMP in Lemma" OFF)
220
-find_package(OpenMP)
221
-if (OPENMP_FOUND AND LEMMA_USE_OPENMP)
222
-    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
223
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
224
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
224
+if (LEMMA_USE_OPENMP)
225
+    find_package(OpenMP)
226
+    if (OPENMP_FOUND)
227
+        set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
228
+        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
229
+        set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
230
+    else()
231
+	message (FATAL ERROR "OpenMP cannot be found, but was specified!")
232
+    endif()
225
 endif()
233
 endif()
226
 
234
 
227
 set(LEMMA_VERSION_MAJOR "0")
235
 set(LEMMA_VERSION_MAJOR "0")

+ 1
- 0
Modules/FDEM1D/src/GQChave.cpp View File

1135
 #else
1135
 #else
1136
     Real GQChave::Jbess(const Real &x, const int &IORDER) {
1136
     Real GQChave::Jbess(const Real &x, const int &IORDER) {
1137
         std::cerr << "GQChave requires boost special functions module";
1137
         std::cerr << "GQChave requires boost special functions module";
1138
+        return 0;
1138
     }
1139
     }
1139
 #endif
1140
 #endif
1140
     //////////////////////////////////////////////////////
1141
     //////////////////////////////////////////////////////

Loading…
Cancel
Save