Skip to content

Commit

Permalink
- added the possibility to pass CMake-Parameters through the makefile…
Browse files Browse the repository at this point in the history
….common to the cpp runtime cmake (e.g. 'make runtimeCPPinstall CMAKE_SUNDIALS_ROOT=$HOME/local')

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24522 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Feb 11, 2015
1 parent a4ba919 commit 73c4823
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile.common
Expand Up @@ -160,8 +160,11 @@ omc-and-runtimeCPPinstall: mkbuilddirs
runtimeCPP: libraries/msl-external-libs CMinpack
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)"

CMAKE_ARGS=$(filter CMAKE_%, $(MAKEFLAGS))


runtimeCPPinstall: libraries/msl-external-libs CMinpack
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)"
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)" $(CMAKE_ARGS)
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppCVode.dylib build/lib/omc/cpp/libOMCppCVode.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppDataExchange.dylib build/lib/omc/cpp/libOMCppDataExchange.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppEuler.dylib build/lib/omc/cpp/libOMCppEuler.dylib
Expand Down
3 changes: 2 additions & 1 deletion SimulationRuntime/cpp/Makefile
Expand Up @@ -14,6 +14,7 @@ PARALLEL_OUTPUT_COMMAND="-DUSE_PARALLEL_OUTPUT=ON"
RUNTIME_PROFILING_COMMAND="-DRUNTIME_PROFILING=ON"
SCOREP_COMMAND="-DUSE_SCOREP=ON"
CMAKE_COMMANDS=CC="scorep --user --nocompiler --thread=pthread gcc" CXX="scorep --user --nocompiler --thread=pthread g++"
CMAKE_ARGS=$(patsubst CMAKE_%, -D%, $(filter CMAKE_%, $(MAKEFLAGS)))

runtimeCpp: clean
ifneq ("$(RUNTIME_STATIC_LINKING)","true")
Expand All @@ -34,7 +35,7 @@ ifneq ("$(USE_SCOREP)","true") #If ScoreP ist used, the analyzation mode is auto
else
$(eval RUNTIME_STATIC_LINKING_COMMAND="-DRUNTIME_STATIC_LINKING=ON")
endif
cd ./Build && echo "change to Build" && $(CMAKE_COMMANDS) cmake $(RUNTIME_STATIC_LINKING_COMMAND) $(BOOST_STATIC_LINKING_COMMAND) $(PARALLEL_OUTPUT_COMMAND) $(RUNTIME_PROFILING_COMMAND) $(SCOREP_COMMAND) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH="$(builddir_build)" ../
cd ./Build && echo "change to Build" && $(CMAKE_COMMANDS) cmake $(RUNTIME_STATIC_LINKING_COMMAND) $(BOOST_STATIC_LINKING_COMMAND) $(PARALLEL_OUTPUT_COMMAND) $(RUNTIME_PROFILING_COMMAND) $(SCOREP_COMMAND) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH="$(builddir_build)" $(CMAKE_ARGS) ../
$(MAKE) -C Build

install: runtimeCpp
Expand Down

0 comments on commit 73c4823

Please sign in to comment.