Commit 02a28fb9 authored by PRUVOST Florent's avatar PRUVOST Florent

add definitions in the pkg-config file

parent 3b3e6922
......@@ -1074,13 +1074,14 @@ if(CHAMELEON_ENABLE_DOCS)
endif()
#------------------------------------------------------------------------------
get_directory_property( CHAMELEON_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
###############################################################################
# Config files (pkg_config) #
#############################
# Create file morse_starpu.pc
# ---------------------------
# Create .pc file
# ---------------
generate_pkgconfig_file()
#------------------------------------------------------------------------------
......@@ -1106,7 +1107,6 @@ include(CPack)
###############################################################################
# Print Options #
#################
get_directory_property( CHAMELEON_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
include(PrintOpts)
if (CMAKE_INSTALL_PREFIX STREQUAL "/usr/local" OR CMAKE_INSTALL_PREFIX STREQUAL "C:/Program Files")
......
......@@ -80,6 +80,26 @@ ENDMACRO(CLEAN_LIB_LIST)
###
MACRO(GENERATE_PKGCONFIG_FILE)
# The definitions
string(REGEX REPLACE ";" " -D" CHAMELEON_PKGCONFIG_DEFINITIONS "${CHAMELEON_DEFINITIONS_LIST}")
string(REGEX REPLACE ";" " -D" COREBLAS_PKGCONFIG_DEFINITIONS "${COREBLAS_DEFINITIONS_LIST}")
string(REGEX REPLACE ";" " -D" CUDABLAS_PKGCONFIG_DEFINITIONS "${CUDABLAS_DEFINITIONS_LIST}")
if (CHAMELEON_PKGCONFIG_DEFINITIONS)
set(CHAMELEON_PKGCONFIG_DEFINITIONS "-D${CHAMELEON_PKGCONFIG_DEFINITIONS}")
else()
set(CHAMELEON_PKGCONFIG_DEFINITIONS "")
endif()
if (COREBLAS_PKGCONFIG_DEFINITIONS)
set(COREBLAS_PKGCONFIG_DEFINITIONS "-D${COREBLAS_PKGCONFIG_DEFINITIONS}")
else()
set(COREBLAS_PKGCONFIG_DEFINITIONS "")
endif()
if (CUDABLAS_PKGCONFIG_DEFINITIONS)
set(CUDABLAS_PKGCONFIG_DEFINITIONS "-D${CUDABLAS_PKGCONFIG_DEFINITIONS}")
else()
set(CUDABLAS_PKGCONFIG_DEFINITIONS "")
endif()
# The link flags specific to this package and any required libraries
# that don't support PkgConfig
set(CHAMELEON_PKGCONFIG_LIBS "-lchameleon")
......
......@@ -32,6 +32,8 @@ if (NOT CHAMELEON_SIMULATION)
add_subdirectory(eztrace_module)
endif()
get_directory_property( COREBLAS_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
###
### END CMakeLists.txt
###
......@@ -32,6 +32,8 @@ if (NOT CHAMELEON_SIMULATION)
add_subdirectory(eztrace_module)
endif()
get_directory_property( CUDABLAS_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
###
### END CMakeLists.txt
###
......@@ -6,7 +6,7 @@ includedir=${exec_prefix}/include/chameleon
Name: chameleon
Description: Dense Linear Algebra for Scalable Multi-core Architectures and GPGPUs
Version: @CHAMELEON_VERSION_MAJOR@.@CHAMELEON_VERSION_MINOR@.@CHAMELEON_VERSION_MICRO@
Cflags: -I${includedir} -I${includedir}/coreblas/include
Cflags: @CHAMELEON_PKGCONFIG_DEFINITIONS@ -I${includedir} -I${includedir}/coreblas/include
Libs: -L${libdir} @CHAMELEON_PKGCONFIG_LIBS@
Libs.private: @CHAMELEON_PKGCONFIG_LIBS_PRIVATE@
Requires: @CHAMELEON_PKGCONFIG_REQUIRED@
......
......@@ -6,7 +6,7 @@ includedir=${exec_prefix}/include/chameleon/coreblas/include
Name: coreblas
Description: Interface to CBLAS/LAPACKE routines + some other auxiliary routines
Version: @CHAMELEON_VERSION_MAJOR@.@CHAMELEON_VERSION_MINOR@.@CHAMELEON_VERSION_MICRO@
Cflags: -I${includedir}
Cflags: @COREBLAS_PKGCONFIG_DEFINITIONS@ -I${includedir}
Libs: -L${libdir} @COREBLAS_PKGCONFIG_LIBS@
Libs.private: @COREBLAS_PKGCONFIG_LIBS_PRIVATE@
Requires: @COREBLAS_PKGCONFIG_REQUIRED@
......
......@@ -6,7 +6,7 @@ includedir=${exec_prefix}/include/chameleon/cudablas/include
Name: cudablas
Description: Interface to cuBLAS/MAGMA routines + some other auxiliary routines
Version: @CHAMELEON_VERSION_MAJOR@.@CHAMELEON_VERSION_MINOR@.@CHAMELEON_VERSION_MICRO@
Cflags: -I${includedir}
Cflags: @CUDABLAS_PKGCONFIG_DEFINITIONS@ -I${includedir}
Libs: -L${libdir} @CUDABLAS_PKGCONFIG_LIBS@
Libs.private: @CUDABLAS_PKGCONFIG_LIBS_PRIVATE@
Requires: @CUDABLAS_PKGCONFIG_REQUIRED@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment