author | koda |
Mon, 18 Mar 2013 00:58:13 +0100 | |
branch | cmake_pascal |
changeset 8750 | d9e57426e759 |
child 8752 | 48cf2ccb83c6 |
permissions | -rw-r--r-- |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
1 |
# This file sets the basic flags for the Pascal language in CMake. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
2 |
# It also loads the available platform file for the system-compiler |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
3 |
# if it exists. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
4 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
5 |
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Pascal_COMPILER} NAME_WE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
6 |
SET(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
7 |
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
8 |
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
9 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
10 |
# This should be included before the _INIT variables are |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
11 |
# used to initialize the cache. Since the rule variables |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
12 |
# have if blocks on them, users can still define them here. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
13 |
# But, it should still be after the platform file so changes can |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
14 |
# be made to those values. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
15 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
16 |
IF(CMAKE_USER_MAKE_RULES_OVERRIDE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
17 |
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
18 |
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
19 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
20 |
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Pascal) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
21 |
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Pascal}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
22 |
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Pascal) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
23 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
24 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
25 |
# for most systems a module is the same as a shared library |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
26 |
# so unless the variable CMAKE_MODULE_EXISTS is set just |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
27 |
# copy the values from the LIBRARY variables |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
28 |
IF(NOT CMAKE_MODULE_EXISTS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
29 |
SET(CMAKE_SHARED_MODULE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_Pascal_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
30 |
SET(CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
31 |
ENDIF(NOT CMAKE_MODULE_EXISTS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
32 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
33 |
# Create a set of shared library variable specific to Pascal |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
34 |
# For 90% of the systems, these are the same flags as the C versions |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
35 |
# so if these are not set just copy the flags from the c version |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
36 |
#IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
37 |
# SET(CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
38 |
#ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
39 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
40 |
#IF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
41 |
# SET(CMAKE_SHARED_LIBRARY_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
42 |
#ENDIF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
43 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
44 |
#IF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
45 |
# SET(CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
46 |
#ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
47 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
48 |
#IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
49 |
# SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
50 |
#ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
51 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
52 |
#IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
53 |
# SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
54 |
#ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
55 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
56 |
# repeat for modules |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
57 |
#IF(NOT CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
58 |
# SET(CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
59 |
#ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
60 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
61 |
#IF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
62 |
# SET(CMAKE_SHARED_MODULE_Ada_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
63 |
#ENDIF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
64 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
65 |
#IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
66 |
# SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
67 |
#ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
68 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
69 |
#IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
70 |
# SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
71 |
#ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
72 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
73 |
#IF(NOT CMAKE_INCLUDE_FLAG_Ada) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
74 |
# SET(CMAKE_INCLUDE_FLAG_Ada ${CMAKE_INCLUDE_FLAG_C}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
75 |
#ENDIF(NOT CMAKE_INCLUDE_FLAG_Ada) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
76 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
77 |
#IF(NOT CMAKE_INCLUDE_FLAG_SEP_Ada) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
78 |
# SET(CMAKE_INCLUDE_FLAG_SEP_Ada ${CMAKE_INCLUDE_FLAG_SEP_C}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
79 |
#ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Ada) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
80 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
81 |
# Copy C version of this flag which is normally determined in platform file. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
82 |
IF(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
83 |
SET(CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
84 |
ENDIF(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
85 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
86 |
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
87 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
88 |
SET (CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT}" CACHE STRING |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
89 |
"Flags for Ada compiler.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
90 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
91 |
INCLUDE(CMakeCommonLanguageInclude) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
92 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
93 |
# now define the following rule variables |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
94 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
95 |
# CMAKE_Ada_CREATE_SHARED_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
96 |
# CMAKE_Ada_CREATE_SHARED_MODULE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
97 |
# CMAKE_Ada_CREATE_STATIC_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
98 |
# CMAKE_Ada_COMPILE_OBJECT |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
99 |
# CMAKE_Ada_LINK_EXECUTABLE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
100 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
101 |
# variables supplied by the generator at use time |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
102 |
# <TARGET> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
103 |
# <TARGET_BASE> the target without the suffix |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
104 |
# <OBJECTS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
105 |
# <OBJECT> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
106 |
# <LINK_LIBRARIES> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
107 |
# <FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
108 |
# <LINK_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
109 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
110 |
# Ada compiler information |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
111 |
# <CMAKE_Ada_COMPILER> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
112 |
# <CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
113 |
# <CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
114 |
# <CMAKE_Ada_LINK_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
115 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
116 |
# Static library tools |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
117 |
# <CMAKE_AR> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
118 |
# <CMAKE_RANLIB> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
119 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
120 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
121 |
# create an Ada shared library |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
122 |
IF(NOT CMAKE_Ada_CREATE_SHARED_LIBRARY) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
123 |
SET(CMAKE_Ada_CREATE_SHARED_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
124 |
"<CMAKE_Ada_COMPILER> <CMAKE_SHARED_LIBRARY_Ada_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Ada_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
125 |
) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
126 |
ENDIF(NOT CMAKE_Ada_CREATE_SHARED_LIBRARY) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
127 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
128 |
# create an Ada shared module just copy the shared library rule |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
129 |
IF(NOT CMAKE_Ada_CREATE_SHARED_MODULE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
130 |
SET(CMAKE_Ada_CREATE_SHARED_MODULE ${CMAKE_Ada_CREATE_SHARED_LIBRARY}) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
131 |
ENDIF(NOT CMAKE_Ada_CREATE_SHARED_MODULE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
132 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
133 |
# create an Ada static library |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
134 |
IF(NOT CMAKE_Ada_CREATE_STATIC_LIBRARY) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
135 |
SET(CMAKE_Ada_CREATE_STATIC_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
136 |
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
137 |
"<CMAKE_RANLIB> <TARGET> ") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
138 |
ENDIF(NOT CMAKE_Ada_CREATE_STATIC_LIBRARY) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
139 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
140 |
# compile a Pascal file into an object file |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
141 |
IF(NOT CMAKE_Pascal_COMPILE_OBJECT) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
142 |
SET(CMAKE_Pascal_COMPILE_OBJECT "<CMAKE_Pascal_COMPILER> <FLAGS> <SOURCE> -Cn") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
143 |
#"<CMAKE_Pascal_COMPILER> <FLAGS> <SOURCE> -o<OBJECT> -Cn |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
144 |
ENDIF(NOT CMAKE_Pascal_COMPILE_OBJECT) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
145 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
146 |
# Constraints: GNAT_EXECUTABLE_BUILDER = gnatmake |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
147 |
# is required to do the compile+bind+link of |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
148 |
# Ada executables, and it requires a source file name which is constructed from |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
149 |
# <TARGET>.adb. The source file arguments of add_executable are |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
150 |
# all compiled by the above rule (which must remain that form since it |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
151 |
# is also used to compile objects for Ada libraries), but the results are |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
152 |
# ignored since they are put in a different directory while gnatmake assumes |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
153 |
# objects are located in the _current_ directory. Thus, put in a minimal |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
154 |
# source file (with correct .adb suffix to identify the Ada language) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
155 |
# to reduce this useless compilation to a minimum. Usually, the main Ada |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
156 |
# routine qualifies since it is normally small. Thus, the normal usage is |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
157 |
# add_executable(foo foo.adb), but add_executable(foo path/minimal.adb) would |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
158 |
# work as well so long as both path/minimal.adb existed and foo.adb existed. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
159 |
# Also, note there is no way to specify |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
160 |
# ${CMAKE_CURRENT_SOURCE_DIR}/<TARGET>.adb as the code for gnatmake to compile |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
161 |
# because in this context ${CMAKE_CURRENT_SOURCE_DIR} is set to the top |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
162 |
# of the source tree and not the expected sub-directory of the source tree. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
163 |
# Thus, LINK_FLAGS -aI${CMAKE_CURRENT_SOURCE_DIR} must be set using |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
164 |
# set_target_properties in order to specify the directory where <TARGET>.adb |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
165 |
# exists. Note, LINK_FLAGS can also be used to set other gnatmake flags |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
166 |
# such as -aL. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
167 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
168 |
# In sum, you have to be careful of your target name, the nominal source file |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
169 |
# name has to be compilable, but otherwise it is ignored, and you must specify |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
170 |
# the required -aI and other GNAT_EXECUTABLE_BUILDER = gnatmake options |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
171 |
# using LINK_FLAGS specified with set_target_properties. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
172 |
# However, so long as you pay attention to these |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
173 |
# constraints, add_executable should work for the Ada language. |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
174 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
175 |
IF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
176 |
#GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
177 |
set(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_BINARY_DIR}/ppas.sh") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
178 |
# SET(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_Pascal_COMPILER} <CMAKE_Ada_LINK_FLAGS> <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> -largs <LINK_LIBRARIES>") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
179 |
ENDIF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
180 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
181 |
IF(CMAKE_Ada_STANDARD_LIBRARIES_INIT) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
182 |
SET(CMAKE_Ada_STANDARD_LIBRARIES "${CMAKE_Ada_STANDARD_LIBRARIES_INIT}" |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
183 |
CACHE STRING "Libraries linked by default with all Ada applications.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
184 |
MARK_AS_ADVANCED(CMAKE_Ada_STANDARD_LIBRARIES) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
185 |
ENDIF(CMAKE_Ada_STANDARD_LIBRARIES_INIT) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
186 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
187 |
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
188 |
SET (CMAKE_Ada_FLAGS_DEBUG "${CMAKE_Ada_FLAGS_DEBUG_INIT}" CACHE STRING |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
189 |
"Flags used by the compiler during debug builds.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
190 |
SET (CMAKE_Ada_FLAGS_MINSIZEREL "${CMAKE_Ada_FLAGS_MINSIZEREL_INIT}" CACHE STRING |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
191 |
"Flags used by the compiler during release minsize builds.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
192 |
SET (CMAKE_Ada_FLAGS_RELEASE "${CMAKE_Ada_FLAGS_RELEASE_INIT}" CACHE STRING |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
193 |
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
194 |
SET (CMAKE_Ada_FLAGS_RELWITHDEBINFO "${CMAKE_Ada_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
195 |
"Flags used by the compiler during Release with Debug Info builds.") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
196 |
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
197 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
198 |
MARK_AS_ADVANCED( |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
199 |
CMAKE_Pascal_FLAGS |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
200 |
CMAKE_Pascal_FLAGS_DEBUG |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
201 |
CMAKE_Pascal_FLAGS_MINSIZEREL |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
202 |
CMAKE_Pascal_FLAGS_RELEASE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
203 |
CMAKE_Pascal_FLAGS_RELWITHDEBINFO |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
204 |
) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
205 |
SET(CMAKE_Pascal_INFORMATION_LOADED 1) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
206 |