diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 99674343354..9905ecc228f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,9 +7,9 @@ include_directories("${CMAKE_SOURCE_DIR}") enable_testing() # Add GoogleTest directory to the project -set(gtest_SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/googletest") -add_subdirectory("${gtest_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/googletest") -include_directories("${gtest_SOURCE_DIR}/googletest/include" "${gtest_SOURCE_DIR}") +set(GTEST_SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/googletest") +add_subdirectory("${GTEST_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/googletest") +include_directories("${GTEST_SOURCE_DIR}/googletest/include" "${GTEST_SOURCE_DIR}") #set(INSTALL_GTEST OFF) diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 06d68dbc026..3a315098962 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -4,7 +4,7 @@ */ #include -#include "src/main.h" +#include TEST(MainTestSuite, WriteFileTest) { EXPECT_EQ(write_file("write_file_test.txt", "test"), 0);