Skip to content
Snippets Groups Projects
Commit f9ac23a7 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed build script

parent 0b72a556
No related branches found
No related tags found
No related merge requests found
...@@ -148,29 +148,31 @@ else ...@@ -148,29 +148,31 @@ else
check_file="Makefile" check_file="Makefile"
fi fi
cmake_command="${CMAKE} ${ROOT_DIR} \ cmake_command=(
-G ${generator} \ ${CMAKE} ${ROOT_DIR}
-DCMAKE_BUILD_TYPE=${BUILD} \ -G "${generator}"
-DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DCMAKE_BUILD_TYPE=${BUILD}
-DOFFLINE_BUILD=${OFFLINE_BUILD} \ -DCMAKE_INSTALL_PREFIX=${PREFIX}
-DWITH_MIC=${WITH_MIC} \ -DOFFLINE_BUILD=${OFFLINE_BUILD}
-DWITH_CUDA=${WITH_CUDA} \ -DWITH_MIC=${WITH_MIC}
-DWITH_CUDA_ARCH=${WITH_CUDA_ARCH} \ -DWITH_CUDA=${WITH_CUDA}
-DWITH_OPENMP=${WITH_OPENMP} \ -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH}
-DWITH_GMP=${WITH_GMP} \ -DWITH_OPENMP=${WITH_OPENMP}
-DWITH_TESTS=${WITH_TESTS} \ -DWITH_GMP=${WITH_GMP}
-DWITH_COVERAGE=${WITH_COVERAGE} \ -DWITH_TESTS=${WITH_TESTS}
-DWITH_EXAMPLES=${WITH_EXAMPLES} \ -DWITH_COVERAGE=${WITH_COVERAGE}
-DWITH_TOOLS=${WITH_TOOLS} \ -DWITH_EXAMPLES=${WITH_EXAMPLES}
-DWITH_PYTHON=${WITH_PYTHON} \ -DWITH_TOOLS=${WITH_TOOLS}
-DDCMTK_DIR=${DCMTK_DIR} \ -DWITH_PYTHON=${WITH_PYTHON}
-DWITH_TEMPLATE_INSTANTIATION=${WITH_TEMPLATE_INSTANTIATION} \ -DDCMTK_DIR=${DCMTK_DIR}
-DINSTANTIATE_FLOAT=${INSTANTIATE_FLOAT} \ -DWITH_TEMPLATE_INSTANTIATION=${WITH_TEMPLATE_INSTANTIATION}
-DINSTANTIATE_DOUBLE=${INSTANTIATE_DOUBLE} \ -DINSTANTIATE_FLOAT=${INSTANTIATE_FLOAT}
-DINSTANTIATE_LONG_DOUBLE=${INSTANTIATE_LONG_DOUBLE} \ -DINSTANTIATE_DOUBLE=${INSTANTIATE_DOUBLE}
-DINSTANTIATE_INT=${INSTANTIATE_INT} \ -DINSTANTIATE_LONG_DOUBLE=${INSTANTIATE_LONG_DOUBLE}
-DINSTANTIATE_LONG_INT=${INSTANTIATE_LONG_INT} \ -DINSTANTIATE_INT=${INSTANTIATE_INT}
-DOPTIMIZED_VECTOR_HOST_OPERATIONS=${OPTIMIZED_VECTOR_HOST_OPERATIONS}" -DINSTANTIATE_LONG_INT=${INSTANTIATE_LONG_INT}
-DOPTIMIZED_VECTOR_HOST_OPERATIONS=${OPTIMIZED_VECTOR_HOST_OPERATIONS}
)
# Skip running cmake if it was already run and the cmake command is the same. # Skip running cmake if it was already run and the cmake command is the same.
# The build system (e.g. make) will call it automatically if necessary (e.g. # The build system (e.g. make) will call it automatically if necessary (e.g.
...@@ -180,10 +182,10 @@ if [[ -f ".cmake_command" ]]; then ...@@ -180,10 +182,10 @@ if [[ -f ".cmake_command" ]]; then
else else
last_cmake_command="" last_cmake_command=""
fi fi
if [[ ! -f "$check_file" ]] || [[ "$last_cmake_command" != "$cmake_command" ]]; then if [[ ! -f "$check_file" ]] || [[ "$last_cmake_command" != "${cmake_command[@]}" ]]; then
echo "Configuring ${BUILD} $TARGET ..." echo "Configuring ${BUILD} $TARGET ..."
$cmake_command "${cmake_command[@]}"
echo -n "$cmake_command" > ".cmake_command" echo -n "${cmake_command[@]}" > ".cmake_command"
fi fi
if [[ ${CMAKE_ONLY} == "yes" ]]; then if [[ ${CMAKE_ONLY} == "yes" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment