File: CMakeLists.txt

package info (click to toggle)
ecbuild 3.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,068 kB
  • sloc: sh: 1,404; perl: 732; f90: 472; cpp: 466; python: 383; ansic: 304; fortran: 43; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 652 bytes parent folder | download
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
cmake_minimum_required( VERSION 3.18 FATAL_ERROR )

find_package( ecbuild REQUIRED )
project( foo VERSION 1.0.0 LANGUAGES C CXX )

### targets

ecbuild_add_library(TARGET            foo
                    SOURCES           foo.h foo.c
                    INSTALL_HEADERS   LISTED
                    PUBLIC_INCLUDES
                        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> )

ecbuild_add_executable(
    TARGET      master_foo
    SOURCES     main.cc
    LIBS        foo )

ecbuild_add_test(
    TARGET      test_foo
    SOURCES     test.cc
    LIBS        foo )

ecbuild_install_project( NAME ${PROJECT_NAME} )

ecbuild_print_summary()