-
Notifications
You must be signed in to change notification settings - Fork 0
/
build _test on mac & Rostam.txt
83 lines (48 loc) · 3.04 KB
/
build _test on mac & Rostam.txt
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
78
79
80
81
82
// 1. build/installation on local mac
~ mkdir Blaze
~ cd Blaze
~/Blaze> git clone https://bitbucket.org/blaze-lib/blaze.git
cd blaze
mkdir build && cd build
~/Blaze/blaze/build> cmake -DCMAKE_INSTALL_PREFIX=/Users/chuanqiuhe/Blaze/blaze ..
~/Blaze/blaze/build> make install
// 2. Test:
// 2.1 ---------- CmakeLists.txt
cmake_minimum_required(VERSION 3.13)
project(FirstExample CXX)
#find_package(blaze REQUIRED)
#add_executable(FirstExample FirstExample.cpp)
#target_link_libraries( FirstExample INTERFACE blaze::blaze )
find_package(blaze)
if( blaze_FOUND )
add_library( FirstExample INTERFACE )
target_link_libraries( FirstExample INTERFACE blaze::blaze )
endif()
// 2.2------------make
~/Blaze/test$ cmake -DCMAKE_DIR=/Users/chuanqiuhe/Blaze/blaze .
~/Blaze/test$ make
/*
//-----------compile !!!!!!!! using following cmd , complains a lot.
g++ -I/Users/chuanqiuhe/Blaze/blaze FirstExample.cpp
*/
// 2.3--------------compile
using visual studio default compiler, generate executable file : FirstExample*
then do ./FirstExample*
note: use clang++ build active file debugger.... 生成可执行文件 (用g++那个报错很多)
*Executing task: C/C++: clang++ build active file
Starting build...
/usr/bin/clang++ -g /Users/chuanqiuhe/Blaze/test1/FirstExample.cpp -o /Users/chuanqiuhe/Blaze/test1/FirstExample -std=c++17
/********** on Rostam: https://gist.github.com/hcq9102/01c3c4afb01f8499b291d67a904ac217
1. chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/test825$ cmake -DCMAKE_DIR=/home/chuanqiu/Blaze/blaze .
2. chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/test825$ make
3. chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/test825$ chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/test825$ g++ -I/home/chuanqiu/Blaze/blaze two_mass.cpp
### in order to compile the code: add extra lib link: -llapack
g++ -I/home/chuanqiu/Blaze/blaze -llapack two_mass.cpp // get executable file
### Get GDB exe. file (twomassGdb)
g++ -g -I/home/chuanqiu/Blaze/blaze -llapack two_mass.cpp -o twomassGdb
/********** on Rostam: Gausseidel method
chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/gaussseidel$ cmake -DCMAKE_DIR=/home/chuanqiu/Blaze/blaze .
chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/gaussseidel$ make
chuanqiu@rostam1:/work/chuanqiu/Dynamic_project/gaussseidel$ g++ -I/home/chuanqiu/Blaze/blaze -llapack gausseidel.cpp -o gaus
### Get GDB exe. file (twomassGdb)
g++ -g -I/home/chuanqiu/Blaze/blaze -llapack gausseidel.cpp -o Gdb