-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
55 lines (49 loc) · 1.92 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.5)
project(FMI30TestFMUs)
# Set a default build type if none was specified
set(default_build_type "Release")
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
set(default_build_type "Debug")
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
set(PUBLIC_LOGGING OFF CACHE BOOL "Enable logging via FMI logger")
set(PRIVATE_LOGGING OFF CACHE BOOL "Enable private logging to file")
if(WIN32)
set(PRIVATE_LOG_DIRECTORY "C:/TEMP/" CACHE PATH "Directory to write private log file to")
else()
set(PRIVATE_LOG_DIRECTORY "/tmp/" CACHE PATH "Directory to write private log file to")
endif()
set(VERBOSE_FMI_LOGGING OFF CACHE BOOL "Enable detailed FMI function logging")
set(FMU_FMI_VERSION "3.0" CACHE STRING "FMI Standard Version Number")
set(FMU_VERSION "1.0" CACHE STRING "FMU Version Number (informative only)")
set(FMU_AUTHOR "PMSF" CACHE STRING "FMU Author Information")
if(WIN32)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(FMI_BINARIES_PLATFORM "x86_64-windows")
else()
set(FMI_BINARIES_PLATFORM "i686-windows")
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(FMI_BINARIES_PLATFORM "x86_64-linux")
else()
set(FMI_BINARIES_PLATFORM "i686-linux")
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(FMI_BINARIES_PLATFORM "x86_64-darwin")
else()
set(FMI_BINARIES_PLATFORM "i686-darwin")
endif()
endif()
include_directories( fmi-standard/headers )
add_subdirectory( SimpleVariableTest )
add_subdirectory( SimpleArrayTest )
add_subdirectory( DynamicArrayTest )