diff --git a/CMakeLists.txt b/CMakeLists.txt index c055b07acb248fa5d1a000583dd0b5472e246327..139ba4e7952a85aec022a3f00854395603c24f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1074,13 +1074,12 @@ if(CHAMELEON_ENABLE_DOCS) endif() #------------------------------------------------------------------------------ - ############################################################################### # Config files (pkg_config) # ############################# -# Create file morse_starpu.pc -# --------------------------- +# Create .pc file +# --------------- generate_pkgconfig_file() #------------------------------------------------------------------------------ @@ -1106,7 +1105,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") diff --git a/cmake_modules/GenPkgConfig.cmake b/cmake_modules/GenPkgConfig.cmake index 44b431e1454cbe86285dce51eed25c7b950b3c0b..e10b77ea1786de4725cb8549ee7c70d78794a19a 100644 --- a/cmake_modules/GenPkgConfig.cmake +++ b/cmake_modules/GenPkgConfig.cmake @@ -80,6 +80,11 @@ ENDMACRO(CLEAN_LIB_LIST) ### MACRO(GENERATE_PKGCONFIG_FILE) + # The definitions that should be given to users (change the API) + set(CHAMELEON_PKGCONFIG_DEFINITIONS "") + set(COREBLAS_PKGCONFIG_DEFINITIONS "") + set(CUDABLAS_PKGCONFIG_DEFINITIONS "") + # The link flags specific to this package and any required libraries # that don't support PkgConfig set(CHAMELEON_PKGCONFIG_LIBS "-lchameleon") diff --git a/cmake_modules/PrintOpts.cmake b/cmake_modules/PrintOpts.cmake index f21bce9af93d87884c32e816234189d28dbda16b..10a7d80a2e49815ff970301016e5d50eba56fecd 100644 --- a/cmake_modules/PrintOpts.cmake +++ b/cmake_modules/PrintOpts.cmake @@ -68,10 +68,6 @@ foreach (_dep ${CHAMELEON_DEP}) set(dep_message "${dep_message}" " ${_dep}\n") endforeach () -string(REGEX REPLACE ";" " " CHAMELEON_DEFINITIONS_LIST "${CHAMELEON_DEFINITIONS_LIST}") -set(dep_message "${dep_message}" -"\n" -" Definitions: ${CHAMELEON_DEFINITIONS_LIST}\n") set(dep_message "${dep_message}" "\n" " INSTALL_PREFIX ......: ${CMAKE_INSTALL_PREFIX}\n\n") diff --git a/lib/pkgconfig/chameleon.pc.in b/lib/pkgconfig/chameleon.pc.in index 1a70c174e34e4b02f715cbe85722a5490cb3d475..028e3d907b9dd26401d65f584826615262400a5d 100644 --- a/lib/pkgconfig/chameleon.pc.in +++ b/lib/pkgconfig/chameleon.pc.in @@ -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@ diff --git a/lib/pkgconfig/coreblas.pc.in b/lib/pkgconfig/coreblas.pc.in index 4897a519fe8c692cbe675c8b0934f1343c930ab3..26b1dbb179450f0f04e77d7e15bf441584bab3d6 100644 --- a/lib/pkgconfig/coreblas.pc.in +++ b/lib/pkgconfig/coreblas.pc.in @@ -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@ diff --git a/lib/pkgconfig/cudablas.pc.in b/lib/pkgconfig/cudablas.pc.in index 367cf152075ae3542501bbe58dd85a4d49b75af9..db3f0f14c51c65d3ab245d2cc5371f412646311d 100644 --- a/lib/pkgconfig/cudablas.pc.in +++ b/lib/pkgconfig/cudablas.pc.in @@ -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@