From 940f384a0929f69ec23b4e043aae54129dbc318d Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Sun, 10 Nov 2024 19:04:23 +0100 Subject: [PATCH] Add quest matrix to CI (#81) * Add quest matrix to CI * Add cmake quest option --- CMakeLists.txt | 7 ++++++- build/windows/build.sh | 13 +++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a873f165..2f6dc666 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,8 @@ set( BUILD_SHARED_LIBRARIES OFF) set( Boost_USE_STATIC_LIBS ON ) set( CMAKE_EXE_LINKER_FLAGS "-static") endif() -add_definitions(-DTYRANT_OPTIMIZER_VERSION="${VERSION}" ${DEBUG} -DNQUEST) +add_definitions(-DTYRANT_OPTIMIZER_VERSION="${VERSION}" ${DEBUG}) + project(tuo) file(GLOB TUO_SOURCES "*.cpp") @@ -24,6 +25,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/extern/hPMML/include) enable_language(CXX) add_executable(tuo ${TUO_SOURCES}) +option(WITH_QUEST "With Quests enabled" OFF) +if(NOT WITH_QUEST) +add_definitions(-DNQUEST) +endif() option(USE_OPENMP "Use OpenMP instead of Boost" OFF) if(USE_OPENMP) # src: https://stackoverflow.com/a/12404666 diff --git a/build/windows/build.sh b/build/windows/build.sh index a1c74f48..00fd64fd 100755 --- a/build/windows/build.sh +++ b/build/windows/build.sh @@ -10,6 +10,7 @@ MXE_DIR=/usr/lib/mxe declare -a a_openmp=("" "-openmp" ) declare -a a_debug=("" "-debug" "-time") declare -a a_bit=("" "-x86" ) +declare -a a_quest=("" "-quest" ) for omp in "${a_openmp[@]}" do @@ -17,10 +18,12 @@ for dbg in "${a_debug[@]}" do for bit in "${a_bit[@]}" do +for quest in "${a_quest[@]}" +do DFLAGS="" -BDIR="build-dir${bit}${omp}${dbg}" -NAME="tuo${bit}${omp}${dbg}.exe" +BDIR="build-dir${quest}${bit}${omp}${dbg}" +NAME="tuo${quest}${bit}${omp}${dbg}.exe" if [ "$bit" = "" ]; then #Windows x64 Build @@ -39,6 +42,11 @@ fi if [ "$omp" = "-openmp" ]; then DFLAGS="${DFLAGS} -DUSE_OPENMP=ON" fi +if [ "$quest" = "" ]; then +DFLAGS="${DFLAGS} -DWITH_QUEST=OFF" +else +DFLAGS="${DFLAGS} -DWITH_QUEST=ON" +fi #prep cmake ${MXE_DIR}/usr/bin/${MXE_TARGET}-cmake . -B${BDIR} -DVERSION:STRING="$(git describe --tags --abbrev=0 --dirty)${bit}${omp}${dbg}" ${DFLAGS} @@ -55,5 +63,6 @@ mv ${BDIR}/tuo.exe ${NAME} done done done +done set +xue