Skip to content

Commit 530a89d

Browse files
authored
Merge pull request drowe67#275 from drowe67/dr-cml
Makefile for CML
2 parents 199a9e1 + 4a11658 commit 530a89d

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CMake
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
env:
66
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

octave/ldpc.m

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
% ldpc.m
22
%
3-
% David Rowe 2013
4-
% Octave functions to help us use the CML LDPC code.
5-
%
6-
% Installing CML library
7-
% ----------------------
8-
%
9-
% $ sudo apt-get install liboctave-dev
10-
% $ wget http://www.iterativesolutions.com/user/image/cml.1.10.zip
11-
% $ unzip cml.1.10.zip
12-
% $ patch -p0 < ~/codec2/octave/cml.patch
13-
% $ cd cml/source
14-
% $ octave --no-gui
15-
% octave:> make
16-
% (you'll see a few warnings but hopefully no errors)
17-
%
18-
% Optionally set an environment variable for CML_PATH in your shell or
19-
% in your codec2/octave/.octaverc file
3+
#{
4+
David Rowe 2013
5+
Octave functions for the CML LDPC library.
6+
7+
To install and compile CML support:
8+
9+
$ sudo apt-get install liboctave-dev
10+
$ git clone git@github.com:drowe67/cml.git
11+
$ cd cml
12+
$ make
13+
14+
If you have configured codec2 with cmake -DUNITTEST=1, then you will
15+
already have CML (e.g. under build_linux/cml), as it is used to run unit tests.
16+
17+
To use CML when running Octave simulations from the Octave CLI, set an
18+
environment variable for CML_PATH in your shell or in your
19+
codec2/octave/.octaverc file:
20+
21+
setenv("CML_PATH","../build_linux/cml")
22+
#}
2023

2124
1;
2225

unittest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ ExternalProject_Add(cml
108108
SOURCE_DIR ${CML_PATH}
109109
BUILD_IN_SOURCE 1
110110
CONFIGURE_COMMAND true # No configuration required
111-
BUILD_COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/../cml/source && ${OCTAVE_CMD} -qf --eval "make"
111+
BUILD_COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/../cml && make
112112
INSTALL_COMMAND true # No installation required
113113
)
114114

0 commit comments

Comments
 (0)