Skip to content

Commit

Permalink
differentiate Debug mode DLLs with a "d" suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddie Wu committed Oct 31, 2018
1 parent 1aa559f commit 010af45
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 15 deletions.
2 changes: 2 additions & 0 deletions TDB_API/TDB_API.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down
3 changes: 2 additions & 1 deletion TDB_API/Wind_TDB.q
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

/ Path to {@literal TDB_API.dll}<p>
/ NOTE: When loaded from within TorQ, a {@literal $KDBLIB}-based path is constructed.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"TDB_API"
/ NOTE: When global {@code NDEBUG} is defined to be 0b, debug DLL will be loaded instead.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"TDB_API",$[@[value;`..NDEBUG;{1b}];"";"d"]

/ Version of {@literal TDB_API.dll}
version:DLL 2:(`version;1);
Expand Down
1 change: 1 addition & 0 deletions Test_Wind_API/Test_Wind.q
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
\c 25 2000

// Load Wind_API
NDEBUG:0b
/system" "sv("cd";1_string LIB_DIR)
\l kdb+.q
\l Wind.q
Expand Down
1 change: 0 additions & 1 deletion Test_Wind_API/Test_Wind_API.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<ProjectGuid>{41577929-CFDA-42D7-9A03-8F77023A8D8A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Test_Wind_API</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
7 changes: 6 additions & 1 deletion Wind.util/StringEncoders.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __STRINGENCODERS_H__
#define __STRINGENCODERS_H__
#pragma comment(lib, "Wind.util.lib")

#include <string>

Expand All @@ -25,4 +24,10 @@ namespace Wind {

#include "StringEncoders.inl"

#ifdef NDEBUG
# pragma comment(lib, "Wind.util.lib")
#else
# pragma comment(lib, "Wind.utild.lib")
#endif

#endif//__STRINGENCODERS_H__
2 changes: 2 additions & 0 deletions Wind.util/Wind.util.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down
3 changes: 2 additions & 1 deletion Wind_API/Wind.q
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

/ Path to {@literal Wind_API.dll}<p>
/ NOTE: When loaded from within TorQ, a {@literal $KDBLIB}-based path is constructed.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"Wind_API"
/ NOTE: When global {@code NDEBUG} is defined to be 0b, debug DLL will be loaded instead.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"Wind_API",$[@[value;`..NDEBUG;{1b}];"";"d"]

/ Version of {@literal Wind_API.dll}
version:DLL 2:(`version;1);
Expand Down
2 changes: 2 additions & 0 deletions Wind_API/Wind_API.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down
6 changes: 5 additions & 1 deletion kdb+.hack/hack.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ namespace q {
K q::krr(S const error) { return static_cast<K>(0); }
K q::orr(S const error) { return static_cast<K>(0); }
#else
# pragma comment(lib, "kdb+.hack.lib")
# ifdef NDEBUG
# pragma comment(lib, "kdb+.hack.lib")
# else
# pragma comment(lib, "kdb+.hackd.lib")
# endif
#endif

#endif//__KDB_HACK__HACK_H__
7 changes: 6 additions & 1 deletion kdb+.hack/kdb+.hack.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{0D958CB7-1F8E-4F2E-81DA-5ECD1CC4FDFE}</ProjectGuid>
<RootNamespace>kdbhack</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -68,9 +67,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand All @@ -80,6 +81,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)inc\q\;$(SolutionDir)..\q_Wind\inc\q\</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -94,6 +96,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)inc\q\;$(SolutionDir)..\q_Wind\inc\q\</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -109,6 +112,7 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)inc\q\;$(SolutionDir)..\q_Wind\inc\q\</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -126,6 +130,7 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)inc\q\;$(SolutionDir)..\q_Wind\inc\q\</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
7 changes: 6 additions & 1 deletion kdb+.util/init.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __INIT_H__
#define __INIT_H__
#pragma comment(lib, "kdb+.util.lib")

/**
* @see http://code.kx.com/q//interfaces/c-client-for-q/
Expand All @@ -15,4 +14,10 @@ namespace q {

}//namespace q

#ifdef NDEBUG
# pragma comment(lib, "kdb+.util.lib")
#else
# pragma comment(lib, "kdb+.utild.lib")
#endif

#endif//__INIT_H__
2 changes: 2 additions & 0 deletions kdb+.util/kdb+.util.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down
7 changes: 6 additions & 1 deletion kdb+.util/multilang.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __MULTILANG_H__
#define __MULTILANG_H__
#pragma comment(lib, "kdb+.util.lib")

#include <string>

Expand All @@ -21,4 +20,10 @@ namespace q {

}//namespace q

#ifdef NDEBUG
# pragma comment(lib, "kdb+.util.lib")
#else
# pragma comment(lib, "kdb+.utild.lib")
#endif

#endif//__MULTILANG_H__
7 changes: 6 additions & 1 deletion kdb+.util/type_convert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __TYPE_CONVERT_H__
#define __TYPE_CONVERT_H__
#pragma comment(lib, "kdb+.util.lib")

#include "multilang.h"

Expand Down Expand Up @@ -68,4 +67,10 @@ namespace q {

#include "Cookbook.inl"

#ifdef NDEBUG
# pragma comment(lib, "kdb+.util.lib")
#else
# pragma comment(lib, "kdb+.utild.lib")
#endif

#endif//__TYPE_CONVERT_H__
7 changes: 6 additions & 1 deletion kdb+.util/util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __KDB__UTIL_H__
#define __KDB__UTIL_H__
#pragma comment(lib, "kdb+.util.lib")

#include "multilang.h"

Expand All @@ -24,4 +23,10 @@ namespace q {

#include "util.inl"

#ifdef NDEBUG
# pragma comment(lib, "kdb+.util.lib")
#else
# pragma comment(lib, "kdb+.utild.lib")
#endif

#endif//__KDB__UTIL_H__
5 changes: 3 additions & 2 deletions kdb+/kdb+.q
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
\d .CE

/ Path to {@literal kdb+.dll}<p>
/ NOTE: When loaded from within TorQ, a {@literal $KDBLIB}-based path is constructed.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"kdb+"
/ NOTE: When loaded from within TorQ, a {@literal $KDBLIB}-based path is constructed.<p>
/ NOTE: When global {@code NDEBUG} is defined to be 0b, debug DLL will be loaded instead.
DLL:hsym`${$[x~"";"";x,y]}[getenv[`KDBLIB];"/",string[.z.o],"/"],"kdb+",$[@[value;`..NDEBUG;{1b}];"";"d"]

/ Version of {@literal kdb+.dll}
version:DLL 2:(`version;1);
Expand Down
2 changes: 2 additions & 0 deletions kdb+/kdb+.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down
7 changes: 6 additions & 1 deletion win32.util/CodeConvert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __CODECONVERT_H__
#define __CODECONVERT_H__
#pragma comment(lib, "win32.util.lib")

#include <string>
#include <stdexcept>
Expand All @@ -25,4 +24,10 @@ namespace ml {

}//namespace ml

#ifdef NDEBUG
# pragma comment(lib, "win32.util.lib")
#else
# pragma comment(lib, "win32.utild.lib")
#endif

#endif//__CODECONVERT_H__
7 changes: 6 additions & 1 deletion win32.util/SocketPair.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __SOCKETPAIR_H__
#define __SOCKETPAIR_H__
#pragma comment(lib, "win32.util.lib")

#include <WS2tcpip.h>
#pragma comment(lib, "ws2_32.lib")
Expand Down Expand Up @@ -29,4 +28,10 @@ namespace SockPair {

}//namespace SockPair

#ifdef NDEBUG
# pragma comment(lib, "win32.util.lib")
#else
# pragma comment(lib, "win32.utild.lib")
#endif

#endif//__SOCKETPAIR_H__
7 changes: 6 additions & 1 deletion win32.util/hexDump.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __HEXDUMP_H__
#define __HEXDUMP_H__
#pragma comment(lib, "win32.util.lib")

#include "msvc.h"

Expand Down Expand Up @@ -37,4 +36,10 @@ namespace util {

#include "hexDump.inl"

#ifdef NDEBUG
# pragma comment(lib, "win32.util.lib")
#else
# pragma comment(lib, "win32.utild.lib")
#endif

#endif//__HEXDUMP_H__
2 changes: 2 additions & 0 deletions win32.util/win32.util.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down
1 change: 1 addition & 0 deletions win32_com/win32_com.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down

0 comments on commit 010af45

Please sign in to comment.