Many small Improvements. Removed old non-functional test structures. Switched to dmd for linking. Fixed bug in CMakeDInformation.cmake that we inhereted from the C version. Added C+D test case, which fails.
This commit is contained in:
parent
6af1633a9b
commit
02d13655b2
151 changed files with 100 additions and 39777 deletions
9
tests/app_4/CMakeLists.txt
Normal file
9
tests/app_4/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# This is a D app that links a C library.
|
||||
#
|
||||
# The linker preference of D is higher than C (or CXX), so after
|
||||
# the objects are created, the D toolchain will drive linking.
|
||||
#
|
||||
ADD_EXECUTABLE ( app_4 app_4.d )
|
||||
INCLUDE_DIRECTORIES( app_4 ${PROJECT_SOURCE_DIR} )
|
||||
TARGET_LINK_LIBRARIES( app_4 lib_2 )
|
||||
ADD_TEST( app_4 app_4 )
|
12
tests/app_4/app_4.d
Normal file
12
tests/app_4/app_4.d
Normal file
|
@ -0,0 +1,12 @@
|
|||
import lib_2.lib_2_import;
|
||||
|
||||
// extern(C) int c_func_add_1( int x );
|
||||
|
||||
int main()
|
||||
{
|
||||
int x = 1;
|
||||
int y;
|
||||
y = c_func_add_1(y);
|
||||
assert( y == x + 1 );
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue