Skip to content

Commit 68fbd11

Browse files
committed
Another try at fixing windows
1 parent 7ceea51 commit 68fbd11

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/cmake_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Configure CMake
4545
shell: bash
46-
run: cmake --preset conan-default -DGTEST_DISCOVER_TESTS_DISCOVERY_MODE=PRE_TEST
46+
run: cmake --preset conan-default
4747

4848
- name: Build
4949
shell: bash

tests/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ else()
5454
GTest::gtest
5555
GTest::gtest_main)
5656

57-
gtest_discover_tests(behaviortree_cpp_test)
57+
if(WIN32)
58+
gtest_discover_tests(behaviortree_cpp_test
59+
DISCOVERY_MODE PRE_TEST
60+
DISCOVERY_ENVIRONMENT "PATH=$<TARGET_FILE_DIR:behaviortree_cpp_test>;$ENV{PATH}"
61+
)
62+
else()
63+
gtest_discover_tests(behaviortree_cpp_test)
64+
endif()
5865

5966
endif()
6067

0 commit comments

Comments
 (0)