Added minimum functions to be able to build libregexis024 and it's tests
This commit is contained in:
		
						commit
						d3fb753fb2
					
				
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| .idea/ | ||||
| # Never use CMAKE in production | ||||
| CMakeLists.txt | ||||
| cmake-build-debug/ | ||||
| 
 | ||||
							
								
								
									
										19
									
								
								README.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								README.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| Build system for libregexis024 | ||||
| 
 | ||||
| ABOUT | ||||
| 
 | ||||
| This is a build system in a form of header-only C++ library. It supports generation and installation of pkg-config files for your project. | ||||
| 
 | ||||
| INSTALLATION | ||||
| 
 | ||||
| You don't need to compile anything, this is a header-only library (more precisely, it is an only-one-file-kind library) | ||||
| 
 | ||||
| ./install.sh [header installation path] [pkg-config file path] | ||||
| 
 | ||||
| [header installation path] defaults to /usr/include | ||||
| [pkg-config file path] defaults to /usr/lib/pkgconfig/regexis024-build-system.h | ||||
| 
 | ||||
| HISTORY | ||||
| 
 | ||||
| One day I realized that make is a complete garbage, cmake is even worse, and shell scripting language is too hard to use to write anything complex. | ||||
| I had to invent my own build system for my project libregexis024. But regexis024_build_system can be used for any other C++ project just fine. | ||||
							
								
								
									
										31
									
								
								install.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										31
									
								
								install.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,31 @@ | ||||
| #!/bin/sh | ||||
| 
 | ||||
| H_FILE="regexis024_build_system.h" | ||||
| 
 | ||||
| if [ \! \( -f "$H_FILE" \) ]; then echo "Change cwd to root of build system source code root directory"; exit 1; fi | ||||
| 
 | ||||
| usage(){ | ||||
|     echo "Usage: ./install.sh [header installation dir path] [pkg-config file installation path]" | ||||
| } | ||||
| 
 | ||||
| if [ $# -gt 2 ]; then usage; exit 1; fi | ||||
| 
 | ||||
| H_INST_DIR="/usr/include" | ||||
| PC_INST_FILE="/usr/lib/pkgconfig/regexis024-build-system.pc" | ||||
| 
 | ||||
| if [ $# -ge 1 ]; then H_INST_DIR="$1"; fi | ||||
| if [ $# -ge 2 ]; then PC_INST_FILE="$2"; fi | ||||
| 
 | ||||
| cp "$H_FILE" "$H_INST_DIR/$H_FILE" | ||||
| 
 | ||||
| if [ $? != 0 ]; then echo "Can't install"; exit 1; fi | ||||
| 
 | ||||
| echo "Name: regexis024-build-system" > "$PC_INST_FILE" | ||||
| echo "Description: Cool C++ build system" >> "$PC_INST_FILE" | ||||
| 
 | ||||
| COOL_FLAGS="-Wall -pedantic -Wno-unused-variable -Wno-unused-but-set-variable -Werror=return-type -Wno-reorder" | ||||
| COOL_FLAGS="$COOL_FLAGS -D _GLIBCXX_DEBUG -D _POSIX_C_SOURCE=200809L" | ||||
| COOL_FLAGS="$COOL_FLAGS -g --std c++14" | ||||
| 
 | ||||
| echo "Cflags: $COOL_FLAGS -I $H_INST_DIR" >> "$PC_INST_FILE" | ||||
| 
 | ||||
							
								
								
									
										1342
									
								
								regexis024_build_system.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1342
									
								
								regexis024_build_system.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Gregory
						Gregory