Avoid building docs if cross-compiling or not top level.
This commit is contained in:
		
							parent
							
								
									aa6964bf3a
								
							
						
					
					
						commit
						176821f2f7
					
				| @ -491,7 +491,15 @@ endif() | ||||
| install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) | ||||
| 
 | ||||
| 
 | ||||
| option(EIGEN_BUILD_DOC "Enable creation of Eigen documentation" ON) | ||||
| # Avoid building docs if included from another project. | ||||
| # Building documentation requires creating and running executables on the host | ||||
| # platform.  We shouldn't do this if cross-compiling. | ||||
| if (${PROJECT_IS_TOP_LEVEL} AND NOT ${CMAKE_CROSSCOMPILING}) | ||||
|   set(EIGEN_BUILD_DOC_DEFAULT ON) | ||||
| else() | ||||
|   set(EIGEN_BUILD_DOC_DEFAULT OFF) | ||||
| endif() | ||||
| option(EIGEN_BUILD_DOC "Enable creation of Eigen documentation" ${EIGEN_BUILD_DOC_DEFAULT}) | ||||
| if(EIGEN_BUILD_DOC) | ||||
|   add_subdirectory(doc EXCLUDE_FROM_ALL) | ||||
| endif() | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Antonio Sánchez
						Antonio Sánchez