Revert "Fix cmake handling newer boost versions (Closes: #442)"
This reverts commit a0fce4257f.
			
			
				release/4.3a0
			
			
		
							parent
							
								
									bbf007e4e4
								
							
						
					
					
						commit
						b10963802c
					
				| 
						 | 
					@ -171,39 +171,22 @@ if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILE
 | 
				
			||||||
  message(FATAL_ERROR "Missing required Boost components >= v1.43, please install/upgrade Boost or configure your search paths.")
 | 
					  message(FATAL_ERROR "Missing required Boost components >= v1.43, please install/upgrade Boost or configure your search paths.")
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Allow for not using the timer libraries on boost < 1.48 (GTSAM timing code falls back to old timer library)
 | 
					 | 
				
			||||||
option(GTSAM_DISABLE_NEW_TIMERS "Disables using Boost.chrono for timing" OFF)
 | 
					option(GTSAM_DISABLE_NEW_TIMERS "Disables using Boost.chrono for timing" OFF)
 | 
				
			||||||
 | 
					# Allow for not using the timer libraries on boost < 1.48 (GTSAM timing code falls back to old timer library)
 | 
				
			||||||
# JLBC: This was once updated to target-based names (Boost::xxx), but it caused
 | 
					 | 
				
			||||||
# problems with Boost versions newer than FindBoost.cmake was prepared to handle,
 | 
					 | 
				
			||||||
# so we downgraded this to classic filenames-based variables, and manually adding
 | 
					 | 
				
			||||||
# the target_include_directories(xxx ${Boost_INCLUDE_DIR})
 | 
					 | 
				
			||||||
