HElib icon indicating copy to clipboard operation
HElib copied to clipboard

How to run src/Test_binaryCompare.cpp file after sucessfully make?

Open qianlou opened this issue 5 years ago • 1 comments

Ubuntu 16.04: Detailed Description: I have run those two commands successfully at /helib/src/ path:

  1. cmake .
  2. make But nothing happens so that I cannot find any executable file I can run. Then I run make ./Test_binaryCompare.cpp Then nothing happens.

Who can teach me how to run any src/x.cpp file? Thanks in advance.

qianlou avatar Oct 06 '19 20:10 qianlou

@qianlou I suggest you follow the instructions for "Package Build" found here https://github.com/homenc/HElib/blob/master/INSTALL.md when building HElib.

From the HElib directory you need to create a build directory and run cmake .. from HElib/build with the necessary flags. i.e.-DPACKAGE_BUILD=ON.

The test you are trying to run is a legacy test and is planned to be phased out in the future. These tests have been ported to a new googletest framework found in HElib/src/tests. To build these tests you need to run cmake with the flag -DENABLE_TEST=ON.

To run a specific test from the HElib/build directory run ./bin/runTests --gtest_filter="*binaryCompare*". Running that command without the gtest filter will run all tests located in the HElib/src/tests directory.

Note: I would advise you to build a fresh clone of HElib instead of trying to make your existing version work as you should avoid running cmake from within the HElib/src directory of HElib as it populates it with extra files and directories.

jlhcrawford avatar Oct 07 '19 13:10 jlhcrawford