Changeset 17
- Timestamp:
- 08/28/07 07:29:26 (1 year ago)
- Files:
-
- trunk/samples/HelloTango (moved) (moved from trunk/samples/HelloPhobos)
- trunk/samples/HelloTango/CMakeLists.txt (modified) (1 diff)
- trunk/samples/HelloTango/Demo/CMakeLists.txt (modified) (1 diff)
- trunk/samples/HelloTango/Demo/demo.d (modified) (1 diff)
- trunk/samples/HelloTango/Hello/CMakeLists.txt (modified) (1 diff)
- trunk/samples/HelloTango/Hello/hello.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/samples/HelloTango/CMakeLists.txt
r8 r17 1 ################################# 2 # Preamble 3 ############## 4 5 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ 6 # is checked 7 set(CMAKE_MODULE_PATH 8 ${CMAKE_SOURCE_DIR}/cmake/Modules 9 ) 10 11 # Using Tango 12 set(CMAKE_D_USE_TANGO True) 13 14 # check for DDoc usage 15 include(UseDDoc) 16 17 ################################# 18 # Project 19 ############## 20 1 21 # The name of our project is "HELLO". CMakeLists files in this project can 2 22 # refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and trunk/samples/HelloTango/Demo/CMakeLists.txt
r8 r17 1 1 # Make sure the compiler can find include files from our Hello library. 2 INCLUDE_DIRECTORIES (${HELLO_SOURCE_DIR}/Hello) 2 INCLUDE_DIRECTORIES ( 3 ${CMAKE_BINARY_DIR} 4 ${CMAKE_SOURCE_DIR} 5 ) 3 6 4 7 # Make sure the linker can find the Hello library once it is built. 5 LINK_DIRECTORIES (${HELLO_BINARY_DIR}/Hello) 8 LINK_DIRECTORIES ( 9 ${HELLO_BINARY_DIR}/Hello 10 ) 6 11 7 12 # Add executable called "helloDemo" that is built from the source files 8 13 # "demo.cxx" and "demo_b.cxx". The extensions are automatically found. 9 ADD_EXECUTABLE (helloDemo demo.d) 14 ADD_EXECUTABLE (helloDemo 15 demo.d 16 ) 10 17 11 18 # Link the executable to the Hello library. 12 TARGET_LINK_LIBRARIES (helloDemo Hello) 19 TARGET_LINK_LIBRARIES (helloDemo 20 Hello 21 ) trunk/samples/HelloTango/Demo/demo.d
r9 r17 1 import std.stdio;2 1 import Hello.hello; 3 2 trunk/samples/HelloTango/Hello/CMakeLists.txt
r8 r17 1 include_directories( 2 ${CMAKE_BINARY_DIR} 3 ${CMAKE_SOURCE_DIR} 4 ) 5 1 6 # Create a library called "Hello" which includes the source file "hello.cxx". 2 7 # The extension is already found. Any number of sources could be listed here. trunk/samples/HelloTango/Hello/hello.d
r9 r17 1 1 module Hello.hello; 2 2 3 import std.stdio;3 import tango.io.Stdout; 4 4 5 5 class Hail … … 8 8 void Print() 9 9 { 10 writefln ("Hello, World!");10 Stdout("Hello, World!").newline; 11 11 } 12 12 }
