@@ -17,7 +17,7 @@ export LIBSUFFIX="${1%-*}"
17
17
echo " LIBSUFFIX: $LIBSUFFIX "
18
18
export ITF64SUFFIX=" ${1#* -} "
19
19
echo " ITF64SUFFIX: $ITF64SUFFIX "
20
- cmake -DCMAKE_INSTALL_PREFIX=" ${TMP_PREFIX} " -DMPI=ON -DLIBSUFFIX=" ${LIBSUFFIX} " -DITF64SUFFIX=" ${ITF64SUFFIX} " .
20
+ cmake -DCMAKE_INSTALL_PREFIX=" ${TMP_PREFIX} " -DMPI=ON -DICB=ON - DLIBSUFFIX=" ${LIBSUFFIX} " -DITF64SUFFIX=" ${ITF64SUFFIX} " .
21
21
make all install
22
22
tree " ${TMP_PREFIX} "
23
23
@@ -34,6 +34,8 @@ arpack_cmake_dir="${arpack_cmake_dir%/*}" # Same as dirname
34
34
CMAKE_PREFIX_PATH=" ${arpack_cmake_dir%/* } " # cmake directory
35
35
36
36
# 4. Create new cmake project, in temporary directory, with files from arpack-ng.
37
+ # The first targets are compiled with *.cmake files generated by cmake.
38
+ # The second targets are compiled with *.pc files generated by cmake.
37
39
38
40
mkdir -p tstCMakeInstall
39
41
cd tstCMakeInstall
@@ -43,10 +45,11 @@ cp "@PROJECT_SOURCE_DIR@/EXAMPLES/BAND/dnbdr1.f" .
43
45
cp " @PROJECT_SOURCE_DIR@/EXAMPLES/BAND/dnbdr3.f" .
44
46
cp " @PROJECT_SOURCE_DIR@/PARPACK/EXAMPLES/MPI/pdndrv1.f" .
45
47
cp " @PROJECT_SOURCE_DIR@/PARPACK/EXAMPLES/MPI/pdndrv3.f" .
48
+ cp " @PROJECT_SOURCE_DIR@/TESTS/icb_arpack_c.c" .
46
49
47
50
echo " cmake_minimum_required(VERSION 3.0)" > CMakeLists.txt
48
51
echo " " >> CMakeLists.txt
49
- echo " project(tstCMakeInstall Fortran) " >> CMakeLists.txt
52
+ echo " project(tstCMakeInstall Fortran C) " >> CMakeLists.txt
50
53
echo " " >> CMakeLists.txt
51
54
echo " find_package(BLAS REQUIRED)" >> CMakeLists.txt
52
55
echo " find_package(LAPACK REQUIRED)" >> CMakeLists.txt
@@ -60,6 +63,14 @@ echo "target_include_directories(dnbdr1 INTERFACE LAPACK::LAPACK)" >> CMake
60
63
echo " target_link_libraries(dnbdr1 LAPACK::LAPACK)" >> CMakeLists.txt
61
64
echo " target_include_directories(dnbdr1 INTERFACE ARPACK::ARPACK)" >> CMakeLists.txt
62
65
echo " target_link_libraries(dnbdr1 ARPACK::ARPACK)" >> CMakeLists.txt
66
+ echo " " >> CMakeLists.txt
67
+ echo " add_executable(icb_arpack_c icb_arpack_c.c)" >> CMakeLists.txt
68
+ echo " target_include_directories(icb_arpack_c INTERFACE BLAS::BLAS)" >> CMakeLists.txt
69
+ echo " target_link_libraries(icb_arpack_c BLAS::BLAS)" >> CMakeLists.txt
70
+ echo " target_include_directories(icb_arpack_c INTERFACE LAPACK::LAPACK)" >> CMakeLists.txt
71
+ echo " target_link_libraries(icb_arpack_c LAPACK::LAPACK)" >> CMakeLists.txt
72
+ echo " target_include_directories(icb_arpack_c INTERFACE ARPACK::ARPACK)" >> CMakeLists.txt
73
+ echo " target_link_libraries(icb_arpack_c ARPACK::ARPACK)" >> CMakeLists.txt
63
74
echo " " >> CMakeLists.txt
64
75
echo " add_executable(pdndrv1 dnband.f pdndrv1.f)" >> CMakeLists.txt
65
76
echo " target_include_directories(pdndrv1 INTERFACE BLAS::BLAS)" >> CMakeLists.txt
@@ -84,6 +95,14 @@ echo "target_include_directories(dnbdr3 INTERFACE LAPACK::LAPACK)" >> CMake
84
95
echo " target_link_libraries(dnbdr3 LAPACK::LAPACK)" >> CMakeLists.txt
85
96
echo " target_include_directories(dnbdr3 INTERFACE PkgConfig::ARPACK)" >> CMakeLists.txt
86
97
echo " target_link_libraries(dnbdr3 PkgConfig::ARPACK)" >> CMakeLists.txt
98
+ echo " " >> CMakeLists.txt
99
+ echo " add_executable(icb_arpack_c_pkg icb_arpack_c.c)" >> CMakeLists.txt
100
+ echo " target_include_directories(icb_arpack_c_pkg INTERFACE BLAS::BLAS)" >> CMakeLists.txt
101
+ echo " target_link_libraries(icb_arpack_c_pkg BLAS::BLAS)" >> CMakeLists.txt
102
+ echo " target_include_directories(icb_arpack_c_pkg INTERFACE LAPACK::LAPACK)" >> CMakeLists.txt
103
+ echo " target_link_libraries(icb_arpack_c_pkg LAPACK::LAPACK)" >> CMakeLists.txt
104
+ echo " target_include_directories(icb_arpack_c_pkg INTERFACE PkgConfig::ARPACK)" >> CMakeLists.txt
105
+ echo " target_link_libraries(icb_arpack_c_pkg PkgConfig::ARPACK)" >> CMakeLists.txt
87
106
echo " " >> CMakeLists.txt
88
107
echo " add_executable(pdndrv3 dnband.f pdndrv3.f)" >> CMakeLists.txt
89
108
echo " target_include_directories(pdndrv3 INTERFACE BLAS::BLAS)" >> CMakeLists.txt
@@ -106,6 +125,9 @@ cmake .. -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" || exit 1
106
125
make all VERBOSE=1 || exit 1
107
126
108
127
./dnbdr1 || exit 1
128
+ ./icb_arpack_c || exit 1
109
129
mpirun -n 2 ./pdndrv1 || exit 1
130
+
110
131
./dnbdr3 || exit 1
132
+ ./icb_arpack_c_pkg || exit 1
111
133
mpirun -n 2 ./pdndrv3 || exit 1
0 commit comments