2010-08-11 04:55:30 +00:00
|
|
|
# Tell cmake our project only concerns the D language.
|
2010-09-06 18:46:46 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.1)
|
2010-08-12 04:17:46 +00:00
|
|
|
|
2010-08-14 04:52:06 +00:00
|
|
|
# We must explicitly indicate we're using the D language
|
|
|
|
# in the project declaration. Listing other languages
|
|
|
|
# is fine.
|
2016-08-06 15:50:42 +00:00
|
|
|
project(CMAKE-D_TESTS C D)
|
|
|
|
set(GLOBAL_DMD_DEFS "-w")
|
|
|
|
set(GLOBAL_GCC_DEFS "-Wall -pedantic")
|
2010-08-14 04:52:06 +00:00
|
|
|
|
2016-08-06 15:50:42 +00:00
|
|
|
# Don't use add_definitions() with a mixed C + D project
|
2010-08-14 04:52:06 +00:00
|
|
|
# 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.
|
2016-08-06 15:50:42 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GLOBAL_GCC_DEFS}")
|
|
|
|
set(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} ${GLOBAL_DMD_DEFS}")
|
2010-08-14 04:52:06 +00:00
|
|
|
|
2010-08-11 04:55:30 +00:00
|
|
|
enable_testing()
|
2010-08-14 04:52:06 +00:00
|
|
|
|
|
|
|
# build libs first, then apps
|
2016-08-06 15:50:42 +00:00
|
|
|
add_subdirectory(lib_2)
|
|
|
|
add_subdirectory(lib_1)
|
|
|
|
add_subdirectory(app_1)
|
|
|
|
add_subdirectory(app_2)
|
|
|
|
add_subdirectory(app_3)
|
|
|
|
add_subdirectory(app_5)
|
|
|
|
add_subdirectory(app_4)
|
|
|
|
add_subdirectory(app_6)
|
|
|
|
add_subdirectory(app_7)
|
|
|
|
add_subdirectory(app_8)
|
|
|
|
add_subdirectory(app_9)
|