1 # borland specific configure file
2 # NOTE: all entries in here MUST be CACHE values, regular SET will NOT WORK!
4 FIND_PATH(BCB_BIN_PATH bcc32.exe
5 "C:/Program Files/Borland/CBuilder5/Bin"
8 [HKEY_LOCAL_MACHINE/SOFTWARE/Borland/C++Builder/5.0/RootDir]/Bin
11 SET (CMAKE_BUILD_TOOL borlandmake CACHE INTERNAL
12 "What is the target build tool cmake is generating for.")
14 SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL
15 "What system is this. Result of uname.")
17 SET (BORLAND 1 CACHE INTERNAL "This is the borland generator")
19 SET (CMAKE_C_COMPILER ${BCB_BIN_PATH}/bcc32 CACHE FILEPATH
20 "Name of C compiler used.")
22 SET (CMAKE_C_FLAGS "-w- -whid -waus -tWM" CACHE STRING
23 "Flags for C compiler.")
25 SET (CMAKE_BUILD_TYPE Debug CACHE STRING
26 "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
28 SET (CMAKE_CXX_COMPILER "${BCB_BIN_PATH}/bcc32" CACHE FILEPATH
29 "Name of C++ compiler used.")
31 SET (CMAKE_CXX_FLAGS_RELEASE "-O2" CACHE STRING
32 "Flags used by the compiler during release builds.")
34 SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Od" CACHE STRING
35 "Flags used by the compiler during Release with Debug Info builds.")
37 SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O1" CACHE STRING
38 "Flags used by the compiler during release minsize builds.")
40 SET (CMAKE_CXX_FLAGS_DEBUG "-Od -v" CACHE STRING
41 "Flags used by the compiler during debug builds.")
43 SET (CMAKE_LINKER_FLAGS "-tWM" CACHE STRING
44 "Flags used by the linker.")
46 SET (CMAKE_LINKER_FLAGS_DEBUG "-v" CACHE STRING
47 "Flags used by the linker during debug builds.")
49 SET (CMAKE_LINKER_FLAGS_MINSIZEREL "" CACHE STRING
50 "Flags used by the linker during release minsize builds.")
52 SET (CMAKE_LINKER_FLAGS_RELEASE "" CACHE STRING
53 "Flags used by the linker during release builds.")
55 SET (CMAKE_LINKER_FLAGS_RELWITHDEBINFO "-v" CACHE STRING
56 "Flags used by the linker during Release with Debug Info builds.")
58 SET (CMAKE_CXX_FLAGS "-w- -whid -waus -wpar -tWM" CACHE STRING
59 "Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib.")
61 SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
62 "Use the win32 thread library.")
64 SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "import32.lib" CACHE STRING
65 "Libraries linked by defalut with all applications.")
67 SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING
68 "Shared library suffix.")
70 SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
71 "Module library suffix.")
72 SET (CMAKE_OBJECT_FILE_SUFFIX ".obj" CACHE STRING
73 "Object file suffix.")
75 SET (CMAKE_EXECUTABLE_SUFFIX ".exe" CACHE STRING
78 SET (CMAKE_STATICLIB_SUFFIX ".lib" CACHE STRING
79 "Static library suffix.")
81 SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING
82 "Shared library suffix.")
84 SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
85 "Module library suffix.")
87 FIND_PROGRAM(CMAKE_MAKE_PROGRAM make ${BCB_BIN_PATH})
89 # We will hardcode them for now. Make sure to fix that in the future
90 SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
91 SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
92 SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
93 SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
94 SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
95 SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
96 SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
99 CMAKE_CXX_FLAGS_RELEASE
100 CMAKE_CXX_FLAGS_RELWITHDEBINFO
101 CMAKE_CXX_FLAGS_MINSIZEREL
102 CMAKE_CXX_FLAGS_DEBUG
104 CMAKE_LINKER_FLAGS_MINSIZEREL
105 CMAKE_LINKER_FLAGS_RELEASE
106 CMAKE_LINKER_FLAGS_RELWITHDEBINFO
107 CMAKE_USE_WIN32_THREADS
108 CMAKE_STANDARD_WINDOWS_LIBRARIES
111 CMAKE_OBJECT_FILE_SUFFIX
112 CMAKE_EXECUTABLE_SUFFIX
113 CMAKE_STATICLIB_SUFFIX
117 CMAKE_LINKER_FLAGS_DEBUG
118 CMAKE_LINKER_FLAGS_MINSIZEREL
119 CMAKE_LINKER_FLAGS_RELEASE
120 CMAKE_LINKER_FLAGS_RELWITHDEBINFO
123 MARK_AS_ADVANCED( CLEAR