Added Testing capability
This commit is contained in:
parent
6f1fea759e
commit
1d3ad6faa2
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.8.2)
|
||||||
|
|
||||||
# Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html )
|
# Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html )
|
||||||
enable_language(CXX C)
|
enable_language(CXX C)
|
||||||
@ -69,3 +69,8 @@ set_exe_flags()
|
|||||||
|
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
|
||||||
|
if(${SELF_TEST})
|
||||||
|
enable_testing()
|
||||||
|
add_subdirectory (tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
|
|
||||||
if(NOT TARGET polarssl)
|
if(NOT TARGET polarssl)
|
||||||
message("including polarssl")
|
message("including polarssl")
|
||||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL )
|
if (SELF_TEST)
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl)
|
||||||
|
else()
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
5
tests/CMakeLists.txt
Normal file
5
tests/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_subdirectory(ChunkBuffer)
|
10
tests/ChunkBuffer/CMakeLists.txt
Normal file
10
tests/ChunkBuffer/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_library(ChunkBuffer ${CMAKE_SOURCE_DIR}/src/ChunkBuffer.cpp)
|
||||||
|
|
||||||
|
|
||||||
|
add_executable(creatable-exe creatable.cpp)
|
||||||
|
target_link_libraries(creatable-exe ChunkBuffer)
|
||||||
|
add_test(NAME creatable-test COMMAND creatable-exe)
|
4
tests/ChunkBuffer/creatable.cpp
Normal file
4
tests/ChunkBuffer/creatable.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user