[build gbc] Add custom options for Stack
This commit is contained in:
Родитель
86989a1203
Коммит
d9afd92433
|
@ -221,6 +221,10 @@ set (BOND_SKIP_COMPAT_TESTS
|
|||
"FALSE"
|
||||
CACHE BOOL "If TRUE, then skip Bond Compat tests")
|
||||
|
||||
set (BOND_STACK_OPTIONS
|
||||
""
|
||||
CACHE STRING "Options to pass to Haskell Stack")
|
||||
|
||||
if (((BOND_ENABLE_COMM) OR (BOND_ENABLE_GRPC)) AND ((CXX_STANDARD LESS 11) OR (MSVC_VERSION LESS 1800)))
|
||||
message(FATAL_ERROR "BOND_ENABLE_COMM and/or BOND_ENABLE_GRPC is TRUE but compiler specified does not support C++11 standard")
|
||||
endif()
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
cmake_policy (SET CMP0012 NEW)
|
||||
|
||||
execute_process (
|
||||
COMMAND ${STACK_EXECUTABLE} setup
|
||||
COMMAND ${STACK_EXECUTABLE} ${BOND_STACK_OPTIONS} setup
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE error
|
||||
OUTPUT_QUIET
|
||||
|
@ -24,7 +24,7 @@ endif()
|
|||
set (buildGhcOptions "-O2")
|
||||
|
||||
execute_process (
|
||||
COMMAND ${STACK_EXECUTABLE} build :${target} --no-run-tests ${stack_options} --ghc-options=${buildGhcOptions}
|
||||
COMMAND ${STACK_EXECUTABLE} ${BOND_STACK_OPTIONS} build :${target} --no-run-tests ${stack_options} --ghc-options=${buildGhcOptions}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE error)
|
||||
|
||||
|
@ -34,7 +34,7 @@ endif()
|
|||
|
||||
# Copy results to builddir
|
||||
execute_process (
|
||||
COMMAND ${STACK_EXECUTABLE} path --dist-dir
|
||||
COMMAND ${STACK_EXECUTABLE} ${BOND_STACK_OPTIONS} path --dist-dir
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE dist_dir
|
||||
RESULT_VARIABLE error)
|
||||
|
|
|
@ -52,7 +52,7 @@ case "$FLAVOR" in
|
|||
|
||||
ln -s /root/.ccache $SYMLINKED_HOME/.ccache
|
||||
|
||||
cmake -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
cmake -DBOND_STACK_OPTIONS="--allow-different-user" -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
|
||||
make --jobs 2 check
|
||||
;;
|
||||
|
@ -67,7 +67,7 @@ case "$FLAVOR" in
|
|||
nuget restore /root/bond/cs/cs.sln
|
||||
|
||||
BOND_CMAKE_FLAGS="$BOND_CMAKE_FLAGS -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE"
|
||||
cmake -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
cmake -DBOND_STACK_OPTIONS="--allow-different-user" -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
|
||||
make gbc
|
||||
make install
|
||||
|
@ -97,7 +97,7 @@ case "$FLAVOR" in
|
|||
ln -s /root/.ccache $SYMLINKED_HOME/.ccache
|
||||
|
||||
BOND_CMAKE_FLAGS="$BOND_CMAKE_FLAGS -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE"
|
||||
cmake -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
cmake -DBOND_STACK_OPTIONS="--allow-different-user" -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DCMAKE_C_FLAGS="$CC_FLAGS" ${=BOND_CMAKE_FLAGS} /root/bond
|
||||
|
||||
make gbc-tests
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче