Browse Source

only perform compilation phase for verify C++-compliance, no linkage and running

master
George Danchev 10 years ago
parent
commit
a30b05dd70
  1. 38
      releng/auto_cxx
  2. 6
      releng/codesamples/api_3lib.cpp

38
releng/auto_cxx

@ -48,39 +48,37 @@ else
fi
# process sample code tests
# if test -f "${SAMPLE_CODE_DIR}"/*.cpp; then
for SMPL in `ls "${SAMPLE_CODE_DIR}"/*.cpp`; do
CMD_CPL="${CC} -I../ -L ../libisoburn/.libs/ ${CFLAGS} -lisoburn -o ${SMPL}.obj ${SMPL}"
printf "${SELF}: ${CMD_CPL}\n"
# CMD_CPL="${CC} -I../ -L ../libisoburn/.libs/ ${CFLAGS} -lisoburn -o ${SMPL}.obj ${SMPL}"
CMD_CPL="${CC} -c -I../ ${CFLAGS} -o ${SMPL}.obj ${SMPL}"
printf "${SELF}: ${CMD_CPL}"
set +e
${CMD_CPL}
RET_CPL="$?"
if [ ${RET_CPL} = 0 -a -f ${SMPL}.obj ]; then
mv ${SMPL}.obj ${GEN_DATA_DIR}
printf "...ok\n"
else
printf "\nFAIL : ${SELF}: Compilation of ${SMPL}\n"
cleanup
exit 7
fi
BASE=$(basename ${SMPL}.obj)
printf "${SELF}: Running LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}"
LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}
RET_SMPL="$?"
case ${RET_SMPL} in
0)
printf "...ok\n"
;;
*)
printf "exit code: ${RET_SMPL}\n"
cleanup
exit 8
;;
esac
# BASE=$(basename ${SMPL}.obj)
# printf "${SELF}: Running LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}"
# LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}
# RET_SMPL="$?"
# case ${RET_SMPL} in
# 0)
# printf "...ok\n"
# ;;
# *)
# printf "exit code: ${RET_SMPL}\n"
# cleanup
# exit 8
# ;;
# esac
set -e
done
#else
# printf "\n${SELF}: No C++ code samples found in ${SAMPLE_CODE_DIR}\n"
#fi
# clean
cleanup

6
releng/codesamples/api_3lib.cpp

@ -13,11 +13,11 @@
#include <inttypes.h>
extern "C" {
#include <libburn/libburn.h>
#include <libisofs/libisofs.h>
#include "libburn/libburn.h"
#include "libisofs/libisofs.h"
// using namespace burn;
// (this was needed to before rev.4062 of libisoburn)
#include <libisoburn/libisoburn.h>
#include "libisoburn/libisoburn.h"
}
int main() {

Loading…
Cancel
Save