6 SET(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE |
6 SET(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE |
7 ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) |
7 ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) |
8 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) |
8 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) |
9 |
9 |
10 # This should be included before the _INIT variables are |
10 # This should be included before the _INIT variables are |
11 # used to initialize the cache. Since the rule variables |
11 # used to initialize the cache. Since the rule variables |
12 # have if blocks on them, users can still define them here. |
12 # have if blocks on them, users can still define them here. |
13 # But, it should still be after the platform file so changes can |
13 # But, it should still be after the platform file so changes can |
14 # be made to those values. |
14 # be made to those values. |
15 |
15 |
16 IF(CMAKE_USER_MAKE_RULES_OVERRIDE) |
16 IF(CMAKE_USER_MAKE_RULES_OVERRIDE) |
44 #IF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
44 #IF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
45 # SET(CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) |
45 # SET(CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) |
46 #ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
46 #ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Ada_FLAGS) |
47 |
47 |
48 #IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
48 #IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
49 # SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) |
49 # SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) |
50 #ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
50 #ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG) |
51 |
51 |
52 #IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
52 #IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
53 # SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) |
53 # SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) |
54 #ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
54 #ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP) |
61 #IF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
61 #IF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
62 # SET(CMAKE_SHARED_MODULE_Ada_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) |
62 # SET(CMAKE_SHARED_MODULE_Ada_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) |
63 #ENDIF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
63 #ENDIF(NOT CMAKE_SHARED_MODULE_Ada_FLAGS) |
64 |
64 |
65 #IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
65 #IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
66 # SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) |
66 # SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) |
67 #ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
67 #ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG) |
68 |
68 |
69 #IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
69 #IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
70 # SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) |
70 # SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) |
71 #ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
71 #ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP) |
84 ENDIF(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) |
84 ENDIF(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) |
85 |
85 |
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.") |
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.") |
87 |
87 |
88 SET (CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT}" CACHE STRING |
88 SET (CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT}" CACHE STRING |
89 "Flags for Ada compiler.") |
89 "Flags for Pascal compiler.") |
90 |
90 |
91 INCLUDE(CMakeCommonLanguageInclude) |
91 INCLUDE(CMakeCommonLanguageInclude) |
92 |
92 |
93 # now define the following rule variables |
93 # now define the following rule variables |
94 |
94 |
106 # <LINK_LIBRARIES> |
106 # <LINK_LIBRARIES> |
107 # <FLAGS> |
107 # <FLAGS> |
108 # <LINK_FLAGS> |
108 # <LINK_FLAGS> |
109 |
109 |
110 # Ada compiler information |
110 # Ada compiler information |
111 # <CMAKE_Ada_COMPILER> |
111 # <CMAKE_Ada_COMPILER> |
112 # <CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS> |
112 # <CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS> |
113 # <CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS> |
113 # <CMAKE_SHARED_MODULE_CREATE_Ada_FLAGS> |
114 # <CMAKE_Ada_LINK_FLAGS> |
114 # <CMAKE_Ada_LINK_FLAGS> |
115 |
115 |
116 # Static library tools |
116 # Static library tools |
117 # <CMAKE_AR> |
117 # <CMAKE_AR> |
118 # <CMAKE_RANLIB> |
118 # <CMAKE_RANLIB> |
119 |
119 |
120 |
120 |
121 # create an Ada shared library |
121 # create an Ada shared library |
122 IF(NOT CMAKE_Ada_CREATE_SHARED_LIBRARY) |
122 IF(NOT CMAKE_Ada_CREATE_SHARED_LIBRARY) |
154 # source file (with correct .adb suffix to identify the Ada language) |
154 # source file (with correct .adb suffix to identify the Ada language) |
155 # to reduce this useless compilation to a minimum. Usually, the main Ada |
155 # to reduce this useless compilation to a minimum. Usually, the main Ada |
156 # routine qualifies since it is normally small. Thus, the normal usage is |
156 # routine qualifies since it is normally small. Thus, the normal usage is |
157 # add_executable(foo foo.adb), but add_executable(foo path/minimal.adb) would |
157 # add_executable(foo foo.adb), but add_executable(foo path/minimal.adb) would |
158 # work as well so long as both path/minimal.adb existed and foo.adb existed. |
158 # work as well so long as both path/minimal.adb existed and foo.adb existed. |
159 # Also, note there is no way to specify |
159 # Also, note there is no way to specify |
160 # ${CMAKE_CURRENT_SOURCE_DIR}/<TARGET>.adb as the code for gnatmake to compile |
160 # ${CMAKE_CURRENT_SOURCE_DIR}/<TARGET>.adb as the code for gnatmake to compile |
161 # because in this context ${CMAKE_CURRENT_SOURCE_DIR} is set to the top |
161 # because in this context ${CMAKE_CURRENT_SOURCE_DIR} is set to the top |
162 # of the source tree and not the expected sub-directory of the source tree. |
162 # of the source tree and not the expected sub-directory of the source tree. |
163 # Thus, LINK_FLAGS -aI${CMAKE_CURRENT_SOURCE_DIR} must be set using |
163 # Thus, LINK_FLAGS -aI${CMAKE_CURRENT_SOURCE_DIR} must be set using |
164 # set_target_properties in order to specify the directory where <TARGET>.adb |
164 # set_target_properties in order to specify the directory where <TARGET>.adb |
166 # such as -aL. |
166 # such as -aL. |
167 |
167 |
168 # In sum, you have to be careful of your target name, the nominal source file |
168 # In sum, you have to be careful of your target name, the nominal source file |
169 # name has to be compilable, but otherwise it is ignored, and you must specify |
169 # name has to be compilable, but otherwise it is ignored, and you must specify |
170 # the required -aI and other GNAT_EXECUTABLE_BUILDER = gnatmake options |
170 # the required -aI and other GNAT_EXECUTABLE_BUILDER = gnatmake options |
171 # using LINK_FLAGS specified with set_target_properties. |
171 # using LINK_FLAGS specified with set_target_properties. |
172 # However, so long as you pay attention to these |
172 # However, so long as you pay attention to these |
173 # constraints, add_executable should work for the Ada language. |
173 # constraints, add_executable should work for the Ada language. |
174 |
174 |
175 IF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
175 IF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
176 #GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
176 #GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
177 set(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_BINARY_DIR}/ppas.sh") |
177 message("look here ${CMAKE_CURRENT_BINARY_DIR}") |
|
178 set(CMAKE_Pascal_LINK_EXECUTABLE "${EXECUTABLE_OUTPUT_PATH}/ppas.sh") |
178 # SET(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_Pascal_COMPILER} <CMAKE_Ada_LINK_FLAGS> <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> -largs <LINK_LIBRARIES>") |
179 # SET(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_Pascal_COMPILER} <CMAKE_Ada_LINK_FLAGS> <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> -largs <LINK_LIBRARIES>") |
179 ENDIF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
180 ENDIF(NOT CMAKE_Pascal_LINK_EXECUTABLE) |
180 |
181 |
181 IF(CMAKE_Ada_STANDARD_LIBRARIES_INIT) |
182 IF(CMAKE_Ada_STANDARD_LIBRARIES_INIT) |
182 SET(CMAKE_Ada_STANDARD_LIBRARIES "${CMAKE_Ada_STANDARD_LIBRARIES_INIT}" |
183 SET(CMAKE_Ada_STANDARD_LIBRARIES "${CMAKE_Ada_STANDARD_LIBRARIES_INIT}" |