Skip to content
Snippets Groups Projects
Commit 895d541c authored by Forgenet's avatar Forgenet
Browse files

Updated CMakeLists.txt for tests

parent 5e01b76c
No related branches found
No related tags found
No related merge requests found
# Ignore build directories
/build/
/cmake-build-*/
# Ignore CMake generated files
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
Makefile
# Ignore Ninja generated files
build.ninja
rules.ninja
.ninja_deps
.ninja_log
# Ignore Visual Studio Code workspace files
.vscode/
# Ignore JetBrains CLion project files
.idea/
# Ignore Google Test download directory
/googletest-download/
# Ignore compiled object files
*.o
*.obj
*.lo
......@@ -39,12 +32,10 @@ rules.ninja
*.exp
*.pdb
# Ignore executable files
*.exe
*.out
*.app
# Ignore other temporary files
*.log
*.tmp
*.swp
......
File moved
File moved
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../libs/CMakeLists.txt.in ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../external/CMakeLists.txt.in ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)
......@@ -18,7 +18,9 @@ add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
${CMAKE_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)
add_executable(runTests main_test.cpp)
include_directories(${CMAKE_SOURCE_DIR}/src)
file(GLOB_RECURSE TEST_SOURCES LIST_DIRECTORIES false *.cpp)
add_executable(runTests ${TEST_SOURCES})
target_link_libraries(runTests gtest_main functions)
add_test(NAME runTests COMMAND runTests)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment