Last active
January 20, 2022 13:38
-
-
Save sharanry/bb7a5eed6451bbe441b9b8076b8eacc2 to your computer and use it in GitHub Desktop.
Patch to make FMUComplianceChecker v2.0.4 build work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index b2534c9..c6f349e 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -29,14 +29,14 @@ if(MSVC) | |
endif() | |
set(FMUCHK_FMI_PLATFORM_DOC "FMI platform defines the subdirectory within FMU where binary is located") | |
-set(FMUCHK_FMI_PLATFORM �unknown� CACHE STRING ${FMUCHK_FMI_PLATFORM_DOC}) | |
+set(FMUCHK_FMI_PLATFORM �unknown� CACHE STRING ${FMUCHK_FMI_PLATFORM_DOC}) | |
IF(NOT CMAKE_BUILD_TYPE) | |
SET(CMAKE_BUILD_TYPE "Release") | |
message(STATUS "Setting build type to ${CMAKE_BUILD_TYPE}") | |
ENDIF() | |
-if(FMUCHK_FMI_PLATFORM MATCHES �unknown�) | |
+if(FMUCHK_FMI_PLATFORM MATCHES �unknown�) | |
if(CMAKE_HOST_WIN32) #Set to true when the host system is Windows and on cygwin. | |
set(FMI_PLATFORM win) | |
elseif(CMAKE_HOST_APPLE) #Set to true when the host system is Apple OSX. | |
@@ -134,15 +134,15 @@ if(MSVC) | |
) | |
endif() | |
-ExternalProject_Add( | |
- fmil | |
- SVN_REPOSITORY "https://svn.jmodelica.org/FMILibrary/tags/2.0.3" | |
- PREFIX "${FMUCHK_BUILD}/FMIL" | |
- SOURCE_DIR "${FMUCHK_FMIL_HOME_DIR}" | |
- CMAKE_CACHE_ARGS ${FMIL_SETTINGS} | |
- BINARY_DIR ${FMUCHK_BUILD}/FMIL/build | |
- INSTALL_DIR ${FMUCHK_BUILD}/FMIL/install | |
-) | |
+# ExternalProject_Add( | |
+# fmil | |
+# SVN_REPOSITORY "https://svn.jmodelica.org/FMILibrary/tags/2.0.3" | |
+# PREFIX "${FMUCHK_BUILD}/FMIL" | |
+# SOURCE_DIR "${FMUCHK_FMIL_HOME_DIR}" | |
+# CMAKE_CACHE_ARGS ${FMIL_SETTINGS} | |
+# BINARY_DIR ${FMUCHK_BUILD}/FMIL/build | |
+# INSTALL_DIR ${FMUCHK_BUILD}/FMIL/install | |
+# ) | |
ExternalProject_Add_Step( | |
fmil fmil_reconfigure | |
@@ -168,20 +168,15 @@ set_target_properties( | |
add_dependencies(fmilib fmil) | |
# Detect the version | |
-include(${FMUCHK_HOME}/GetVersion.cmake) | |
-getVersionSVN("${FMUCHK_HOME}" FMUCHK_VERSION) | |
-message(STATUS "Checker version: ${FMUCHK_VERSION}") | |
-getVersionSVN("${FMUCHK_HOME}/FMIL" FMIL_VERSION) | |
-message(STATUS "FMIL version: ${FMIL_VERSION}") | |
file(WRITE ${CMAKE_BINARY_DIR}/VERSION-FMUChecker.txt | |
-"FMI checker version:${FMUCHK_VERSION} | |
-FMI library version:${FMIL_VERSION} | |
+"FMI checker version:2.0.4 | |
+FMI library version:2.0.3 | |
") | |
file(WRITE ${CMAKE_BINARY_DIR}/fmu_checker_version.h | |
" | |
/* Version information generated based on SVN info */ | |
-#define FMUCHK_VERSION \"${FMUCHK_VERSION}\" | |
-#define FMIL_VERSION \"${FMIL_VERSION}\" | |
+#define FMUCHK_VERSION \"2.0.4\" | |
+#define FMIL_VERSION \"2.0.3\" | |
") | |
# Now create the checker executable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment