Skip to content

Commit

Permalink
Cleanup. Remove references to TLM and LibXml (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahge committed Aug 7, 2023
1 parent 2973d7c commit 539071d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 50 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ ELSE ()
ENDIF ()
STRING(REGEX REPLACE "v(.*)-(.*)" "\\1" OMS_SHORT_VERSION_STRING "${OMS_VERSION_STRING}")

message("OMSimulator version string: ${OMS_VERSION_STRING}")
message(STATUS "OMSimulator version string: ${OMS_VERSION_STRING}")

IF(WIN32 AND MSVC)
IF(MSVC)
set(PLATFORM_STRING "win")
ELSEIF(WIN32 AND MINGW)
ELSEIF(MINGW)
set(PLATFORM_STRING "mingw")
ELSEIF(APPLE)
set(PLATFORM_STRING "mac")
Expand Down
47 changes: 1 addition & 46 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ CP=cp -rf
MKDIR=mkdir -p
ROOT_DIR=$(shell pwd)

# Option to build LIBXML2 as part of the 3rdParty projects
LIBXML2 ?= $(OMTLM)
# Option to enable OMTLM
OMTLM ?= OFF
# Option to enable AddressSanitizer
ASAN ?= OFF
# Statically link dependencies as much as possible
Expand All @@ -24,15 +20,12 @@ ifeq ($(detected_OS),Darwin)
BUILD_DIR := build/mac
INSTALL_DIR := install/mac
CMAKE_TARGET=-DCMAKE_SYSTEM_NAME=$(detected_OS)
LIBXML2 := OFF
OMTLM := OFF
FEXT=.dylib
CMAKE_FPIC=-DCMAKE_C_FLAGS="-fPIC"
else ifeq (MINGW32,$(findstring MINGW32,$(detected_OS)))
BUILD_DIR := build/mingw
INSTALL_DIR := install/mingw
CMAKE_TARGET=-G "MSYS Makefiles"
LIBXML2 := OFF
FEXT=.dll
EEXT=.exe
ifeq (clang,$(findstring clang,$(CC)))
Expand All @@ -42,7 +35,6 @@ else ifeq (MINGW,$(findstring MINGW,$(detected_OS)))
BUILD_DIR := build/mingw
INSTALL_DIR := install/mingw
CMAKE_TARGET=-G "MSYS Makefiles"
LIBXML2 := OFF
FEXT=.dll
EEXT=.exe
ifeq (clang,$(findstring clang,$(CC)))
Expand Down Expand Up @@ -87,8 +79,6 @@ ifeq ($(detected_OS),Darwin)
endif

ifneq ($(CROSS_TRIPLE),)
OMTLM := OFF
LIBXML2 := OFF
CROSS_TRIPLE_DASH = $(CROSS_TRIPLE)-
HOST_CROSS_TRIPLE = "--host=$(CROSS_TRIPLE)"
AR ?= $(CROSS_TRIPLE)-ar
Expand All @@ -102,15 +92,12 @@ ifneq ($(CROSS_TRIPLE),)
DISABLE_RUN_OMSIMULATOR_VERSION ?= 1
endif

.PHONY: OMSimulator OMSimulatorCore config-OMSimulator config-xerces config-3rdParty distclean testsuite doc doc-html doc-doxygen OMTLMSimulator OMTLMSimulatorClean pip
.PHONY: OMSimulator OMSimulatorCore config-OMSimulator config-xerces config-3rdParty distclean testsuite doc doc-html doc-doxygen pip

OMSimulator:
@echo OS: $(detected_OS)
@echo TLM: $(OMTLM)
@echo LIBXML2: $(LIBXML2)
@echo "# make OMSimulator"
@echo
@$(MAKE) CC="$(CC)" CXX="$(CXX)" OMTLMSimulator
@$(MAKE) OMSimulatorCore
test ! -z "$(DISABLE_RUN_OMSIMULATOR_VERSION)" || $(TOP_INSTALL_DIR)/bin/OMSimulator --version

Expand All @@ -132,37 +119,6 @@ pip:
@echo "# Run the following command to upload the package"
@echo "> twine upload src/pip/install/dist/$(shell ls src/pip/install/dist/ -Art | tail -n 1)"

ifeq ($(OMTLM),ON)
OMTLMSimulator:
@echo
@echo "# make OMTLMSimulator"
@echo
$(MAKE) -C OMTLMSimulator omtlmlib
test ! `uname` != Darwin || $(MAKE) -C OMTLMSimulator/FMIWrapper install
@$(MKDIR) $(TOP_INSTALL_DIR)/lib/$(HOST_SHORT_OMC)
@$(MKDIR) $(TOP_INSTALL_DIR)/bin
test ! "$(FEXT)" != ".dll" || cp OMTLMSimulator/bin/libomtlmsimulator$(FEXT) $(TOP_INSTALL_DIR)/lib/$(HOST_SHORT_OMC)
test ! "$(detected_OS)" = Darwin || ($(CROSS_TRIPLE_DASH)install_name_tool -id "@rpath/libomtlmsimulator$(FEXT)" $(TOP_INSTALL_DIR)/lib/$(HOST_SHORT_OMC)/libomtlmsimulator$(FEXT))
test ! "$(FEXT)" = ".dll" || cp OMTLMSimulator/bin/libomtlmsimulator$(FEXT) $(TOP_INSTALL_DIR)/bin/
test ! `uname` != Darwin || cp OMTLMSimulator/bin/FMIWrapper $(TOP_INSTALL_DIR)/bin/
test ! `uname` != Darwin || cp OMTLMSimulator/bin/StartTLMFmiWrapper $(TOP_INSTALL_DIR)/bin/

OMTLMSimulatorStandalone:
@echo
@echo "# make OMTLMSimulator Standalone"
@echo
@$(MAKE) -C OMTLMSimulator install
else
OMTLMSimulator:
OMTLMSimulatorStandalone:
endif

OMTLMSimulatorClean:
@echo
@echo "# clean OMTLMSimulator"
@echo
@$(MAKE) -C OMTLMSimulator clean

3rdParty/README.md:
@echo "Please checkout the 3rdParty submodule, e.g. using \"git submodule update --init 3rdParty\", and try again."
@false
Expand Down Expand Up @@ -191,7 +147,6 @@ distclean:
@echo
@echo "# make distclean"
@echo
@$(MAKE) OMTLMSimulatorClean
$(RM) $(BUILD_DIR)
$(RM) $(INSTALL_DIR)
$(RM) 3rdParty/xerces/$(BUILD_DIR)
Expand Down
2 changes: 1 addition & 1 deletion configWinVS.bat
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ EXIT /B 0
ECHO # config OMSimulator
IF EXIST "build\win\" RMDIR /S /Q build\win
MKDIR build\win
cmake.exe -S . -B build\win -G %OMS_VS_VERSION% -DCMAKE_INSTALL_PREFIX=install\win -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DOMTLM=OFF -DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE%
cmake.exe -S . -B build\win -G %OMS_VS_VERSION% -DCMAKE_INSTALL_PREFIX=install\win -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE%
IF NOT ["%ERRORLEVEL%"]==["0"] GOTO fail
CD ..\..
EXIT /B 0
Expand Down

0 comments on commit 539071d

Please sign in to comment.