Fix cgal_test_with_cmake from Point_set_processing_3 and

Surface_reconstruction_points_3:
  - [ "a" == "b" ] is a syntax of Bash. The POSIX way if with a single '='.
  - do not override MAKE_CMD if it is already set (to jom, for example).
This commit is contained in:
Laurent Rineau 2010-08-11 09:10:46 +00:00
parent 96a3dcb342
commit 32f6d6d555
5 changed files with 54 additions and 39 deletions

View File

@ -26,7 +26,10 @@
MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release" MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
;; ;;
-GNMake* ) # if nmake -GNMake* ) # if nmake
MAKE_CMD="nmake -fMakefile" if [ -z "$MAKE_CMD" ]; then
MAKE_CMD="nmake"
fi
MAKE_CMD="${MAKE_CMD} -fMakefile"
MAKE_CLEAN_CMD="${MAKE_CMD} clean" MAKE_CLEAN_CMD="${MAKE_CMD} clean"
;; ;;
* ) # if make * ) # if make
@ -83,7 +86,7 @@ can_compile()
fi fi
;; ;;
* ) # if make or nmake * ) # if make or nmake
if ${MAKE_CMD} help | grep "$1" > /dev/null; then if ${MAKE_CMD} help | grep "$1\$" > /dev/null; then
echo y echo y
else else
echo n echo n
@ -164,39 +167,39 @@ if [ $# -ne 0 ] ; then
done done
else else
echo "Run all tests." echo "Run all tests."
if [ `can_compile average_spacing_example` == "y" ]; then if [ `can_compile average_spacing_example` = "y" ]; then
compile_and_run average_spacing_example compile_and_run average_spacing_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile grid_simplification_example` == "y" ]; then if [ `can_compile grid_simplification_example` = "y" ]; then
compile_and_run grid_simplification_example compile_and_run grid_simplification_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile jet_smoothing_example` == "y" ]; then if [ `can_compile jet_smoothing_example` = "y" ]; then
compile_and_run jet_smoothing_example compile_and_run jet_smoothing_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile normal_estimation` == "y" ]; then if [ `can_compile normal_estimation` = "y" ]; then
compile_and_run normal_estimation compile_and_run normal_estimation
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile normals_example` == "y" ]; then if [ `can_compile normals_example` = "y" ]; then
compile_and_run normals_example compile_and_run normals_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile property_map` == "y" ]; then if [ `can_compile property_map` = "y" ]; then
compile_and_run property_map compile_and_run property_map
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile random_simplification_example` == "y" ]; then if [ `can_compile random_simplification_example` = "y" ]; then
compile_and_run random_simplification_example compile_and_run random_simplification_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile read_write_xyz_point_set_example` == "y" ]; then if [ `can_compile read_write_xyz_point_set_example` = "y" ]; then
compile_and_run read_write_xyz_point_set_example compile_and_run read_write_xyz_point_set_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile remove_outliers_example` == "y" ]; then if [ `can_compile remove_outliers_example` = "y" ]; then
compile_and_run remove_outliers_example compile_and_run remove_outliers_example
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
@ -206,7 +209,7 @@ fi
# The clean target generated by CMake under cygwin # The clean target generated by CMake under cygwin
# always fails for some reason # always fails for some reason
# #
if [ "${NEED_CLEAN}" == "y" ]; then if [ "${NEED_CLEAN}" = "y" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CLEAN_CMD} ${MAKE_CLEAN_CMD}
fi fi

View File

