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


# Generate the morse headers for all possible precisions
# ------------------------------------------------------
32
set(CHAMELEON_HDRS_GENERATED "")
33 34 35 36 37 38 39
set(ZHDR
    morse_z.h
    morse_zc.h
    runtime_z.h
    runtime_zc.h
)

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

# Define the list of headers
# --------------------------
45
set(CHAMELEON_HDRS
46 47 48 49 50 51 52
    morse_constants.h
    morse_kernels.h
    morse_simulate.h
    morse_struct.h
    morse_types.h
    morse.h
    runtime.h
53
    ${CHAMELEON_HDRS_GENERATED}
54
    )
PRUVOST Florent's avatar
PRUVOST Florent committed
55

56
set(flags_to_add "")
57
foreach(_prec ${CHAMELEON_PRECISION})
58
    set(flags_to_add "${flags_to_add} -DPRECISION_${_prec}")
59
endforeach()
60
set_source_files_properties(runtime.h PROPERTIES COMPILE_FLAGS "${flags_to_add}")
61 62 63

# Force generation of headers
# ---------------------------
64
add_custom_target(chameleon_include ALL SOURCES ${CHAMELEON_HDRS})
65 66 67 68 69 70 71 72 73 74

set(HDR_INSTALL
    morse_constants.h
    morse_kernels.h
    morse_simulate.h
    morse_struct.h
    morse_types.h
    morse.h
    runtime.h
    )
75
foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
76 77 78 79 80 81 82 83 84 85 86
    list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()

# installation
# ------------
install(FILES ${HDR_INSTALL}
        DESTINATION include)

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