-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates to CMake installation and header. including googletest in the…
… installation process, build lib -> test lib -> install
- Loading branch information
1 parent
6232b29
commit 926b8b6
Showing
4 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Download and install GoogleTest | ||
include(ExternalProject) | ||
ExternalProject_Add(googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG main | ||
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" | ||
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
TEST_COMMAND "" | ||
) | ||
|
||
# TESTS | ||
add_executable(test_openMTPK arith/t_arith.cpp) | ||
|
||
# use googletest | ||
add_dependencies(test_openMTPK gtest) | ||
include_directories(${source_dir}/include) | ||
target_link_libraries(test_openMTPK openMTPK gtest gtest_main pthread) | ||
|
||
#target_link_libraries(test_openMTPK ${binary_dir}/libgtest_main.a) | ||
|
||
|
||
enable_testing() | ||
|
||
add_test(NAME test_openMTPK | ||
COMMAND test_openMTPK) | ||
|
||
|
||
|