Skip to content

Commit

Permalink
Merge branch 'hotfix/3.8.1'
Browse files Browse the repository at this point in the history
* hotfix/3.8.1:
  Version 3.8.1
  Disable ecbuild_pkgconfig via ENABLE_PKGCONFIG=OFF
  Add missing use of ECBUILD_IMPLICIT_LINK_LIBRARIES to ecbuild_add_test
  • Loading branch information
wdeconinck committed Oct 2, 2023
2 parents 9234f40 + 487729d commit b6c74f6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.0
3.8.1
2 changes: 1 addition & 1 deletion cmake/ecbuild_add_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function( ecbuild_add_library_impl )
endif()
endif()

if( NOT _PAR_TYPE MATCHES "OBJECT" AND ECBUILD_IMPLICIT_LINK_LIBRARIES )
if( NOT _PAR_TYPE MATCHES "OBJECT" AND NOT _PAR_TYPE MATCHES "INTERFACE" AND ECBUILD_IMPLICIT_LINK_LIBRARIES )
target_link_libraries( ${_PAR_TARGET} PRIVATE ${ECBUILD_IMPLICIT_LINK_LIBRARIES} )
endif()

Expand Down
14 changes: 14 additions & 0 deletions cmake/ecbuild_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,20 @@ function( ecbuild_add_test )
ecbuild_debug("ecbuild_add_test(${_PAR_TARGET}): adding definitions ${_PAR_DEFINITIONS}")
endif()

# set linker language
if( DEFINED _PAR_LINKER_LANGUAGE )
ecbuild_debug("ecbuild_add_test(${_PAR_TARGET}): using linker language ${_PAR_LINKER_LANGUAGE}")
set_target_properties( ${_PAR_TARGET} PROPERTIES LINKER_LANGUAGE ${_PAR_LINKER_LANGUAGE} )
if( ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES )
target_link_libraries( ${_PAR_TARGET} ${ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES} )
endif()
endif()

if( ECBUILD_IMPLICIT_LINK_LIBRARIES )
target_link_libraries( ${_PAR_TARGET} ${ECBUILD_IMPLICIT_LINK_LIBRARIES} )
endif()


# set build location to local build dir
# not the project base as defined for libs and execs
set_target_properties( ${_PAR_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${_TEST_DIR} )
Expand Down
4 changes: 4 additions & 0 deletions cmake/ecbuild_declare_project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,8 @@ endif()

include( ecbuild_setup_test_framework ) # setup test framework

ecbuild_add_option( FEATURE PKGCONFIG
DEFAULT ON
DESCRIPTION "Enable ecbuild_pkgconfig" )

endmacro( ecbuild_declare_project )
4 changes: 2 additions & 2 deletions cmake/ecbuild_pkgconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ endfunction(ecbuild_pkgconfig_include)
##############################################################################

function( ecbuild_pkgconfig )

if(HAVE_PKGCONFIG)
set( options REQUIRES NO_PRIVATE_INCLUDE_DIRS )
set( single_value_args FILENAME NAME TEMPLATE URL DESCRIPTION )
set( multi_value_args LIBRARIES IGNORE_INCLUDE_DIRS IGNORE_LIBRARIES VARIABLES LANGUAGES )
Expand Down Expand Up @@ -503,5 +503,5 @@ function( ecbuild_pkgconfig )
install( FILES ${PKGCONFIG_DIR}/${_PAR_FILENAME} DESTINATION ${INSTALL_LIB_DIR}/pkgconfig )

ecbuild_info( "pkg-config file to be created during build: ${_PAR_FILENAME}" )

endif()
endfunction(ecbuild_pkgconfig)

0 comments on commit b6c74f6

Please sign in to comment.