Skip to content

Commit

Permalink
fix: CMakeLists.txt && documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-olivier committed Jan 29, 2022
1 parent 19a74ae commit 371559a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ option(BUILD_TESTS "when set to ON, build unit tests" OFF)
include_directories(.)

if(BUILD_TESTS)
include(import/FetchGoogleTest.cmake)

find_package(googletest QUIET)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

if(UNIX)
add_compile_options(-Wall -Wextra -Weffc++)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ lib.open("./dynamic_lib", dylib::extension);
Load a dynamic library into the object. If a dynamic library was already opened, it will be unloaded and replaced

`close`
Close the dynamic library currently loaded in the object. This function will be automatically called by the class destructor
Unload the dynamic library currently loaded in the object. This function will be automatically called by the class destructor
```c++
// Load ./dynamic_lib.so

Expand All @@ -56,7 +56,7 @@ dylib lib("./dynamic_lib.so");

lib.open("./other_dynamic_lib.so");

// Close ./other_dynamic_lib.so
// Unload ./other_dynamic_lib.so

lib.close();
```
Expand Down
13 changes: 0 additions & 13 deletions import/FetchGoogleTest.cmake

This file was deleted.

0 comments on commit 371559a

Please sign in to comment.