From 3c4f0b5adae72e7ad4f5536d4c61f85f0dd30484 Mon Sep 17 00:00:00 2001 From: Darrell Wright Date: Fri, 24 Nov 2017 23:16:02 -0500 Subject: [PATCH] Changed testing approach and added gitignore --- .gitignore | 194 +++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 18 ++--- 2 files changed, 199 insertions(+), 13 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e88e3be --- /dev/null +++ b/.gitignore @@ -0,0 +1,194 @@ +#ignore thumbnails created by windows +Thumbs.db +#Ignore files build by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +.idea/ +*.opensdf +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +# User-specific folders +*.sln.ide/ +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ +# Roslyn cache directories +*.ide/ +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* +#NUNIT +*.VisualState.xml +TestResult.xml +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc +# Chutzpah Test files +_Chutzpah* +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile +# Visual Studio profiler +*.psess +*.vsp +*.vspx +# TFS 2012 Local Workspace +$tf/ +# Guidance Automation Toolkit +*.gpState +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user +# JustCode is a .NET coding addin-in +.JustCode +# TeamCity is a build add-in +_TeamCity* +# DotCover is a Code Coverage Tool +*.dotCover +# NCrunch +_NCrunch_* +.*crunch*.local.xml +# MightyMoose +*.mm.* +AutoTest.Net/ +# Web workbench (sass) +.sass-cache/ +# Installshield output folder +[Ee]xpress/ +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html +# Click-Once directory +publish/ +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# If using the old MSBuild-Integrated Package Restore, uncomment this: +#!**/packages/repositories.config +# Windows Azure Build Output +csx/ +*.build.csdef +# Windows Store app package directory +AppPackages/ +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ +# RIA/Silverlight projects +Generated_Code/ +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +# SQL Server files +*.mdf +*.ldf +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +# Microsoft Fakes +FakesAssemblies/ +*.suo +*.vcxproj.filters +*.npp +CMakeFiles/* +nbproject/* +*.cd +*.cd +a.out +cmake-build-debug/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 332e3a3..fe31ac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,6 @@ find_package( Threads REQUIRED ) option( USE_SYSTEM_TZ_DB "Use the operating system's timezone database" OFF ) option( USE_TZ_DB_IN_DOT "Save the timezone database in the current folder" OFF ) -option( BUILD_TESTS "Build Tests" OFF ) -option( RUN_TESTS "Build Tests" OFF ) if( USE_SYSTEM_TZ_DB ) add_definitions( -DUSE_AUTOLOAD=0 ) @@ -29,10 +27,6 @@ if( USE_TZ_DB_IN_DOT ) add_definitions( -DINSTALL=. ) endif( ) -if( RUN_TESTS ) - set( BUILD_TESTS ON ) -endif( ) - set( HEADER_FOLDER "include" ) set( SOURCE_FOLDER "src" ) set( TEST_FOLDER "test" ) @@ -58,10 +52,8 @@ target_link_libraries( tz ${CMAKE_THREAD_LIBS_INIT} ${OPTIONAL_LIBRARIES} ${CMAK install( TARGETS tz DESTINATION lib ) install( DIRECTORY ${HEADER_FOLDER}/ DESTINATION include/ ) -if( BUILD_TESTS ) - file( GLOB_RECURSE TEST_FILES ${TEST_FOLDER} *.cpp ) - foreach( CUR_TEST ${TEST_FILES} ) - MESSAGE(STATUS "Process file: ${CUR_TEST}") - endforeach( CUR_TEST ) -endif( ) - +add_custom_target( testit + COMMAND ./testit + WORKING_DIRECTORY ${TEST_FOLDER} + COMMENT "Run tests" +)