Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
0e06788c
Commit
0e06788c
authored
Oct 30, 2013
by
Stephen Kelly
Committed by
Brad King
Nov 02, 2013
Browse files
CMP0022: Add test for target_link_libraries plain signature
parent
c0f4a610
Changes
6
Hide whitespace changes
Inline
Side-by-side
Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
View file @
0e06788c
...
...
@@ -28,3 +28,10 @@ endif()
add_executable
(
staticlib_exe staticlib_exe.cpp
)
target_link_libraries
(
staticlib_exe staticlib1
)
add_library
(
onlyplainlib1 SHARED onlyplainlib1.cpp
)
add_library
(
onlyplainlib2 SHARED onlyplainlib2.cpp
)
target_link_libraries
(
onlyplainlib2 onlyplainlib1
)
add_executable
(
onlyplainlib_user onlyplainlib_user.cpp
)
target_link_libraries
(
onlyplainlib_user onlyplainlib2
)
Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
0 → 100644
View file @
0e06788c
#include
"onlyplainlib1.h"
OnlyPlainLib1
::
OnlyPlainLib1
()
:
result
(
0
)
{
}
int
OnlyPlainLib1
::
GetResult
()
{
return
result
;
}
Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
0 → 100644
View file @
0e06788c
struct
#ifdef _WIN32
__declspec
(
dllexport
)
#endif
OnlyPlainLib1
{
OnlyPlainLib1
();
int
GetResult
();
private:
int
result
;
};
Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
0 → 100644
View file @
0e06788c
#include
"onlyplainlib2.h"
OnlyPlainLib1
onlyPlainLib2
()
{
OnlyPlainLib1
opl1
;
return
opl1
;
}
Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
0 → 100644
View file @
0e06788c
#include
"onlyplainlib1.h"
#ifdef _WIN32
__declspec
(
dllexport
)
#endif
OnlyPlainLib1
onlyPlainLib2
();
Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
0 → 100644
View file @
0e06788c
#include
"onlyplainlib2.h"
int
main
(
int
argc
,
char
**
argv
)
{
return
onlyPlainLib2
().
GetResult
();
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment