Skip to content
Snippets Groups Projects
Commit ba7b3681 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Added command line argument --with-cxx-flags to build script.

parent 27cb1cfa
No related branches found
No related tags found
1 merge request!48Segments
......@@ -82,7 +82,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )
# set default build options
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WITH_CXX_FLAGS} -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
# pass -rdynamic only in Debug mode
......
......@@ -62,6 +62,7 @@ do
--with-tools=* ) WITH_TOOLS="${option#*=}" ;;
--with-benchmarks=* ) WITH_BENCHMARKS="${option#*=}" ;;
--with-python=* ) WITH_PYTHON="${option#*=}" ;;
--with-cxx-flags=* ) WITH_CXX_FLAGS="${option#*=}" ;;
* )
echo "Unknown option ${option}. Use --help for more information."
exit 1 ;;
......@@ -91,6 +92,7 @@ if [[ ${HELP} == "yes" ]]; then
echo " --with-tools=yes/no Compile the 'src/Tools' directory. 'yes' by default."
echo " --with-python=yes/no Compile the Python bindings. 'yes' by default."
echo " --with-benchmarks=yes/no Compile the 'src/Benchmarks' directory. 'yes' by default."
echo " --with-cxx-flags=FLAGS Additional flags for C++ compiler."
echo " --cmake=CMAKE Path to cmake. 'cmake' by default."
echo " --verbose It enables verbose build."
echo " --root-dir=PATH Path to the TNL source code root dir."
......@@ -142,6 +144,7 @@ cmake_command=(
-DWITH_TOOLS=${WITH_TOOLS}
-DWITH_PYTHON=${WITH_PYTHON}
-DWITH_BENCHMARKS=${WITH_BENCHMARKS}
-DWITH_CXX_FLAGS=${WITH_CXX_FLAGS}
-DDCMTK_DIR=${DCMTK_DIR}
)
......
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