Skip to content

Commit

Permalink
Fix MSVC build error and update CMake configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Oct 27, 2024
1 parent a942b87 commit b913ec9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Modelica/Resources/BuildProjects/CMake/src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@ set(EXTC_SOURCES
"${MODELICA_SOURCE_DIR}/ModelicaRandom.h"
"${MODELICA_SOURCE_DIR}/ModelicaStrings.c"
"${MODELICA_SOURCE_DIR}/ModelicaStrings.h"
"${MODELICA_SOURCE_DIR}/ModelicaTime.c"
"${MODELICA_SOURCE_DIR}/ModelicaTime.h"
"${MODELICA_SOURCE_DIR}/gconstructor.h"
"${MODELICA_SOURCE_DIR}/repl_str.h"
"${MODELICA_SOURCE_DIR}/stdint_msvc.h"
"${MODELICA_SOURCE_DIR}/stdint_wrap.h"
"${MODELICA_SOURCE_DIR}/strptime.h"
"${MODELICA_SOURCE_DIR}/uthash.h"
"${MODELICA_SOURCE_DIR}/win32_dirent.c"
"${MODELICA_SOURCE_DIR}/win32_dirent.h"
Expand Down
1 change: 1 addition & 0 deletions Modelica/Resources/BuildProjects/CMake/test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if(BUILD_TESTING)
set(MODELICA_TESTS
FileSystem
ModelicaStrings
ModelicaTime
Streams
Tables
TablesFromCsvFile
Expand Down
5 changes: 0 additions & 5 deletions Modelica/Resources/C-Sources/ModelicaTime.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

// TODO: Remove when ModelicaTime.c will become part of ModelicaExternalC
#if defined(DYMOSIM)
#pragma once
#endif

#include "ModelicaTime.h"
#include "ModelicaUtilities.h"
#include "strptime.h"
Expand Down
4 changes: 3 additions & 1 deletion Modelica/Resources/C-Sources/ModelicaTime.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ModelicaTime.h - External functions header for Modelica.Utilities.Time
Copyright (C) 2020, Modelica Association and contributors
Copyright (C) 2020-2024, Modelica Association and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -42,6 +42,8 @@
#ifndef MODELICA_TIME_H_
#define MODELICA_TIME_H_

#include <stdlib.h>

#if !defined(MODELICA_EXPORT)
#if defined(__cplusplus)
#define MODELICA_EXPORT extern "C"
Expand Down

0 comments on commit b913ec9

Please sign in to comment.