Skip to content

Commit

Permalink
- build type (release, debug or relwithdebinfo) of the c++ simulation…
Browse files Browse the repository at this point in the history
… runtime can now be switched with the help of configure (--with-cppruntime-args=BUILD_TYPE=Release)
  • Loading branch information
Marcus Walther committed Aug 27, 2015
1 parent fcbfeb5 commit a96b59a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Makefile.in
Expand Up @@ -21,7 +21,7 @@ PARALLEL_OUTPUT_COMMAND="@PARALLEL_OUTPUT_COMMAND@"
#use this call to use precompiled headers
#BUILDTYPE = Release
#use this call if you want to debug the cpp runtime
BUILDTYPE = Debug
BUILDTYPE = @CMAKE_BUILDTYPE@

CMAKE_COMMANDS=@CMAKE_COMMANDS@
CMAKE_ARGS=$(patsubst CMAKE_%, -D%, $(filter CMAKE_%, $(MAKEFLAGS)))
Expand Down
7 changes: 7 additions & 0 deletions SimulationRuntime/cpp/configure.ac
Expand Up @@ -26,6 +26,7 @@ FMU_KINSOL="no"
PARALLEL_OUTPUT="no"
LOGGER="yes"
CMAKE_COMMANDS="CC=\"${CC}\" CXX=\"${CXX}\" CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\""
CMAKE_BUILDTYPE="Debug"

AC_SUBST(BOOST_STATIC_LINKING_COMMAND)
AC_SUBST(BOOST_REALPATHS_COMMAND)
Expand All @@ -36,6 +37,7 @@ AC_SUBST(FMU_KINSOL_COMMAND)
AC_SUBST(PARALLEL_OUTPUT_COMMAND)
AC_SUBST(LOGGER_COMMAND)
AC_SUBST(CMAKE_COMMANDS)
AC_SUBST(CMAKE_BUILDTYPE)

evaluateParameter() {
case $1 in
Expand All @@ -48,6 +50,8 @@ evaluateParameter() {
FMU_KINSOL) FMU_KINSOL="yes" ;;
PARALLEL_OUTPUT) PARALLEL_OUTPUT="yes" ;;
DISABLE_LOGGER) LOGGER="no" ;;
BUILD_TYPE=?*) CMAKE_BUILDTYPE=`echo $1| cut -d'=' -f 2` ;;
BUILD_TYPE=) ;;
*) echo "Unknown Parameter given $1" ;;
esac
}
Expand Down Expand Up @@ -140,4 +144,7 @@ else
AC_MSG_RESULT([no])
fi

AC_ARG_WITH(build-type, [ --with-build-type=[Release|Debug|RelWithDebInfo] (set the cmake build type)],[CMAKE_BUILDTYPE="$withval"],[])
AC_MSG_RESULT([Build type is set to $CMAKE_BUILDTYPE])

AC_OUTPUT(Makefile)

0 comments on commit a96b59a

Please sign in to comment.