Skip to content
Snippets Groups Projects
all-cmake-debug.sh 599 B
Newer Older
  • Learn to ignore specific revisions
  • THREADS=${1:-5}
    DIRECTORY=$(pwd)
    
    cd CMake
    ./alib_cmake.py -w -m
    cd ..
    
    if [ ! -d debug ]; then
      mkdir debug
    fi
    
    if [ -L debug ]; then
      cd $(readlink debug)
      cmake ${DIRECTORY}
      cd ${DIRECTORY}/debug
    else
      cd debug
      cmake ..
    fi
    
    CXX=clang++ make -j${THREADS} || exit 1
    
    if [ ! -d bin ]; then
      mkdir bin
    fi
    
    rm bin/*
    cd bin
    find .. -executable -type f | grep -v 'CMakeFiles' | while read line; do ln -s $line $(basename $line); done
    
    cp ${DIRECTORY}/translateAddresses .
    cp ${DIRECTORY}/xmlFormat .
    
    cd ${DIRECTORY}
    
    for test in $(ls tests.*.sh); do \
      ./${test} debug/bin ${THREADS}; \
    done