CMakeBorlandWindowsSystemConfig.cmake 4.02 KB
Newer Older
1
2
# borland specific configure file
# NOTE: all entries in here MUST be CACHE values, regular SET will NOT WORK!
3
4
5
6
7
8
9

FIND_PATH(BCB_BIN_PATH bcc32.exe
  "C:/Program Files/Borland/CBuilder5/Bin"
  "C:/Borland/Bcc55/Bin"
  "/Borland/Bcc55/Bin"
  [HKEY_LOCAL_MACHINE/SOFTWARE/Borland/C++Builder/5.0/RootDir]/Bin
)
10

11
12
13
14
15
16
SET (CMAKE_BUILD_TOOL borlandmake CACHE INTERNAL 
     "What is the target build tool cmake is generating for.")

SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL 
     "What system is this.  Result of uname.")

17
SET (BORLAND 1 CACHE INTERNAL "This is the borland generator")
18

19
20
SET (CMAKE_C_COMPILER ${BCB_BIN_PATH}/bcc32  CACHE FILEPATH
     "Name of C compiler used.")
21

22
SET (CMAKE_C_FLAGS "-w- -whid -waus -tWM" CACHE STRING
23
     "Flags for C compiler.")
24

25
SET (CMAKE_BUILD_TYPE Debug CACHE STRING 
26
27
28
29
30
     "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")

SET (CMAKE_CXX_COMPILER  "${BCB_BIN_PATH}/bcc32" CACHE FILEPATH
     "Name of C++ compiler used.")

31
SET (CMAKE_CXX_FLAGS_RELEASE "-O2" CACHE STRING
32
33
     "Flags used by the compiler during release builds.")

34
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Od" CACHE STRING
35
36
     "Flags used by the compiler during Release with Debug Info builds.")

37
SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O1" CACHE STRING
38
39
     "Flags used by the compiler during release minsize builds.")

Bill Hoffman's avatar
Bill Hoffman committed
40
SET (CMAKE_CXX_FLAGS_DEBUG "-Od -v" CACHE STRING
41
42
     "Flags used by the compiler during debug builds.")

43
SET (CMAKE_LINKER_FLAGS "-tWM" CACHE STRING
Bill Hoffman's avatar
Bill Hoffman committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
     "Flags used by the linker.")

SET (CMAKE_LINKER_FLAGS_DEBUG "-v" CACHE STRING
     "Flags used by the linker during debug builds.")

SET (CMAKE_LINKER_FLAGS_MINSIZEREL "" CACHE STRING
     "Flags used by the linker during release minsize builds.")

SET (CMAKE_LINKER_FLAGS_RELEASE "" CACHE STRING
     "Flags used by the linker during release builds.")

SET (CMAKE_LINKER_FLAGS_RELWITHDEBINFO "-v" CACHE STRING
     "Flags used by the linker during Release with Debug Info builds.")

58
SET (CMAKE_CXX_FLAGS "-w- -whid -waus -wpar -tWM" CACHE STRING
Bill Hoffman's avatar
Bill Hoffman committed
59
     "Flags used to compile c++ files.")
60
61
62

SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL 
     "Use the win32 thread library.")
63

64
65
SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "import32.lib" CACHE STRING 
     "Libraries linked by defalut with all applications.")
66

67
68
SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING 
     "Shared library suffix.")
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING 
     "Module library suffix.")
SET (CMAKE_OBJECT_FILE_SUFFIX ".obj" CACHE STRING 
     "Object file suffix.")

SET (CMAKE_EXECUTABLE_SUFFIX ".exe" CACHE STRING 
     "Executable suffix.")

SET (CMAKE_STATICLIB_SUFFIX ".lib" CACHE STRING 
     "Static library suffix.")

SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING 
     "Shared library suffix.")

84
85
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING 
     "Module library suffix.")
86

87
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make NAMES bmake ${BCB_BIN_PATH})
88

Andy Cedilnik's avatar
Andy Cedilnik committed
89
90
91
92
93
94
95
96
97
# We will hardcode them for now. Make sure to fix that in the future
SET (CMAKE_SIZEOF_INT       4   CACHE INTERNAL "Size of int data type")
SET (CMAKE_SIZEOF_LONG      4   CACHE INTERNAL "Size of long data type")
SET (CMAKE_SIZEOF_VOID_P    4   CACHE INTERNAL "Size of void* data type")
SET (CMAKE_SIZEOF_CHAR      1   CACHE INTERNAL "Size of char data type")
SET (CMAKE_SIZEOF_SHORT     2   CACHE INTERNAL "Size of short data type")
SET (CMAKE_SIZEOF_FLOAT     4   CACHE INTERNAL "Size of float data type")
SET (CMAKE_SIZEOF_DOUBLE    8   CACHE INTERNAL "Size of double data type")

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
MARK_AS_ADVANCED(
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_DEBUG
CMAKE_LINKER_FLAGS
CMAKE_LINKER_FLAGS_MINSIZEREL
CMAKE_LINKER_FLAGS_RELEASE
CMAKE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_USE_WIN32_THREADS
CMAKE_STANDARD_WINDOWS_LIBRARIES
CMAKE_SHLIB_SUFFIX
CMAKE_MODULE_SUFFIX
CMAKE_OBJECT_FILE_SUFFIX
CMAKE_EXECUTABLE_SUFFIX
CMAKE_STATICLIB_SUFFIX
CMAKE_SHLIB_SUFFIX
CMAKE_MODULE_SUFFIX
CMAKE_LINKER_FLAGS
CMAKE_LINKER_FLAGS_DEBUG
CMAKE_LINKER_FLAGS_MINSIZEREL
CMAKE_LINKER_FLAGS_RELEASE
CMAKE_LINKER_FLAGS_RELWITHDEBINFO
)

MARK_AS_ADVANCED( CLEAR
TCL_LIBRARY
TK_LIBRARY)