Subversion Repositories DevTools

Rev

Rev 1900 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<project name="msvc-task">

        <!--    C O P Y R I G H T   N O T I C E
                        This material is confidential to ERG and may not be disclosed in whole
                        or in part to any third party nor used in any manner whatsoever other
                        than for the purposes expressly consented to by ERG in writing.

                        This material is also copyright and may not be reproduced, stored in a
                        retrieval system or transmitted in any form or by any means in whole or
                        in part without the express written consent of ERG.
        -->

        <!-- This is a Windows based compiler package, so include its standard environment -->
        <using name="ant-cpptasks" version="REPLACE_ANT_CPPTASK"/>
        <using name="ant-windows" version="REPLACE_WINDOWS"/>
        
        <using name="ant-dinkumware_stl" version="REPLACE_DINKUMWARE_STL"/>

        <!-- Include the Microsoft C++ Compiler/Linker environment from its COTS package -->
        <using name="microsoft_cpp" version="REPLACE_MICROSOFT_CPP"/>
                
        <!-- Set up the environment's Binary path, Include and Library paths -->
        <property name="msvc_bin" value="${using.microsoft_cpp.basedir}/bin"/>
        <property name="msvc_compilername" value="msvc"/>

        
        <if>
                <isset property="dinkumware_stl_include"/>
                <then>
                        <echo taskname="msvc-task">using Placing Dinkumware before Microsoft MSVC</echo>
                        <property name="msvc_include" value="${dinkumware_stl_include};${using.microsoft_cpp.basedir}/include"/>        
                        <property name="msvc_lib" value="${using.microsoft_cpp.basedir}/lib"/>
                        <property name="msvc_libraries_debug"   value="MSVCPRTD,MSVCRTD,OLDNAMES,uuid,kernel32,user32,advapi32,ws2_32"/>
                        <property name="msvc_libraries_release" value="MSVCPRT,MSVCRT,OLDNAMES,uuid,kernel32,user32,advapi32,ws2_32"/>  
                </then>
                <else>
                        <property name="msvc_include" value="${using.microsoft_cpp.basedir}/include"/>
                        <property name="msvc_lib" value="${using.microsoft_cpp.basedir}/lib"/>
                        <property name="msvc_libraries_debug"   value="MSVCPRTD,MSVCRTD,OLDNAMES,uuid,kernel32,user32,advapi32,ws2_32"/>
                        <property name="msvc_libraries_release" value="MSVCPRT,MSVCRT,OLDNAMES,uuid,kernel32,user32,advapi32,ws2_32"/>
                </else>
        </if>
        
        <property name="msvc_include_debug" value="${msvc_include}"/>
        <property name="msvc_include_release" value="${msvc_include}"/>
        <property name="msvc_lib_debug" value="${msvc_lib}"/>
        <property name="msvc_lib_release" value="${msvc_lib}"/>


        <compiler id="msvc_compiler_debug_console" name="${msvc_compilername}">
                <compilerarg value="/G6"/>      <!-- Optimize for Pentium Pro -->
                <compilerarg value="/MDd"/>     <!-- link with MSVCRTD.LIB debug lib -->
                <compilerarg value="/Ze"/>      <!-- Enable langauge extensions -->
                
                <compilerarg value="/W3"/>      <!-- Warning Level 3 -->
                <compilerarg value="/GX"/>      <!-- Enable C++ EH (same as /EHsc) enable synchronous C++ and extern "C" defaults to nothrow -->
                <compilerarg value="-DNO_STRICT"/>

                <compilerarg value="/Od"/>      <!-- Disable Optimization for Debug Build -->
                <compilerarg value="/Zi"/>
                <compilerarg value="-D_DEBUG"/>
                <compilerarg value="-DDEBUG"/>

                <compilerarg value="-DWIN32"/>
                <compilerarg value="-D_WINDOWS"/>
        </compiler>

        <compiler id="msvc_compiler_debug_gui" name="${msvc_compilername}">
                <compilerarg value="/G6"/>      <!-- Optimize for Pentium Pro -->
                <compilerarg value="/MDd"/>     <!-- link with MSVCRTD.LIB debug lib -->
                <compilerarg value="/Ze"/>      <!-- Enable langauge extensions -->

                <compilerarg value="/W3"/>      <!-- Warning Level 3 -->
                <compilerarg value="/GX"/>      <!-- Enable C++ EH (same as /EHsc) enable synchronous C++ and extern "C" defaults to nothrow -->

                <compilerarg value="-DNO_STRICT"/>

                <compilerarg value="/Od"/>      <!-- Disable Optimization for Debug Build -->
                <compilerarg value="/Zi"/>
                <compilerarg value="-D_DEBUG"/>
                <compilerarg value="-DDEBUG"/>

                <compilerarg value="-DWIN32"/>
                <compilerarg value="-D_WINDOWS"/>
        </compiler>

        <compiler id="msvc_compiler_release_console" name="${msvc_compilername}">
                <compilerarg value="/G6"/>      <!-- Optimize for Pentium Pro -->
                <compilerarg value="/MD"/>      <!-- link with MSVCRT.LIB -->
                <compilerarg value="/Ze"/>      <!-- Enable langauge extensions -->

                <compilerarg value="/W3"/>      <!-- Warning Level 3 -->
                <compilerarg value="/GX"/>      <!-- Enable C++ EH (same as /EHsc) enable synchronous C++ and extern "C" defaults to nothrow -->

                <compilerarg value="/Od"/>      <!-- Disable Optimization for Debugable Release Code -->
                <compilerarg value="/Zi"/>      <!-- Place Source Code information in debugable code -->
                <compilerarg value="-DNDEBUG"/>
        </compiler>

        <compiler id="msvc_compiler_release_gui" name="${msvc_compilername}">
                <compilerarg value="/G6"/>      <!-- Optimize for Pentium Pro -->
                <compilerarg value="/MD"/>      <!-- link with MSVCRT.LIB -->
                <compilerarg value="/Ze"/>      <!-- Enable langauge extensions -->

                <compilerarg value="/W3"/>      <!-- Warning Level 3 -->
                <compilerarg value="/GX"/>      <!-- Enable C++ EH (same as /EHsc) enable synchronous C++ and extern "C" defaults to nothrow -->

                <compilerarg value="/Od"/>      <!-- Disable Optimization for Debugable Release Code -->
                <compilerarg value="/Zi"/>      <!-- Place Source Code information in debugable code -->
                <compilerarg value="-DNDEBUG"/>
        </compiler>

        <linker id="msvc_linker_debug_console" name="${msvc_compilername}" path="${msvc_bin}">
                <linkerarg value="/LIBPATH:${msvc_lib_debug}"/>

                <syslibset dir="${dinkumware_stl_lib}" libs="${dinkumware_stl_libs_debug}" casesensitive="no" if="dinkumware_stl_lib"/>
                <syslibset dir="${msvc_lib_debug}" libs="${msvc_libraries_debug}" casesensitive="no"/>
        </linker>

        <linker id="msvc_linker_debug_gui" name="${msvc_compilername}" path="${msvc_bin}">
                <linkerarg value="/LIBPATH:${msvc_lib_debug}"/>

                <syslibset dir="${dinkumware_stl_lib}" libs="${dinkumware_stl_libs_debug}" casesensitive="no" if="dinkumware_stl_lib"/>
                <syslibset dir="${msvc_lib_debug}" libs="${msvc_libraries_debug}" casesensitive="no"/>
        </linker>

        <linker id="msvc_linker_release_console" name="${msvc_compilername}" path="${msvc_bin}">
                <linkerarg value="/LIBPATH:${msvc_lib_release}"/>
                
                <syslibset dir="${dinkumware_stl_lib}" libs="${dinkumware_stl_libs_release}" casesensitive="no" if="dinkumware_stl_lib"/>
                <syslibset dir="${msvc_lib_release}" libs="${msvc_libraries_release}" casesensitive="no"/>
        </linker>

        <linker id="msvc_linker_release_gui" name="${msvc_compilername}" path="${msvc_bin}">
                <linkerarg value="/LIBPATH:${msvc_lib_release}"/>
                <syslibset dir="${dinkumware_stl_lib}" libs="${dinkumware_stl_libs_release}" casesensitive="no" if="dinkumware_stl_lib"/>
                <syslibset dir="${msvc_lib_release}" libs="${msvc_libraries_release}" casesensitive="no"/>
        </linker>

</project>