CMakeLists.txt 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
###
#
# @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.
# @copyright (c) 2012-2014 IPB. All rights reserved.
#
###
#
#  @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 55
    )
    
56
foreach(_prec ${CHAMELEON_PRECISION})
57 58 59 60 61
    set_source_files_properties(runtime.h PROPERTIES COMPILE_FLAGS "-DPRECISION_${_prec}")
endforeach()

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

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

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

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