diff options
| author | Vedang Manerikar <ved.manerikar@gmail.com> | 2021-05-30 23:17:52 +0530 |
|---|---|---|
| committer | Vedang Manerikar <ved.manerikar@gmail.com> | 2021-05-30 23:54:01 +0530 |
| commit | e1ad5b1d0468934aaa11c445cf98303092ac5304 (patch) | |
| tree | f0ef9c35ef68e95bf1f1ff46c153a46b22cf6008 | |
| parent | c04273b40907dcfaf4bd0f4e759694a0f738e926 (diff) | |
Clean up the test code to check if poppler is properly installed
Create an explicit test file which can be compiled by c++. This commit
should have been part of d435a40 and extends the change made there.
| -rwxr-xr-x | server/autobuild | 4 | ||||
| -rw-r--r-- | server/install_test.cpp | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/server/autobuild b/server/autobuild index 89a4ccd..f09790d 100755 --- a/server/autobuild +++ b/server/autobuild @@ -167,9 +167,7 @@ have_packages_installed() which make || return 1 which gcc || which cc || return 1 which g++ || which c++ || return 1 - c++ $(pkg-config --cflags poppler) -o /dev/null -E - 2>/dev/null <<EOF - #include <PDFDocEncoding.h> -EOF + c++ $(pkg-config --cflags poppler) -o /dev/null -E install_test.cpp 2>/dev/null [ $? -eq 0 ] || return 1 return 0 } >/dev/null 2>&1 diff --git a/server/install_test.cpp b/server/install_test.cpp new file mode 100644 index 0000000..d553d2b --- /dev/null +++ b/server/install_test.cpp @@ -0,0 +1,7 @@ +#include <PDFDocEncoding.h> +#include <iostream> + +int main() { + std::cout << "Hello World, pdf-tools!"; + return 0; +} |
