start test cmakelists.txt for app
This commit is contained in:
parent
6160943329
commit
c81b4d213e
5
App/Docs/NOTES.md
Normal file
5
App/Docs/NOTES.md
Normal file
@ -0,0 +1,5 @@
|
||||
# My Notes
|
||||
|
||||
## Notes
|
||||
|
||||
Add tests for when you start implementing the AppLib functions. Use gtest for that. Also if you can figure it out (i know you can) add some file movement to build dir automation for cmake.
|
||||
25
App/Tests/CMakeLists.txt
Normal file
25
App/Tests/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
cmake_minimum_required (VERSION 3.8)
|
||||
|
||||
# Add source to this project's executable.
|
||||
|
||||
file(GLOB SRCS "src/*.cpp")
|
||||
file(GLOB_RECURSE HDRS "include/*.hh")
|
||||
|
||||
|
||||
add_library(AppLib
|
||||
${SRCS}
|
||||
${HDRS}
|
||||
)
|
||||
|
||||
target_include_directories(AppLib PUBLIC "${CMAKE_SOURCE_DIR}/AppLib/include/AppLib")
|
||||
|
||||
enable_testing()
|
||||
|
||||
find_package(GTest CONFIG REQUIRED)
|
||||
target_link_libraries(AppTest PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main)
|
||||
|
||||
add_test(AllTestsInMain AppTest)
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||
set_property(TARGET AppLib PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
Loading…
x
Reference in New Issue
Block a user