File: modify_cmake.patch

package info (click to toggle)
bcalm 2.2.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 624 kB
  • sloc: cpp: 3,132; python: 314; sh: 87; makefile: 13
file content (77 lines) | stat: -rw-r--r-- 2,927 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Description: modify and touch-up cmake file to build
 Modify cmake so debian-packaged libraries are used instead and prevent SHA-1 fetching from repository (use hard-code)
Author: Shayan Doust <hello@shayandoust.me>
Last-Update: 2019-09-23
---

Index: bcalm/CMakeLists.txt
===================================================================
--- bcalm.orig/CMakeLists.txt
+++ bcalm/CMakeLists.txt
@@ -5,12 +5,12 @@ cmake_minimum_required(VERSION 2.6)
 ################################################################################
 # Shortcuts
 ################################################################################
-SET (GATB_CORE_HOME  ${PROJECT_SOURCE_DIR}/gatb-core)
+#SET (GATB_CORE_HOME  ${PROJECT_SOURCE_DIR}/gatb-core)
 
 ################################################################################
 # Define cmake modules directory
 ################################################################################
-FOREACH (path "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${GATB_CORE_HOME}/gatb-core/cmake")
+FOREACH (path "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
     IF (EXISTS "${path}")
         SET (CMAKE_MODULE_PATH  "${CMAKE_MODULE_PATH}" "${path}")
     ENDIF()
@@ -19,18 +19,18 @@ ENDFOREACH(path)
 #############################
 #getting git version
 #from http://stackoverflow.com/questions/1435953/how-can-i-pass-git-sha1-to-compiler-as-definition-using-cmake
-exec_program(
-    "git"
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ARGS "rev-parse --short HEAD"
-    OUTPUT_VARIABLE VERSION_SHA1
-    RETURN_VALUE ERROR_GIT)
-
-if(NOT ${ERROR_GIT})
-    add_definitions( -DGIT_SHA1="${VERSION_SHA1}" )
-else()
-    message("Warning: cannot retrieve git version. Bcalm won't display its version. Error value: ${ERROR_GIT})")
-endif(NOT ${ERROR_GIT})
+#exec_program(
+#    "git"
+#    ${CMAKE_CURRENT_SOURCE_DIR}
+#    ARGS "rev-parse --short HEAD"
+#    OUTPUT_VARIABLE VERSION_SHA1
+#    RETURN_VALUE ERROR_GIT)
+#
+#if(NOT ${ERROR_GIT})
+#    add_definitions( -DGIT_SHA1="${VERSION_SHA1}" )
+#else()
+#    message("Warning: cannot retrieve git version. Bcalm won't display its version. Error value: ${ERROR_GIT})")
+#endif(NOT ${ERROR_GIT})
 
 ################################
 #add version nifo
@@ -49,7 +49,10 @@ SET (GATB_CORE_EXCLUDE_EXAMPLES  1)
 
 
 # GATB CORE
-include (GatbCore)
+#include (GatbCore)
+include(GNUInstallDirs)
+
+link_directories(/usr/${CMAKE_INSTALL_LIBDIR}/hdf5/serial)
 
 ################################################################################
 #  TOOLS
@@ -80,7 +83,7 @@ set (PROGRAM_SOURCE_DIR ${PROJECT_SOURCE
 include_directories (${PROGRAM_SOURCE_DIR})
 file (GLOB_RECURSE  ProjectFiles  ${PROGRAM_SOURCE_DIR}/*.cpp)
 add_executable(${program} ${ProjectFiles})
-target_link_libraries(${program} ${gatb-core-libraries})
+target_link_libraries(${program} gatbcore hdf5 z)
 
 ################################################################################
 # DELIVERY