Commit d2366457 authored by mad.one@gmail.com's avatar mad.one@gmail.com

Add better support for .cmm test files.

Fixes Trac #7573.
Signed-off-by: mad.one@gmail.com's avatarAustin Seipp <mad.one@gmail.com>
parent df806942
......@@ -237,6 +237,9 @@ class TestOptions:
self.objc_src = 0
self.objcpp_src = 0
# Does this test use a .cmm file?
self.cmm_src = 0
# Should we put .hi/.o files in a subdirectory?
self.outputdir = None
......
......@@ -517,6 +517,9 @@ def objc_src( opts ):
def objcpp_src( opts ):
opts.objcpp_src = 1;
def cmm_src( opts ):
opts.cmm_src = 1;
def outputdir( odir ):
return lambda opts, d=odir: _outputdir(opts, d)
......@@ -1205,7 +1208,8 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
# Required by GHC 7.3+, harmless for earlier versions:
if (getTestOpts().c_src or
getTestOpts().objc_src or
getTestOpts().objcpp_src):
getTestOpts().objcpp_src or
getTestOpts().cmm_src):
extra_hc_opts += ' -no-hs-main '
if getTestOpts().compile_cmd_prefix == '':
......@@ -2111,6 +2115,8 @@ def add_suffix( name, suffix ):
def add_hs_lhs_suffix(name):
if getTestOpts().c_src:
return add_suffix(name, 'c')
elif getTestOpts().cmm_src:
return add_suffix(name, 'cmm')
elif getTestOpts().objc_src:
return add_suffix(name, 'm')
elif getTestOpts().objcpp_src:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment