Catch2 install

Catch2 install

par Juncheng Zhang,
Nombre de réponses : 3

Does anyone successfully installed catch2 in teaching cluster, did you installed by "module load catch2".

I am currently using my own scinet account and had trouble install catch2, I tried "module load catch2", however there is no such module available,

and also tried another way, by "git clone" and use cmake to install, I installed the catch2 in my current work dir, but there are some error when I run the run_output_c2.

"error: No such file or directory, #include <catch2/catch_all.hpp>"

I understand I should not install the catch in my working dir, but I am not sure which dir should I put it in.

if anyone successfully installed in teaching cluster, let me know, and also I dont know how to log into the teaching cluster

Thanks, I appreciate anyhelp!

En réponse à Juncheng Zhang

Re: Catch2 install

par Ramses van Zon,
Sorry for not seeing this question earlier, but there are some instruction on installing it using cmake here:
https://github.com/catchorg/Catch2/blob/devel/docs/cmake-integration.md#user-content-installing-catch2-from-git-repository
Combined with the hints on the lecture slide on Libraries and Testing, to install it, e.g. in $HOME/mycatch, you probably need something like:
$ git clone https://github.com/catchorg/Catch2.git
$ cd Catch2
$ cmake -B build -S . -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=$HOME/mycatch2
$ cmake --build build/ --target install
The Teach cluster account will be created shortly, but this installation is part of the assignment 3 which does not require the teach cluster.