comparison cmake/FindD.cmake @ 281:7f2e3ffa1c33

Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
author eldar
date Sun, 11 Oct 2009 05:23:41 +0000
parents bb0f228c27cd
children 08c1ca7975ab
comparison
equal deleted inserted replaced
280:bcc498ccf334 281:7f2e3ffa1c33
56 #option(ONE_BUILD_COMMAND "Build in one command" "OFF") 56 #option(ONE_BUILD_COMMAND "Build in one command" "OFF")
57 set(ONE_BUILD_COMMAND OFF) ## TODO: test it and uncomment the previous line. 57 set(ONE_BUILD_COMMAND OFF) ## TODO: test it and uncomment the previous line.
58 58
59 if (NOT ONE_BUILD_COMMAND) 59 if (NOT ONE_BUILD_COMMAND)
60 if(D_IS_MARS) 60 if(D_IS_MARS)
61 set(opt_tmp "ON") 61 set(opt_tmp "ON")
62 else(D_IS_MARS) 62 else(D_IS_MARS)
63 set(opt_tmp "OFF") 63 set(opt_tmp "OFF")
64 endif(D_IS_MARS) 64 endif(D_IS_MARS)
65 option(SINGLE_D_OBJECT "Build all d sources to one object file" ${opt_tmp}) 65 option(SINGLE_D_OBJECT "Build all d sources to one object file" ${opt_tmp})
66 if(D_IS_LLVM) 66 if(D_IS_LLVM)
67 set(D_FLAGS ${D_FLAGS} -singleobj) 67 set(D_FLAGS ${D_FLAGS} -singleobj)
68 endif(D_IS_LLVM) 68 endif(D_IS_LLVM)
69 set(D_MODULES_PER_OBJECT 10000 CACHE STRING "Max number of modules per object file") 69 if(CMAKE_HOST_WIN32 AND D_IS_MARS)
70 set(D_MODULES_PER_OBJECT 200 CACHE STRING "Max number of modules per object file")
71 else(CMAKE_HOST_WIN32 AND D_IS_MARS)
72 set(D_MODULES_PER_OBJECT 10000 CACHE STRING "Max number of modules per object file")
73 endif(CMAKE_HOST_WIN32 AND D_IS_MARS)
70 endif(NOT ONE_BUILD_COMMAND) 74 endif(NOT ONE_BUILD_COMMAND)
71 75
72 ## Specific flags for build configurations. 76 ## Specific flags for build configurations.
73 ## TODO: Add another targets. 77 ## TODO: Add another targets.
74 set(D_RELEASE_FLAGS -O -release) 78 set(D_RELEASE_FLAGS -O -release)