CMakeLists.txt 2.18 KB
Newer Older
1 2
###
#
3 4
# @file CMakeLists.txt
#
Mathieu Faverge's avatar
Mathieu Faverge committed
5 6
# @copyright 2009-2014 The University of Tennessee and The University of
#                      Tennessee Research Foundation. All rights reserved.
PRUVOST Florent's avatar
PRUVOST Florent committed
7
# @copyright 2012-2019 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8
#                      Univ. Bordeaux. All rights reserved.
9 10 11
#
###
#
Mathieu Faverge's avatar
Mathieu Faverge committed
12 13
#  @project CHAMELEON
#  CHAMELEON is a software package provided by:
14 15 16 17 18 19
#     Inria Bordeaux - Sud-Ouest,
#     Univ. of Tennessee,
#     King Abdullah Univesity of Science and Technology
#     Univ. of California Berkeley,
#     Univ. of Colorado Denver.
#
PRUVOST Florent's avatar
PRUVOST Florent committed
20
# @version 0.9.2
21 22 23
#  @author Cedric Castagnede
#  @author Emmanuel Agullo
#  @author Mathieu Faverge
PRUVOST Florent's avatar
PRUVOST Florent committed
24
#  @author Florent Pruvost
PRUVOST Florent's avatar
PRUVOST Florent committed
25
#  @date 2014-11-16
26 27 28
#
###

Mathieu Faverge's avatar
Mathieu Faverge committed
29 30
# Generate the chameleon headers for all possible precisions
# ----------------------------------------------------------
31
set(CHAMELEON_HDRS_GENERATED "")
32
set(ZHDR
Mathieu Faverge's avatar
Mathieu Faverge committed
33 34
    chameleon/chameleon_z.h
    chameleon/chameleon_zc.h
Mathieu Faverge's avatar
Mathieu Faverge committed
35 36
    chameleon/tasks_z.h
    chameleon/tasks_zc.h
37 38
)

39
precisions_rules_py(CHAMELEON_HDRS_GENERATED "${ZHDR}"
40 41
  TARGETDIR  "chameleon"
  PRECISIONS "z;c;d;s;zc;ds" )
42

Mathieu Faverge's avatar
Mathieu Faverge committed
43 44
configure_file("chameleon/config.h.in"
               "chameleon/config.h"
45 46
               @ONLY)

47 48
# Define the list of headers
# --------------------------
49
set(CHAMELEON_HDRS
Mathieu Faverge's avatar
Mathieu Faverge committed
50 51 52
  ${CMAKE_CURRENT_BINARY_DIR}/chameleon/config.h
  ${CMAKE_CURRENT_BINARY_DIR}/chameleon/mangling.h
  chameleon/constants.h
53 54
  chameleon/runtime.h
  chameleon/runtime_struct.h
Mathieu Faverge's avatar
Mathieu Faverge committed
55 56 57
  chameleon/simulate.h
  chameleon/struct.h
  chameleon/tasks.h
58 59
  chameleon/timer.h
  chameleon/types.h
Mathieu Faverge's avatar
Mathieu Faverge committed
60
  chameleon/types.h
Mathieu Faverge's avatar
Mathieu Faverge committed
61
  )
PRUVOST Florent's avatar
PRUVOST Florent committed
62

Mathieu Faverge's avatar
Mathieu Faverge committed
63 64 65 66 67
# Add generated headers
# ---------------------
foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
  list(APPEND CHAMELEON_HDRS ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
68 69 70

# Force generation of headers
# ---------------------------
71
add_custom_target(chameleon_include
Mathieu Faverge's avatar
Mathieu Faverge committed
72
  ALL SOURCES chameleon.h ${CHAMELEON_HDRS} )
73
set(CHAMELEON_SOURCES_TARGETS "${CHAMELEON_SOURCES_TARGETS};chameleon_include" CACHE INTERNAL "List of targets of sources")
74

Mathieu Faverge's avatar
Mathieu Faverge committed
75
# Installation
76
# ------------
Mathieu Faverge's avatar
Mathieu Faverge committed
77
install( FILES chameleon.h
78 79 80 81
         DESTINATION include )

install( FILES ${CHAMELEON_HDRS}
         DESTINATION include/chameleon )
82 83 84 85

###
### END CMakeLists.txt
###