-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* hotfix/3.8.5: Version 3.8.5 Add policy to detect invalid indices Allow passing PUBLIC_DEFINITIONS to ecbuild_add_library for INTERFACE libraries
- Loading branch information
Showing
10 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.8.4 | ||
3.8.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build_test_interface_library | ||
install_test_interface_library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
ecbuild_add_test( | ||
TARGET test_ecbuild_interface_library | ||
TYPE SCRIPT | ||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-and-run.sh | ||
ENVIRONMENT CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
HERE=${CMAKE_CURRENT_BINARY_DIR:-"$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd -P )"} | ||
SOURCE=${CMAKE_CURRENT_SOURCE_DIR:-$HERE} | ||
|
||
# Add ecbuild to path | ||
export PATH=$SOURCE/../../bin:$PATH | ||
echo $PATH | ||
echo $SOURCE | ||
|
||
run_test() { | ||
|
||
local tname=$1 | ||
local exp_sts=$2 | ||
shift 2 | ||
|
||
local bdir=$HERE/build_$tname | ||
local idir=$HERE/install_$tname | ||
local logf=$HERE/$tname.log | ||
|
||
mkdir -p $bdir && cd $bdir | ||
local sts=0 | ||
echo "Running test '$tname'" | ||
ecbuild --prefix=$idir -- -Wno-deprecated $* $SOURCE/test_project >$logf 2>&1 || sts=$? | ||
|
||
make install | ||
|
||
if [[ $sts -ne $exp_sts ]] ; then | ||
echo "Test '$tname': expected exit code $exp_sts, got $sts" | ||
cat $logf | ||
exit 1 | ||
fi | ||
} | ||
|
||
# --------------------- cleanup ------------------------ | ||
$SOURCE/clean.sh | ||
|
||
# ---------------------- tests ------------------------- | ||
run_test test_interface_library 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
HERE=${CMAKE_CURRENT_BINARY_DIR:-"$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd -P )"} | ||
|
||
# --------------------- cleanup ------------------------ | ||
echo "cleaning $HERE" | ||
rm -rf $HERE/build_* $HERE/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.17 FATAL_ERROR) | ||
|
||
find_package( ecbuild REQUIRED ) | ||
project( test_interface_library VERSION 0.1.0 LANGUAGES C ) | ||
|
||
ecbuild_add_library( TARGET intfb_lib TYPE INTERFACE | ||
PUBLIC_INCLUDES | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$ENV{HOME} | ||
PUBLIC_LIBS some_lib | ||
PUBLIC_DEFINITIONS MYDEF=1 | ||
) | ||
ecbuild_install_project( NAME test_interface_library ) |