set(GTSAM_BOOST_LIBRARIES
 | 
					set(GTSAM_BOOST_LIBRARIES
 | 
				
			||||||
  optimized ${Boost_SERIALIZATION_LIBRARY_RELEASE}
 | 
					  Boost::serialization
 | 
				
			||||||
  optimized ${Boost_SYSTEM_LIBRARY_RELEASE}
 | 
					  Boost::system
 | 
				
			||||||
  optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE}
 | 
					  Boost::filesystem
 | 
				
			||||||
  optimized ${Boost_THREAD_LIBRARY_RELEASE}
 | 
					  Boost::thread
 | 
				
			||||||
  optimized ${Boost_DATE_TIME_LIBRARY_RELEASE}
 | 
					  Boost::date_time
 | 
				
			||||||
  optimized ${Boost_REGEX_LIBRARY_RELEASE}
 | 
					  Boost::regex
 | 
				
			||||||
  debug ${Boost_SERIALIZATION_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
  debug ${Boost_SYSTEM_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
  debug ${Boost_FILESYSTEM_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
  debug ${Boost_THREAD_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
  debug ${Boost_DATE_TIME_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
  debug ${Boost_REGEX_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
message(STATUS "GTSAM_BOOST_LIBRARIES: ${GTSAM_BOOST_LIBRARIES}")
 | 
					 | 
				
			||||||
if (GTSAM_DISABLE_NEW_TIMERS)
 | 
					if (GTSAM_DISABLE_NEW_TIMERS)
 | 
				
			||||||
    message("WARNING:  GTSAM timing instrumentation manually disabled")
 | 
					    message("WARNING:  GTSAM timing instrumentation manually disabled")
 | 
				
			||||||
    list_append_cache(GTSAM_COMPILE_DEFINITIONS_PUBLIC DGTSAM_DISABLE_NEW_TIMERS)
 | 
					    list_append_cache(GTSAM_COMPILE_DEFINITIONS_PUBLIC DGTSAM_DISABLE_NEW_TIMERS)
 | 
				
			||||||
else()
 | 
					else()
 | 
				
			||||||
    if(Boost_TIMER_LIBRARY)
 | 
					    if(Boost_TIMER_LIBRARY)
 | 
				
			||||||
      list(APPEND GTSAM_BOOST_LIBRARIES
 | 
					      list(APPEND GTSAM_BOOST_LIBRARIES Boost::timer Boost::chrono)
 | 
				
			||||||
        optimized ${Boost_TIMER_LIBRARY_RELEASE}
 | 
					 | 
				
			||||||
        optimized ${Boost_CHRONO_LIBRARY_RELEASE}
 | 
					 | 
				
			||||||
        debug ${Boost_TIMER_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
        debug ${Boost_CHRONO_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
    else()
 | 
					    else()
 | 
				
			||||||
      list(APPEND GTSAM_BOOST_LIBRARIES rt) # When using the header-only boost timer library, need -lrt
 | 
					      list(APPEND GTSAM_BOOST_LIBRARIES rt) # When using the header-only boost timer library, need -lrt
 | 
				
			||||||
      message("WARNING:  GTSAM timing instrumentation will use the older, less accurate, Boost timer library because boost older than 1.48 was found.")
 | 
					      message("WARNING:  GTSAM timing instrumentation will use the older, less accurate, Boost timer library because boost older than 1.48 was found.")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ file(GLOB cppunitlite_src "*.cpp")
 | 
				
			||||||
add_library(CppUnitLite STATIC ${cppunitlite_src} ${cppunitlite_headers})
 | 
					add_library(CppUnitLite STATIC ${cppunitlite_src} ${cppunitlite_headers})
 | 
				
			||||||
list(APPEND GTSAM_EXPORTED_TARGETS CppUnitLite)
 | 
					list(APPEND GTSAM_EXPORTED_TARGETS CppUnitLite)
 | 
				
			||||||
set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
 | 
					set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
 | 
				
			||||||
target_include_directories(CppUnitLite PUBLIC ${Boost_INCLUDE_DIR}) # boost/lexical_cast.h
 | 
					target_link_libraries(CppUnitLite PUBLIC Boost::boost) # boost/lexical_cast.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
gtsam_assign_source_folders("${cppunitlite_headers};${cppunitlite_src}") # MSVC project structure
 | 
					gtsam_assign_source_folders("${cppunitlite_headers};${cppunitlite_src}") # MSVC project structure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,11 +103,7 @@ message(STATUS "Building GTSAM - shared: ${BUILD_SHARED_LIBS}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# BUILD_SHARED_LIBS automatically defines static/shared libs:
 | 
					# BUILD_SHARED_LIBS automatically defines static/shared libs:
 | 
				
			||||||
add_library(gtsam ${gtsam_srcs})
 | 
					add_library(gtsam ${gtsam_srcs})
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Boost:
 | 
					 | 
				
			||||||
target_link_libraries(gtsam PUBLIC ${GTSAM_BOOST_LIBRARIES})
 | 
					target_link_libraries(gtsam PUBLIC ${GTSAM_BOOST_LIBRARIES})
 | 
				
			||||||
target_include_directories(gtsam PUBLIC ${Boost_INCLUDE_DIR})
 | 
					 | 
				
			||||||
# Other deps:
 | 
					 | 
				
			||||||
target_link_libraries(gtsam PUBLIC ${GTSAM_ADDITIONAL_LIBRARIES})
 | 
					target_link_libraries(gtsam PUBLIC ${GTSAM_ADDITIONAL_LIBRARIES})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Apply build flags:
 | 
					# Apply build flags:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,9 @@
 | 
				
			||||||
# Build/install Wrap
 | 
					# Build/install Wrap
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(WRAP_BOOST_LIBRARIES
 | 
					set(WRAP_BOOST_LIBRARIES
 | 
				
			||||||
  optimized
 | 
					  Boost::system
 | 
				
			||||||
    ${Boost_FILESYSTEM_LIBRARY_RELEASE}
 | 
					  Boost::filesystem
 | 
				
			||||||
    ${Boost_SYSTEM_LIBRARY_RELEASE}
 | 
					  Boost::thread
 | 
				
			||||||
    ${Boost_THREAD_LIBRARY_RELEASE}
 | 
					 | 
				
			||||||
  debug
 | 
					 | 
				
			||||||
    ${Boost_FILESYSTEM_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
    ${Boost_SYSTEM_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
    ${Boost_THREAD_LIBRARY_DEBUG}
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Allow for disabling serialization to handle errors related to Clang's linker
 | 
					# Allow for disabling serialization to handle errors related to Clang's linker
 | 
				
			||||||
| 
						 | 
					@ -30,8 +25,6 @@ endif()
 | 
				
			||||||
gtsam_apply_build_flags(wrap_lib)
 | 
					gtsam_apply_build_flags(wrap_lib)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_link_libraries(wrap_lib ${WRAP_BOOST_LIBRARIES})
 | 
					target_link_libraries(wrap_lib ${WRAP_BOOST_LIBRARIES})
 | 
				
			||||||
target_include_directories(wrap_lib PUBLIC ${Boost_INCLUDE_DIR})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
gtsam_assign_source_folders(${wrap_srcs} ${wrap_headers})
 | 
					gtsam_assign_source_folders(${wrap_srcs} ${wrap_headers})
 | 
				
			||||||
add_executable(wrap wrap.cpp)
 | 
					add_executable(wrap wrap.cpp)
 | 
				
			||||||
target_link_libraries(wrap PRIVATE wrap_lib)
 | 
					target_link_libraries(wrap PRIVATE wrap_lib)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue