mirror of
				https://github.com/open-source-parsers/jsoncpp.git
				synced 2025-10-25 02:06:03 +02:00 
			
		
		
		
	ENH: Prevent cmake in source builds (#1091)
* ENH: Prevent cmake in source builds Building directly inside the root of the source tree can cause problems where the build intermediate files overwrite or conflict with the intended source code files. This modification identifies this problem and issues failure messages and suggestions to over come the problem with more robust build suggestion. Co-authored-by: Jordan Bayles <jophba@chromium.org>
This commit is contained in:
		
							
								
								
									
										9
									
								
								include/PreventInBuildInstalls.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								include/PreventInBuildInstalls.cmake
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| string(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX) | ||||
| string(TOLOWER "${ITK_BINARY_DIR}" _BUILD) | ||||
| if("${_PREFIX}" STREQUAL "${_BUILD}") | ||||
|   message(FATAL_ERROR | ||||
|     "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" | ||||
|     "  ${CMAKE_INSTALL_PREFIX}\n" | ||||
|     "This is not supported." | ||||
|     ) | ||||
| endif() | ||||
		Reference in New Issue
	
	Block a user
	 Hans Johnson
					Hans Johnson