Trevor Irons 5 anni fa
parent
commit
4753038229
3 ha cambiato i file con 32 aggiunte e 22 eliminazioni
  1. 4
    0
      CMake/SuperBuild.cmake
  2. 17
    13
      CMakeLists.txt
  3. 11
    9
      Modules/DCIP/CMakeLists.txt

+ 4
- 0
CMake/SuperBuild.cmake Vedi File

@@ -21,6 +21,7 @@ if (yaml-cpp_FOUND)
21 21
     message( STATUS "YAML-CPP was found ${yaml-cpp_FOUND}" )
22 22
 else()
23 23
     message( STATUS "YAML-CPP WAS NOT FOUND, BUILDING" )
24
+
24 25
     ExternalProject_Add(YAML_CPP
25 26
         GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git" 
26 27
         GIT_TAG  "yaml-cpp-0.6.2"  # "master" 
@@ -34,6 +35,9 @@ else()
34 35
                    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
35 36
                    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} 
36 37
                    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} 
38
+                   -DCMAKE_CXX_STANDARD=14
39
+                   -DCMAKE_CXX_STANDARD_REQUIRED=ON
40
+                   -DCMAKE_CXX_EXTENSIONS=OFF
37 41
     )
38 42
 endif()
39 43
 

+ 17
- 13
CMakeLists.txt Vedi File

@@ -281,21 +281,25 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
281 281
 if (LEMMA_USE_OPENMP)
282 282
 
283 283
     if(APPLE)
284
-        if(CMAKE_C_COMPILER_ID MATCHES "Clang")
285
-            set(OpenMP_C "${CMAKE_C_COMPILER}")
286
-            set(OpenMP_C_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
287
-            set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
288
-            set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
289
-            set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
290
-            set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
291
-        endif()
284
+        #if(CMAKE_C_COMPILER_ID MATCHES "Clang")
285
+        #    set(OpenMP_C "${CMAKE_C_COMPILER}")
286
+        #    set(OpenMP_C_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
287
+        #    set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
288
+        #    set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
289
+        #    set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
290
+        #    set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
291
+        #endif()
292 292
         if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
293
+            find_library( libiomp5 NAMES  libiomp5.dylib PATHS "/anaconda3/lib/" REQUIRED )
293 294
             set(OpenMP_CXX "${CMAKE_CXX_COMPILER}")
294
-            set(OpenMP_CXX_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
295
-            set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
296
-            set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
297
-            set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
298
-            set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
295
+            set(OpenMP_CXX_FLAGS "-fopenmp=libiomp5 -Wno-unused-command-line-argument")
296
+            set(OpenMP_CXX_LIB_NAMES "libiomp5") #"libomp" "libgomp" "libiomp5")
297
+            #set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
298
+            #set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
299
+            set(OpenMP_libiomp5_LIBRARY libiomp5 )# ${OpenMP_CXX_LIB_NAMES})
300
+            set(OpenMP_LIBRARIES  libiomp5)
301
+            link_directories("/anaconda3/lib")
302
+    #        find_package(OpenMP REQUIRED)
299 303
     #         set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include")
300 304
     #         " -DOpenMP_CXX_LIB_NAMES=\"omp\" -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib ")
301 305
     #         set(OpenMP_CXX_LIB_NAMES "omp") # "libgomp" "libiomp5")

+ 11
- 9
Modules/DCIP/CMakeLists.txt Vedi File

@@ -2,18 +2,20 @@ option ( LEMMA_MODULE_DCIP TRUE )
2 2
 
3 3
 if (LEMMA_MODULE_DCIP) 
4 4
 
5
-# Configure EMSchur3D 
6
-set(DCIP_VERSION_MAJOR "0")
7
-set(DCIP_VERSION_MINOR "0")
8
-set(DCIP_VERSION_PATCH "1")
9
-set(DCIP_VERSION "\"${DCIP_VERSION_MAJOR}.${DCIP_VERSION_MINOR}.${DCIP_VERSION_PATCH}\"")
10
-set(DCIP_VERSION_NOQUOTES "${DCIP_VERSION_MAJOR}.${DCIP_VERSION_MINOR}.${DCIP_VERSION_PATCH}")
11
-
12
-configure_file (
5
+	# Configure DCIP 
6
+	set(DCIP_VERSION_MAJOR "0")
7
+	set(DCIP_VERSION_MINOR "0")
8
+	set(DCIP_VERSION_PATCH "1")
9
+	set(DCIP_VERSION "\"${DCIP_VERSION_MAJOR}.${DCIP_VERSION_MINOR}.${DCIP_VERSION_PATCH}\"")
10
+	set(DCIP_VERSION_NOQUOTES "${DCIP_VERSION_MAJOR}.${DCIP_VERSION_MINOR}.${DCIP_VERSION_PATCH}")
11
+
12
+
13
+	configure_file (
13 14
 	"${CMAKE_CURRENT_SOURCE_DIR}/config/DCIPConfig.h.in"
14 15
 	"${PROJECT_BINARY_DIR}/include/DCIPConfig.h"
15 16
 	)
16
-install ( FILES  ${PROJECT_BINARY_DIR}/include/DCIPConfig.h   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ )
17
+
18
+	install ( FILES  ${PROJECT_BINARY_DIR}/include/DCIPConfig.h   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ )
17 19
 
18 20
 	add_subdirectory("src")
19 21
 	add_library( dcip ${DCIPSOURCE} )  

Loading…
Annulla
Salva