From 1df0c7b1495c6cf2c13b7e8d3b2fc965fdf08748 Mon Sep 17 00:00:00 2001 From: liaogang Date: Wed, 14 Sep 2016 09:46:58 +0800 Subject: [PATCH] avoid link failed on unit test for mac os --- paddle/math/tests/test_CpuGpuVector.cpp | 6 ++++++ paddle/math/tests/test_matrixCompare.cpp | 5 +++++ paddle/math/tests/test_perturbation.cpp | 6 ++++++ paddle/math/tests/test_sparseMatrixCompare.cpp | 6 ++++++ 4 files changed, 23 insertions(+) diff --git a/paddle/math/tests/test_CpuGpuVector.cpp b/paddle/math/tests/test_CpuGpuVector.cpp index 7b50b020c..61b424e3c 100644 --- a/paddle/math/tests/test_CpuGpuVector.cpp +++ b/paddle/math/tests/test_CpuGpuVector.cpp @@ -84,4 +84,10 @@ int main(int argc, char** argv) { return ret; } +#else + +int main(int argc, char const* argv[]) { + return 0; +} + #endif diff --git a/paddle/math/tests/test_matrixCompare.cpp b/paddle/math/tests/test_matrixCompare.cpp index fe8eacc2e..ac50e7b74 100644 --- a/paddle/math/tests/test_matrixCompare.cpp +++ b/paddle/math/tests/test_matrixCompare.cpp @@ -1851,5 +1851,10 @@ int main(int argc, char** argv) { initMain(argc, argv); return RUN_ALL_TESTS(); } +#else + +int main(int argc, char const* argv[]) { + return 0; +} #endif diff --git a/paddle/math/tests/test_perturbation.cpp b/paddle/math/tests/test_perturbation.cpp index 51e346fef..050f2ca9c 100644 --- a/paddle/math/tests/test_perturbation.cpp +++ b/paddle/math/tests/test_perturbation.cpp @@ -254,4 +254,10 @@ int main(int argc, char** argv) { return RUN_ALL_TESTS(); } +#else + +int main(int argc, char const* argv[]) { + return 0; +} + #endif diff --git a/paddle/math/tests/test_sparseMatrixCompare.cpp b/paddle/math/tests/test_sparseMatrixCompare.cpp index 6048dd811..b3467e498 100644 --- a/paddle/math/tests/test_sparseMatrixCompare.cpp +++ b/paddle/math/tests/test_sparseMatrixCompare.cpp @@ -178,4 +178,10 @@ int main(int argc, char** argv) { return ret; } +#else + +int main(int argc, char const* argv[]) { + return 0; +} + #endif -- GitLab