[Scons-users] .C suffix for c files on POSIX
Managan, Rob
managan1 at llnl.gov
Thu Dec 19 17:22:20 EST 2013
For gcc you want the command line option "-x c" to say that any input
files after that option are processed as C files.
I confess that I would need to go look up details on the best way to add
that command line option for files that end if .C.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808
On 12/19/13 2:17 PM, "Carl Cerecke" <carl.cerecke at compacsort.com> wrote:
>On 19 December 2013 14:46, Dirk Bächle <tshortik at gmx.de> wrote:
>> Hi Carl,
>>
>>
>> On 19.12.2013 00:49, Carl Cerecke wrote:
>>>
>>> How can I tell scons that a .C suffix is for C files, not C++ files on
>>> Linux?
>>>
>>> I've tried env.Append(CFILESUFFIX=['.C']) but it does not work - the
>>> files are still recognised as C++.
>>
>>
>> I think that instead of restricting the suffix list, it'd be easier to
>> create an Environment that only loads the C compiler:
>>
>> ccenv = Environment(tools=['cc','link','ar'])
>>
>> and use that one to compile your sources.
>
>Thanks, Dirk. Good idea. Except the program is a mix of C and C++.
>
>
>Cheers,
>Carl.
>_______________________________________________
>Scons-users mailing list
>Scons-users at scons.org
>http://four.pairlist.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list