Skip to content

Commit 82830f9

Browse files
committed
Exclude vcpkg-based debug build from install path test
1 parent f143cb2 commit 82830f9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/pdal/capi/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ include_directories(
3232
${PDAL_INCLUDE_DIRS}
3333
)
3434

35+
# Add definition if building debug with vcpkg - PDAL_PLUGIN_INSTALL_PATH points to release binaries
36+
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPERCASE)
37+
if (BUILD_TYPE_UPPERCASE STREQUAL "DEBUG" AND VCPKG_TARGET_TRIPLET)
38+
add_definitions(-DUSING_VCPKG_DEBUG)
39+
endif()
40+
3541
add_executable(${TARGET} ${SOURCES} ${HEADERS} ${CONFIG})
3642
set_target_properties(${TARGET} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
3743

tests/pdal/capi/ConfigTest.c.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ TEST testPDALPluginInstallPath(void)
7575
size_t size = PDALPluginInstallPath(path, 1024);
7676
ASSERT(size > 0 && size <= 1024);
7777
ASSERT(path[0]);
78+
79+
#if !defined USING_VCPKG_DEBUG
7880
ASSERT_STR_EQ(PDAL_PLUGIN_INSTALL_PATH, path);
81+
#endif
82+
7983
PASS();
8084
}
8185

0 commit comments

Comments
 (0)