- Install a compatible version of
gcc
:
spack env create qflex qflex.yaml
spack install
- Set the recently installed version of
gcc
as default:
spack load [email protected]
build boost
from scratch (run ./build_boost.sh)
export BOOST="boost_1_70_0"
export BOOST_BUILD=$(pwd)/boost_1_70_0-build
wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz -O /tmp/${BOOST}.tar.gz
tar -xf /tmp/${BOOST}.tar.gz
cd ./${BOOST}/
./bootstrap.sh --prefix=$BOOST_BUILD
./b2 -j8
sudo ./b2 install
- example options
-DTARGET_PLATFORM=arm
-DSELECTED_DEBUG=vverb
-DSIMULATOR=KnottyKraken
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include
-DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib
- Add options by
-D${OPTION_NAME}=${OPTION}
aftercmake
.
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include -DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib -DSIMULATOR=KeenKraken .
LD_LIBRARY_PATH=$SPACK_ROOT/var/spack/environments/qflex/.spack-env/view/lib:./boost_1_70_0-build/lib make -j
# Running with keen-kraken
LD_LIBRARY_PATH=$SPACK_ROOT/var/spack/environments/qflex/.spack-env/view/lib:$BOOST_BUILD/lib:$LD_LIBRARY_PATH ./../scripts/captain/captain ../scripts/captain/keen_config/system.ini -o output/
- Use
make clean
to only remove*.a
and*.so
files. - Use
make clean_cmake
to remove all of the files and folders that cmake produces. - If you are using non-default install paths for
boost
and/orgcc
, modify the location of dynamic libraries before executingmake
$ LD_LIBRARY_PATH=<path to dynamic libraries> make -j
- Set the
SIMULATOR
variable toHarness
while runningcmake
:
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBOOST_INCLUDEDIR=$(pwd)/boost_1_70_0-build/include -DBOOST_LIBRARYDIR=$(pwd)/boost_1_70_0-build/lib -DSIMULATOR=Harness .
LD_LIBRARY_PATH=./boost_1_70_0-build/lib make -j
- Use
make clean
to only remove*.a
and*.so
files. - Use
make clean_cmake
to remove all of the files and folders that cmake produces. - Run the tests by executing
testing_harness
:
$ ./testing_harness
- If you are using non-default install paths for
boost
and/orgcc
, modify the location of dynamic libraries before executingmake
andtesting_harness
$ LD_LIBRARY_PATH=<path to dynamic libraries> make -j
$ LD_LIBRARY_PATH=<path to dynamic libraries> ./testing_harness
The preferred version of Ubuntu is 18.04. When you contribute to this project, please clang-format the code at first. Please follow these instructions:
$ sudo apt-get install clang-format-6.0
Use the .clang-format
file from repository and locate it in the folder where you want to format the code.
Within the folder, use this command to format .cpp/.hpp/.c/.h files:
$ find . -type f -and \( -name "*.hpp" -or -name "*.cpp" -or -name "*.h" -or -name "*.c" \) | xargs clang-format -i -style=file
Use the clang_format_test.sh
file to check whether the formatting is successful or not. If it is successful, there will be green works showing All source code in commit are properly formatted
. Otherwise, there will be red warning showing Found formatting errors!
and which file where the problem is in.