diff options
Diffstat (limited to 'Config.hs')
-rw-r--r-- | Config.hs | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -48,20 +48,20 @@ writeTestProg bInfo contents = writeFile (testProgLoc bInfo) contents | |||
48 | 48 | ||
49 | -- compile, discarding error messages | 49 | -- compile, discarding error messages |
50 | compile cmd = do | 50 | compile cmd = do |
51 | let processRecord = (shell $ join cmd) { std_out = CreatePipe | 51 | let processRecord = (shell $ unwords cmd) { std_out = CreatePipe |
52 | , std_err = CreatePipe } | 52 | , std_err = CreatePipe } |
53 | ( _, _, _, h) <- createProcess processRecord | 53 | ( _, _, _, h) <- createProcess processRecord |
54 | waitForProcess h | 54 | waitForProcess h |
55 | 55 | ||
56 | -- command to compile the test program | 56 | -- command to compile the test program |
57 | compileCmd bInfo buildInfo = [ "gcc " | 57 | compileCmd bInfo buildInfo = [ "gcc " |
58 | , (join $ ccOptions buildInfo) | 58 | , (unwords $ ccOptions buildInfo) |
59 | , (join $ cppOptions buildInfo) | 59 | , (unwords $ cppOptions buildInfo) |
60 | , (join $ map ("-I"++) $ includeDirs buildInfo) | 60 | , (unwords $ map ("-I"++) $ includeDirs buildInfo) |
61 | , testProgLoc bInfo | 61 | , testProgLoc bInfo |
62 | , "-o" | 62 | , "-o" |
63 | , testOutLoc bInfo | 63 | , testOutLoc bInfo |
64 | , (join $ map ("-L"++) $ extraLibDirs buildInfo) | 64 | , (unwords $ map ("-L"++) $ extraLibDirs buildInfo) |
65 | ] | 65 | ] |
66 | 66 | ||
67 | -- compile a simple program with symbols from GSL and LAPACK with the given libs | 67 | -- compile a simple program with symbols from GSL and LAPACK with the given libs |
@@ -72,7 +72,6 @@ testprog bInfo buildInfo libs fmks = do | |||
72 | ++ [ (prepend "-l" $ libs) | 72 | ++ [ (prepend "-l" $ libs) |
73 | , (prepend "-framework " fmks) ] | 73 | , (prepend "-framework " fmks) ] |
74 | 74 | ||
75 | join = intercalate " " | ||
76 | prepend x = unwords . map (x++) . words | 75 | prepend x = unwords . map (x++) . words |
77 | 76 | ||
78 | check bInfo buildInfo libs fmks = (ExitSuccess ==) `fmap` testprog bInfo buildInfo libs fmks | 77 | check bInfo buildInfo libs fmks = (ExitSuccess ==) `fmap` testprog bInfo buildInfo libs fmks |