Skip to content

Commit a0b5ec0

Browse files
committed
build(cmake): Add path match messages for gtest dirs
1 parent 60e7202 commit a0b5ec0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ else ()
4141
endif ()
4242
if (NOT DEFINED GTEST_INCLUDE_DIR)
4343
message(FATAL_ERROR "Could not find headers for gtest!")
44+
else()
45+
message(STATUS "gtest include directory: ${GTEST_INCLUDE_DIR}")
4446
endif ()
4547

4648
if ((EXISTS "${GTEST_ROOT}/lib/libgtest_main.a"
@@ -54,12 +56,14 @@ else ()
5456
endif ()
5557
if (NOT DEFINED GTEST_LIBRARY_DIR)
5658
message(FATAL_ERROR "Could not find library for gtest!")
59+
else()
60+
message(STATUS "gtest library directory: ${GTEST_LIBRARY_DIR}")
5761
endif ()
5862

5963
message(STATUS "googletest root directory: ${GTEST_ROOT}")
6064

6165
include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
62-
link_directories(${CMAKE_LIBRARY_DIR} ${GTEST_ROOT}/bin)
66+
link_directories(${GTEST_LIBRARY_DIR} ${GTEST_ROOT}/bin)
6367

6468

6569
#---------------------------

0 commit comments

Comments
 (0)