-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstalled_CMakeLists.txt
32 lines (25 loc) · 1.34 KB
/
installed_CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Top-level CMakeLists.txt for the installed version of a simple project consisting of an
# installed "Hello, world" library and an executable to be built to test CMake language support
# for Ada.
# MAINTENANCE
# Use same minimum version for all platforms as the Linux platform minimum adopted for
# the PLplot project.
cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
# Before the project command must specify the location where
# the test_ada project looks for CMake Ada language support files.
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
# Add C to list of languages enabled to work around some issues with
# CMake language support for Ada. CMake uses compiler introspection
# to determine some system information such as the principal library
# location for the system, and that part of Ada language support is
# not implemented. Also, I have discovered one other issue (probably
# related to compiler introspection) when C is not enabled which is
# that the POSITION_INDEPENDENT_CODE ON target property for the Ada
# library disappears if cmake is rerun.
project(installed_test_ada C Ada)
# Define key variables that are configured by the core build.
include(test_ada_configure)
# Find installed project
find_package(test_ada)
# Build Ada executable that links to the "hello" Ada library that is installed by test_ada
add_subdirectory(ada)