forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Extend cmake test with -Wl,--version-script
This tests that CMake link flags marked as PRIVATE are not propagated through the generated Meson dependency. -Wl,--version-script is used as the "poison" here, the build ultimately fails if it appears in the shared_library() link command.
- Loading branch information
1 parent
6165db8
commit 066cf80
Showing
5 changed files
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extern void slib(); | ||
|
||
int main() { | ||
slib(); | ||
return 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
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,14 @@ | ||
#include <iostream> | ||
#include <cmMod.hpp> | ||
#include "config.h" | ||
|
||
#if CONFIG_OPT != 42 | ||
#error "Invalid value of CONFIG_OPT" | ||
#endif | ||
|
||
using namespace std; | ||
|
||
void slib(void) { | ||
cmModClass obj("Hello from lib"); | ||
cout << obj.getStr() << endl; | ||
} |
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,7 @@ | ||
{ | ||
global: | ||
extern "C++" { | ||
cmModClass::*; | ||
}; | ||
local: *; | ||
}; |