host platform independent procedure
all versions as of 2018-01-23
-
An installation as in virual-dev-env or equivalent.
-
An installation as in java-n-clion.
-
Download the generic Linux archive cmocka-1.1.1.tar.xz.
-
Unpack and create a
build
directory.
cd
tar xvf ~/Downloads/cmocka-1.1.1.tar.xz
cd cmocka-1.1.1
mkdir build
cd build
- Build and install the
cmocka
library.
cmake ..
make
sudo make install
-
On Ubuntu, this will install the library in the default location
/usr/local/lib
.find / -name "*cmocka*"
will output, among other things,
/usr/local/include/cmocka_pbc.h /usr/local/include/cmocka.h /usr/local/lib/libcmocka.so.0 /usr/local/lib/cmake/cmocka /usr/local/lib/cmake/cmocka/cmocka-config.cmake /usr/local/lib/cmake/cmocka/cmocka-config-version.cmake /usr/local/lib/libcmocka.so /usr/local/lib/libcmocka.so.0.4.1 /usr/local/lib/pkgconfig/cmocka.pc
-
Get a fresh fork of the C Programming Assignment 3 from Github.
-
Clone under
~/git-repos
. -
Open CLion and open the
~/git-repos/msl-clang-003
project. TheCMakeLists.txt
has been modified to work with the installedcmocka
library. You should be able to build the project and run the test suite.