mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 18:21:35 +01:00 
			
		
		
		
	perfect, dynamic libray suppart added
SOVERSION 1 used and requered except for windoof!
This commit is contained in:
		
							parent
							
								
									fe76a4416c
								
							
						
					
					
						commit
						0322f4eeed
					
				
					 4 changed files with 13 additions and 11 deletions
				
			
		|  | @ -1,6 +1,10 @@ | |||
| cmake_minimum_required(VERSION 3.14...3.19) | ||||
| 
 | ||||
| project(GreeterTests LANGUAGES CXX) | ||||
| project( | ||||
|   GreeterTests | ||||
|   VERSION 1 | ||||
|   LANGUAGES CXX | ||||
| ) | ||||
| 
 | ||||
| # ---- Options ---- | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,8 +2,6 @@ | |||
| #include <greeter/greeter.h> | ||||
| #include <greeter/version.h> | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| TEST_CASE("Greeter") { | ||||
|   using namespace greeter; | ||||
| 
 | ||||
|  | @ -17,8 +15,8 @@ TEST_CASE("Greeter") { | |||
| 
 | ||||
| TEST_CASE("Greeter version") { | ||||
| #if (__APPLE__ || __cpp_lib_starts_ends_with) | ||||
|   static_assert(std::string_view(GREETER_VERSION).starts_with("1.0"));  // TBD C++20 only
 | ||||
|   CHECK(std::string(GREETER_VERSION).starts_with("1.0"));               // SameMajorVersion
 | ||||
|   static_assert(std::string_view(GREETER_VERSION).starts_with("1"));  // TBD C++20 only
 | ||||
|   CHECK(std::string(GREETER_VERSION).starts_with("1"));               // SameMajorVersion
 | ||||
| #else | ||||
|   static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.0.1")); | ||||
|   CHECK(std::string(GREETER_VERSION) == std::string("1.0.1")); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue