author | koda |
Tue, 19 Mar 2013 01:28:25 +0100 | |
branch | cmake_pascal |
changeset 8770 | 53481d654691 |
parent 8758 | cb3b470f1000 |
child 8778 | 04363016580f |
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 |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
11 |
# used to initialize the cache. Since the rule variables |
8750
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) |
8770
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
37 |
#-dynamiclib -Wl,-headerpad_max_install_names for C |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
38 |
# 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
|
39 |
#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
|
40 |
|
8770
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
41 |
IF(NOT CMAKE_SHARED_LIBRARY_Pascal_FLAGS) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
42 |
#another similarity, fpc: -fPIC Same as -Cg |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
43 |
SET(CMAKE_SHARED_LIBRARY_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
44 |
ENDIF(NOT CMAKE_SHARED_LIBRARY_Pascal_FLAGS) |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
45 |
|
8770
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
46 |
IF(NOT CMAKE_SHARED_LIBRARY_LINK_Pascal_FLAGS) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
47 |
SET(CMAKE_SHARED_LIBRARY_LINK_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
48 |
ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Pascal_FLAGS) |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
49 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
50 |
#IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
51 |
# SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
52 |
#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
|
53 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
54 |
#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
|
55 |
# 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
|
56 |
#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
|
57 |
|
8770
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
58 |
if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
59 |
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
60 |
endif(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
61 |
|
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
62 |
# for most systems a module is the same as a shared library |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
63 |
# so unless the variable CMAKE_MODULE_EXISTS is set just |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
64 |
# copy the values from the LIBRARY variables |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
65 |
if(NOT CMAKE_MODULE_EXISTS) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
66 |
set(CMAKE_SHARED_MODULE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_Pascal_FLAGS}) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
67 |
set(CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS}) |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
68 |
endif() |
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
69 |
|
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
70 |
# repeat for modules |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
71 |
#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
|
72 |
# 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
|
73 |
#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
|
74 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
75 |
#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
|
76 |
# 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
|
77 |
#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
|
78 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
79 |
#IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
80 |
# SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
81 |
#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
|
82 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
83 |
#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
|
84 |
# 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
|
85 |
#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
|
86 |
|
8756 | 87 |
IF(NOT CMAKE_INCLUDE_FLAG_Pascal) |
88 |
#amazing, fpc: -I<x> Add <x> to include path |
|
89 |
SET(CMAKE_INCLUDE_FLAG_Pascal ${CMAKE_INCLUDE_FLAG_C}) |
|
90 |
ENDIF(NOT CMAKE_INCLUDE_FLAG_Pascal) |
|
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
91 |
|
8758
cb3b470f1000
better support for cmake directory and fpc output paths
koda
parents:
8756
diff
changeset
|
92 |
IF(NOT CMAKE_INCLUDE_FLAG_SEP_Pascal) |
cb3b470f1000
better support for cmake directory and fpc output paths
koda
parents:
8756
diff
changeset
|
93 |
SET(CMAKE_INCLUDE_FLAG_SEP_Pascal ${CMAKE_INCLUDE_FLAG_SEP_C}) |
cb3b470f1000
better support for cmake directory and fpc output paths
koda
parents:
8756
diff
changeset
|
94 |
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Pascal) |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
95 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
96 |
# 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
|
97 |
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
|
98 |
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
|
99 |
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
|
100 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
101 |
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
|
102 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
103 |
SET (CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT}" CACHE STRING |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
104 |
"Flags for Pascal compiler.") |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
105 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
106 |
INCLUDE(CMakeCommonLanguageInclude) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
107 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
108 |
# 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
|
109 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
110 |
# CMAKE_Ada_CREATE_SHARED_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
111 |
# CMAKE_Ada_CREATE_SHARED_MODULE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
112 |
# CMAKE_Ada_CREATE_STATIC_LIBRARY |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
113 |
# CMAKE_Ada_COMPILE_OBJECT |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
114 |
# CMAKE_Ada_LINK_EXECUTABLE |
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 |
# 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
|
117 |
# <TARGET> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
118 |
# <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
|
119 |
# <OBJECTS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
120 |
# <OBJECT> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
121 |
# <LINK_LIBRARIES> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
122 |
# <FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
123 |
# <LINK_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
124 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
125 |
# Ada compiler information |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
126 |
# <CMAKE_Ada_COMPILER> |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
127 |
# <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
|
128 |
# <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
|
129 |
# <CMAKE_Ada_LINK_FLAGS> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
130 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
131 |
# Static library tools |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
132 |
# <CMAKE_AR> |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
133 |
# <CMAKE_RANLIB> |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
134 |
|
8756 | 135 |
if (NOT EXECUTABLE_OUTPUT_PATH) |
136 |
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) |
|
137 |
endif (NOT EXECUTABLE_OUTPUT_PATH) |
|
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
138 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
139 |
# create an Ada shared library |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
140 |
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
|
141 |
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
|
142 |
"<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
|
143 |
) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
144 |
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
|
145 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
146 |
# 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
|
147 |
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
|
148 |
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
|
149 |
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
|
150 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
151 |
# create an Ada static library |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
152 |
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
|
153 |
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
|
154 |
"<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
|
155 |
"<CMAKE_RANLIB> <TARGET> ") |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
156 |
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
|
157 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
158 |
# 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
|
159 |
IF(NOT CMAKE_Pascal_COMPILE_OBJECT) |
8756 | 160 |
SET(CMAKE_Pascal_COMPILE_OBJECT |
8758
cb3b470f1000
better support for cmake directory and fpc output paths
koda
parents:
8756
diff
changeset
|
161 |
"<CMAKE_Pascal_COMPILER> -Cn -FE${EXECUTABLE_OUTPUT_PATH} -FU${CMAKE_CURRENT_BINARY_DIR}/<OBJECT_DIR> -Fi${CMAKE_CURRENT_BINARY_DIR} <FLAGS> <SOURCE>") |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
162 |
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
|
163 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
164 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
165 |
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
|
166 |
#GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
8752
48cf2ccb83c6
with lot of hackery, use add_executable on pascal files, SUCCSS
koda
parents:
8750
diff
changeset
|
167 |
set(CMAKE_Pascal_LINK_EXECUTABLE "${EXECUTABLE_OUTPUT_PATH}/ppas.sh") |
8770
53481d654691
partial conversion of pascal_flags to CMAKE_Pascal_FLAGS
koda
parents:
8758
diff
changeset
|
168 |
# SET(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_Pascal_COMPILER} <CMAKE_Pascal_LINK_FLAGS> <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> -largs <LINK_LIBRARIES>") |
8750
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
169 |
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
|
170 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
171 |
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
|
172 |
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
|
173 |
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
|
174 |
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
|
175 |
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
|
176 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
177 |
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
|
178 |
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
|
179 |
"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
|
180 |
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
|
181 |
"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
|
182 |
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
|
183 |
"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
|
184 |
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
|
185 |
"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
|
186 |
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
|
187 |
|
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
188 |
MARK_AS_ADVANCED( |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
189 |
CMAKE_Pascal_FLAGS |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
190 |
CMAKE_Pascal_FLAGS_DEBUG |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
191 |
CMAKE_Pascal_FLAGS_MINSIZEREL |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
192 |
CMAKE_Pascal_FLAGS_RELEASE |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
193 |
CMAKE_Pascal_FLAGS_RELWITHDEBINFO |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
194 |
) |
d9e57426e759
barebone cmake config file to support pascal files, based off plplot's ada files
koda
parents:
diff
changeset
|
195 |
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
|
196 |