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

This commit is contained in:
George Danchev 2012-04-21 09:14:14 +00:00
parent 7e00e567e0
commit a30b05dd70
2 changed files with 21 additions and 23 deletions

View File

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

View File

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