2010-08-10 21:55:30 -07:00
|
|
|
# Tell cmake our project only concerns the D language.
|
2010-09-06 11:46:46 -07:00
|
|
|
cmake_minimum_required(VERSION 2.8.1)
|
2010-08-11 21:17:46 -07:00
|
|
|
|
2010-08-13 21:52:06 -07:00
|
|
|
# We must explicitly indicate we're using the D language
|
|
|
|
# in the project declaration. Listing other languages
|
|
|
|
# is fine.
|
2013-10-16 17:31:54 +02:00
|
|
|
PROJECT (CMAKE-D_TESTS C D )
|
2010-12-09 23:08:33 +01:00
|
|
|
SET( GLOBAL_DMD_DEFS "-w" )
|
|
|
|
SET( GLOBAL_GCC_DEFS "-Wall -pedantic" )
|
2010-08-13 21:52:06 -07:00
|
|
|
|
|
|
|
# Don't use ADD_DEFINITIONS() with a mixed C + D project
|
|
|
|
# since that adds the same flags to both C and D builds.
|
|
|
|
# Also, the D linker preference is set to 40, which is
|
|
|
|
# higher than C++ (30) and C (10). This causes CMAKE
|
|
|
|
# to use the D linker in mixed linking cases.
|
|
|
|
# Append our own definitions to the defaults.
|
2010-09-04 14:20:55 -07:00
|
|
|
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GLOBAL_GCC_DEFS}" )
|
|
|
|
SET( CMAKE_D_FLAGS "${CMAKE_D_FLAGS} ${GLOBAL_DMD_DEFS}" )
|
2010-08-13 21:52:06 -07:00
|
|
|
|
2010-08-10 21:55:30 -07:00
|
|
|
enable_testing()
|
2010-08-13 21:52:06 -07:00
|
|
|
|
|
|
|
# build libs first, then apps
|
|
|
|
ADD_SUBDIRECTORY (lib_1)
|
|
|
|
ADD_SUBDIRECTORY (lib_2)
|
2010-08-10 21:55:30 -07:00
|
|
|
ADD_SUBDIRECTORY (app_1)
|
|
|
|
ADD_SUBDIRECTORY (app_2)
|
|
|
|
ADD_SUBDIRECTORY (app_3)
|
2010-08-14 00:00:09 -07:00
|
|
|
ADD_SUBDIRECTORY (app_5)
|
2010-08-13 21:52:06 -07:00
|
|
|
ADD_SUBDIRECTORY (app_4)
|
2010-08-14 13:11:51 -07:00
|
|
|
ADD_SUBDIRECTORY (app_6)
|
|
|
|
ADD_SUBDIRECTORY (app_7)
|
2010-09-26 22:31:56 +02:00
|
|
|
ADD_SUBDIRECTORY (app_8)
|
2010-10-03 01:32:53 +02:00
|
|
|
ADD_SUBDIRECTORY (app_9)
|