Skip to content

Commit

Permalink
Fixed googletest link error when using vcpkg (MakeAndRegisterTestInfo…
Browse files Browse the repository at this point in the history
… LNK2019 #9)
  • Loading branch information
ihedvall committed May 7, 2024
1 parent c452ca0 commit 898a61b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ odsconfigurator/model/*_?.xml
CMakeSettings.json

venv


python/tests/__pycache__/
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ endif()
option(BUILD_SHARED_LIBS "Static libraries are preferred" OFF)
option(DBC_DOC "If doxygen is installed, then build documentation in Release mode" OFF)
option(DBC_TOOLS "Building applications" OFF)
option(DBC_TEST "Building unit test" OFF)
option(DBC_TEST "Building unit test" ON)
option(DBC_PYTHON "Building Python module" OFF)
option(DBC_FLEX "Building Flex and Bison source code" OFF)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(DBC_TOOLS AND USE_VCPKG)
list(APPEND VCPKG_MANIFEST_FEATURES "tools")
endif()

if(DBC_TEST AND USE_VCPKG)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif()
Expand All @@ -48,8 +44,6 @@ if (DBC_DOC)
include(script/doxygen.cmake)
endif()



include(script/flex.cmake)
include(script/bison.cmake)

Expand Down
1 change: 0 additions & 1 deletion script/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

include (FetchContent)

message(STATUS "GTest Fetching: " ${GTest_FOUND})
include(FetchContent)
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
Expand Down
6 changes: 0 additions & 6 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
"dependencies": [
"wxwidgets"
]
},
"tests": {
"description": "Build DBC tests",
"dependencies": [
"gtest"
]
}
}
}

0 comments on commit 898a61b

Please sign in to comment.