@ -26,7 +26,10 @@
MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release" MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
;; ;;
-GNMake* ) # if nmake -GNMake* ) # if nmake
MAKE_CMD="nmake -fMakefile" if [ -z "$MAKE_CMD" ]; then
MAKE_CMD="nmake"
fi
MAKE_CMD="${MAKE_CMD} -fMakefile"
MAKE_CLEAN_CMD="${MAKE_CMD} clean" MAKE_CLEAN_CMD="${MAKE_CMD} clean"
;; ;;
* ) # if make * ) # if make
@ -83,7 +86,7 @@ can_compile()
fi fi
;; ;;
* ) # if make or nmake * ) # if make or nmake
if ${MAKE_CMD} help | grep "$1" > /dev/null; then if ${MAKE_CMD} help | grep "$1\$" > /dev/null; then
echo y echo y
else else
echo n echo n
@ -164,19 +167,19 @@ if [ $# -ne 0 ] ; then
done done
else else
echo "Run all tests." echo "Run all tests."
if [ `can_compile analysis_test` == "y" ]; then if [ `can_compile analysis_test` = "y" ]; then
compile_and_run analysis_test compile_and_run analysis_test
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile normal_estimation_test` == "y" ]; then if [ `can_compile normal_estimation_test` = "y" ]; then
compile_and_run normal_estimation_test compile_and_run normal_estimation_test
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile remove_outliers_test` == "y" ]; then if [ `can_compile remove_outliers_test` = "y" ]; then
compile_and_run remove_outliers_test compile_and_run remove_outliers_test
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile smoothing_test` == "y" ]; then if [ `can_compile smoothing_test` = "y" ]; then
compile_and_run smoothing_test compile_and_run smoothing_test
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
@ -186,7 +189,7 @@ fi
# The clean target generated by CMake under cygwin # The clean target generated by CMake under cygwin
# always fails for some reason # always fails for some reason
# #
if [ "${NEED_CLEAN}" == "y" ]; then if [ "${NEED_CLEAN}" = "y" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CLEAN_CMD} ${MAKE_CLEAN_CMD}
fi fi

View File

@ -26,7 +26,10 @@
MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release" MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
;; ;;
-GNMake* ) # if nmake -GNMake* ) # if nmake
MAKE_CMD="nmake -fMakefile" if [ -z "$MAKE_CMD" ]; then
MAKE_CMD="nmake"
fi
MAKE_CMD="${MAKE_CMD} -fMakefile"
MAKE_CLEAN_CMD="${MAKE_CMD} clean" MAKE_CLEAN_CMD="${MAKE_CMD} clean"
;; ;;
* ) # if make * ) # if make
@ -83,7 +86,7 @@ can_compile()
fi fi
;; ;;
* ) # if make or nmake * ) # if make or nmake
if ${MAKE_CMD} help | grep "$1" > /dev/null; then if ${MAKE_CMD} help | grep "$1\$" > /dev/null; then
echo y echo y
else else
echo n echo n
@ -164,51 +167,51 @@ if [ $# -ne 0 ] ; then
done done
else else
echo "Run all tests." echo "Run all tests."
if [ `can_compile Point_set_demo` == "y" ]; then if [ `can_compile Point_set_demo` = "y" ]; then
compile_and_run Point_set_demo compile_and_run Point_set_demo
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_APSS_plugin` == "y" ]; then if [ `can_compile PS_demo_APSS_plugin` = "y" ]; then
compile_and_run PS_demo_APSS_plugin compile_and_run PS_demo_APSS_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_average_spacing_plugin` == "y" ]; then if [ `can_compile PS_demo_average_spacing_plugin` = "y" ]; then
compile_and_run PS_demo_average_spacing_plugin compile_and_run PS_demo_average_spacing_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_cleaning_plugin` == "y" ]; then if [ `can_compile PS_demo_cleaning_plugin` = "y" ]; then
compile_and_run PS_demo_cleaning_plugin compile_and_run PS_demo_cleaning_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_inside_out_plugin` == "y" ]; then if [ `can_compile PS_demo_inside_out_plugin` = "y" ]; then
compile_and_run PS_demo_inside_out_plugin compile_and_run PS_demo_inside_out_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_local_spacing_plugin` == "y" ]; then if [ `can_compile PS_demo_local_spacing_plugin` = "y" ]; then
compile_and_run PS_demo_local_spacing_plugin compile_and_run PS_demo_local_spacing_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_normal_estimation_plugin` == "y" ]; then if [ `can_compile PS_demo_normal_estimation_plugin` = "y" ]; then
compile_and_run PS_demo_normal_estimation_plugin compile_and_run PS_demo_normal_estimation_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_off_plugin` == "y" ]; then if [ `can_compile PS_demo_off_plugin` = "y" ]; then
compile_and_run PS_demo_off_plugin compile_and_run PS_demo_off_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_poisson_plugin` == "y" ]; then if [ `can_compile PS_demo_poisson_plugin` = "y" ]; then
compile_and_run PS_demo_poisson_plugin compile_and_run PS_demo_poisson_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_simplification_plugin` == "y" ]; then if [ `can_compile PS_demo_simplification_plugin` = "y" ]; then
compile_and_run PS_demo_simplification_plugin compile_and_run PS_demo_simplification_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_smoothing_plugin` == "y" ]; then if [ `can_compile PS_demo_smoothing_plugin` = "y" ]; then
compile_and_run PS_demo_smoothing_plugin compile_and_run PS_demo_smoothing_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
if [ `can_compile PS_demo_xyz_plugin` == "y" ]; then if [ `can_compile PS_demo_xyz_plugin` = "y" ]; then
compile_and_run PS_demo_xyz_plugin compile_and_run PS_demo_xyz_plugin
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
@ -218,7 +221,7 @@ fi
# The clean target generated by CMake under cygwin # The clean target generated by CMake under cygwin
# always fails for some reason # always fails for some reason
# #
if [ "${NEED_CLEAN}" == "y" ]; then if [ "${NEED_CLEAN}" = "y" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CLEAN_CMD} ${MAKE_CLEAN_CMD}
fi fi

View File

@ -26,7 +26,10 @@
MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release" MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
;; ;;
-GNMake* ) # if nmake -GNMake* ) # if nmake
MAKE_CMD="nmake -fMakefile" if [ -z "$MAKE_CMD" ]; then
MAKE_CMD="nmake"
fi
MAKE_CMD="${MAKE_CMD} -fMakefile"
MAKE_CLEAN_CMD="${MAKE_CMD} clean" MAKE_CLEAN_CMD="${MAKE_CMD} clean"
;; ;;
* ) # if make * ) # if make

View File

@ -26,7 +26,10 @@
MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release" MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
;; ;;
-GNMake* ) # if nmake -GNMake* ) # if nmake
MAKE_CMD="nmake -fMakefile" if [ -z "$MAKE_CMD" ]; then
MAKE_CMD="nmake"
fi
MAKE_CMD="${MAKE_CMD} -fMakefile"
MAKE_CLEAN_CMD="${MAKE_CMD} clean" MAKE_CLEAN_CMD="${MAKE_CMD} clean"
;; ;;
* ) # if make * ) # if make
@ -83,7 +86,7 @@ can_compile()
fi fi
;; ;;
* ) # if make or nmake * ) # if make or nmake
if ${MAKE_CMD} help | grep "$1" > /dev/null; then if ${MAKE_CMD} help | grep "$1\$" > /dev/null; then
echo y echo y
else else
echo n echo n
@ -164,7 +167,7 @@ if [ $# -ne 0 ] ; then
done done
else else
echo "Run all tests." echo "Run all tests."
if [ `can_compile poisson_reconstruction_test` == "y" ]; then if [ `can_compile poisson_reconstruction_test` = "y" ]; then
compile_and_run poisson_reconstruction_test compile_and_run poisson_reconstruction_test
[ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y [ -z "${NEED_CLEAN}" ] && NEED_CLEAN=y
fi fi
@ -174,7 +177,7 @@ fi
# The clean target generated by CMake under cygwin # The clean target generated by CMake under cygwin
# always fails for some reason # always fails for some reason
# #
if [ "${NEED_CLEAN}" == "y" ]; then if [ "${NEED_CLEAN}" = "y" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CLEAN_CMD} ${MAKE_CLEAN_CMD}
fi fi