mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
committed by
Andreas Rumpf
parent
6fc74cec55
commit
55cf971adf
@@ -1695,13 +1695,12 @@ proc genModule(m: BModule, cfile: Cfile): Rope =
|
||||
result = getFileHeader(m.config, cfile)
|
||||
result.add(genMergeInfo(m))
|
||||
|
||||
if m.config.cppCustomNamespace.len > 0:
|
||||
result.add openNamespaceNim(m.config.cppCustomNamespace)
|
||||
|
||||
generateThreadLocalStorage(m)
|
||||
generateHeaders(m)
|
||||
add(result, genSectionStart(cfsHeaders, m.config))
|
||||
add(result, m.s[cfsHeaders])
|
||||
if m.config.cppCustomNamespace.len > 0:
|
||||
result.add openNamespaceNim(m.config.cppCustomNamespace)
|
||||
add(result, genSectionEnd(cfsHeaders, m.config))
|
||||
add(result, genSectionStart(cfsFrameDefines, m.config))
|
||||
if m.s[cfsFrameDefines].len > 0:
|
||||
|
||||
12
tests/compiler/tcppCompileToNamespace.nim
Normal file
12
tests/compiler/tcppCompileToNamespace.nim
Normal file
@@ -0,0 +1,12 @@
|
||||
discard """
|
||||
cmd: "nim cpp --cppCompileToNamespace:foo $options -r $file"
|
||||
target: cpp
|
||||
"""
|
||||
|
||||
# Theoretically nim could just ignore the flag cppCompileToNamespace
|
||||
# and this test would pass. Setting ``ccodeCheck`` for a c++ target
|
||||
# doesn't work.
|
||||
|
||||
import os
|
||||
|
||||
echo "a" / "b"
|
||||
Reference in New Issue
Block a user