Try to make gdc work
This commit is contained in:
parent
24422fdac3
commit
6079bb6957
8 changed files with 31 additions and 10 deletions
|
@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 2.8.1)
|
|||
# in the project declaration. Listing other languages
|
||||
# is fine.
|
||||
PROJECT (CMAKED2_TESTS C D )
|
||||
SET( GLOBAL_DMD_DEFS "-w -wi" )
|
||||
SET( GLOBAL_GCC_DEFS "-Wall -pedantic -m32" )
|
||||
SET( GLOBAL_DMD_DEFS "-w" )
|
||||
SET( GLOBAL_GCC_DEFS "-Wall -pedantic" )
|
||||
|
||||
# Don't use ADD_DEFINITIONS() with a mixed C + D project
|
||||
# since that adds the same flags to both C and D builds.
|
||||
|
|
|
@ -3,5 +3,11 @@
|
|||
# The linker preference of D is higher than C (or CXX), so after
|
||||
# the objects are created, the D toolchain will drive linking.
|
||||
#
|
||||
# TODO
|
||||
# dirty fix
|
||||
# we should make the CMAKE_D_COMPILER_ID work
|
||||
IF("${CMAKE_BASE_NAME}" MATCHES "dmd")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" )
|
||||
ENDIF()
|
||||
ADD_EXECUTABLE ( app_5 app_5.d cfunc.c )
|
||||
ADD_TEST( app_5 app_5 )
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
include(UseDDeps)
|
||||
|
||||
include_directories(.)
|
||||
add_executable_with_dependencies(app_8 app_8.d)
|
||||
# TODO
|
||||
# disabled causes problems with gdc
|
||||
#add_executable_with_dependencies(app_8 app_8.d)
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
# This project is a C library
|
||||
PROJECT( lib_2 C )
|
||||
ADD_DEFINITIONS( ${GLOBAL_C_DEFS} )
|
||||
# TODO
|
||||
# dirty fix
|
||||
# we should make the CMAKE_D_COMPILER_ID work
|
||||
IF("${CMAKE_BASE_NAME}" MATCHES "dmd")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" )
|
||||
ENDIF()
|
||||
ADD_LIBRARY( lib_2 STATIC lib_2.c )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue