Skip to content

Commit 73c4823

Browse files
author
Marcus Walther
committed
- added the possibility to pass CMake-Parameters through the makefile.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
1 parent a4ba919 commit 73c4823

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile.common

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ omc-and-runtimeCPPinstall: mkbuilddirs
160160
runtimeCPP: libraries/msl-external-libs CMinpack
161161
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)"
162162

163+
CMAKE_ARGS=$(filter CMAKE_%, $(MAKEFLAGS))
164+
165+
163166
runtimeCPPinstall: libraries/msl-external-libs CMinpack
164-
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)"
167+
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)" $(CMAKE_ARGS)
165168
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppCVode.dylib build/lib/omc/cpp/libOMCppCVode.dylib
166169
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppDataExchange.dylib build/lib/omc/cpp/libOMCppDataExchange.dylib
167170
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppEuler.dylib build/lib/omc/cpp/libOMCppEuler.dylib

SimulationRuntime/cpp/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PARALLEL_OUTPUT_COMMAND="-DUSE_PARALLEL_OUTPUT=ON"
1414
RUNTIME_PROFILING_COMMAND="-DRUNTIME_PROFILING=ON"
1515
SCOREP_COMMAND="-DUSE_SCOREP=ON"
1616
CMAKE_COMMANDS=CC="scorep --user --nocompiler --thread=pthread gcc" CXX="scorep --user --nocompiler --thread=pthread g++"
17+
CMAKE_ARGS=$(patsubst CMAKE_%, -D%, $(filter CMAKE_%, $(MAKEFLAGS)))
1718

1819
runtimeCpp: clean
1920
ifneq ("$(RUNTIME_STATIC_LINKING)","true")
@@ -34,7 +35,7 @@ ifneq ("$(USE_SCOREP)","true") #If ScoreP ist used, the analyzation mode is auto
3435
else
3536
$(eval RUNTIME_STATIC_LINKING_COMMAND="-DRUNTIME_STATIC_LINKING=ON")
3637
endif
37-
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)" ../
38+
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) ../
3839
$(MAKE) -C Build
3940

4041
install: runtimeCpp

0 commit comments

Comments
 (0)