diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index cf01cfa4f56fe20645babead96c2a9ce06863367..61b83c038d9391f1ab79390c66bf3aa63f3efe53 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -4,14 +4,15 @@ set(LIB_SOURCES ProjectData.cpp) # Library add_library(ApplicationsLib STATIC ${LIB_SOURCES}) -target_link_libraries(ApplicationsLib +target_link_libraries(ApplicationsLib INTERFACE GeoLib MeshGeoToolsLib ProcessLib ${CATALYST_LIBRARIES} + logog ) ADD_CATALYST_DEPENDENCY(ApplicationsLib) if(OGS_BUILD_GUI) - target_link_libraries(ApplicationsLib Qt4::QtCore) + target_link_libraries(ApplicationsLib PUBLIC Qt4::QtCore) endif() diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index 49062be1e36de59e6bdb1125672845aee023fe85..c69b369fcaf4a297b071e87f42dfcdb98ce08759 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -5,18 +5,20 @@ add_executable(ogs target_link_libraries(ogs ApplicationsLib - BaseLib FileIO - InSituLib - MeshLib - NumLib - ${Boost_LIBRARIES} - ${CATALYST_LIBRARIES} - Threads::Threads ) if(OGS_BUILD_GUI) - target_link_libraries(ogs QtDataView VtkVis vtkInteractionStyle Qt4::QtCore Qt4::QtGui Qt4::QtXml Qt4::QtNetwork) + target_link_libraries(ogs + QtDataView + QtStratView + VtkVis + vtkInteractionStyle + Qt4::QtCore + Qt4::QtGui + Qt4::QtXml + Qt4::QtNetwork + ) if(CMAKE_CROSSCOMPILING) target_link_libraries(ogs ${QT_XML_DEPS_LIBRARIES} diff --git a/Applications/DataExplorer/Base/CMakeLists.txt b/Applications/DataExplorer/Base/CMakeLists.txt index a86ef47ce4da8ac0b64e5a0e0fd464b2ed020782..0206bd3773e09d68794a05ac0b8805f4cb548496 100644 --- a/Applications/DataExplorer/Base/CMakeLists.txt +++ b/Applications/DataExplorer/Base/CMakeLists.txt @@ -12,16 +12,6 @@ set(SOURCES QValueTooltipSlider.cpp ) -# Moc headers -set(MOC_HEADERS - RecentFiles.h - TreeModel.h - ColorPickerPushButton.h - # modeltest.h # Not needed - CheckboxDelegate.h - QValueTooltipSlider.h -) - # Header files set(HEADERS LastSavedFileDirectory.h @@ -30,23 +20,24 @@ set(HEADERS TreeItem.h TreeModelIterator.h StrictDoubleValidator.h + RecentFiles.h + TreeModel.h + ColorPickerPushButton.h + # modeltest.h # Not needed + CheckboxDelegate.h + QValueTooltipSlider.h ) # Put moc files in a project folder source_group("UI Files" REGULAR_EXPRESSION "\\w*\\.ui") source_group("Moc Files" REGULAR_EXPRESSION "moc_.*") -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) - # Create the library add_library(QtBase STATIC ${SOURCES} ${HEADERS} - ${MOC_HEADERS} - ${MOC_SOURCES} ) -target_link_libraries(QtBase Qt4::QtGui) +target_link_libraries(QtBase PUBLIC Qt4::QtGui) set_property(TARGET QtBase PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/CMakeLists.txt b/Applications/DataExplorer/CMakeLists.txt index c4497ff132eea2edc9f14667b832c0208a656f75..41781bb03e5f9f40af894cb395903887cf9d74db 100644 --- a/Applications/DataExplorer/CMakeLists.txt +++ b/Applications/DataExplorer/CMakeLists.txt @@ -8,6 +8,10 @@ if(VTKOSGCONVERTER_FOUND) include_directories(${VTKOSGCONVERTER_INCLUDE_DIRS}) endif() +set(CMAKE_AUTOMOC TRUE) +set(CMAKE_AUTOUIC TRUE) +set(CMAKE_AUTORCC TRUE) + # Add subprojects add_subdirectory(Base) add_subdirectory(DataView/StratView) diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index e4bd1530f3572ecd0bd08c7cf71c7a9e9667eb06..f09823f1af802b3b546f8868ab71706e085d689a 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -3,31 +3,9 @@ set(SOURCES mainwindow.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/OGSFileConverter/OGSFileConverter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/OGSFileConverter/FileListDialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Img/icons.qrc ) -# Moc Header files -set(MOC_HEADERS - mainwindow.h - ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/OGSFileConverter/OGSFileConverter.h - ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/OGSFileConverter/FileListDialog.h -) - -# UI files -set(UIS - mainwindow.ui - ../Utils/OGSFileConverter/OGSFileConverter.ui - ../Utils/OGSFileConverter/FileList.ui -) - - -# Run Qts user interface compiler uic on .ui files -qt4_wrap_ui(UI_HEADERS ${UIS} ) - -qt4_add_resources(QTRESOURCES ./Img/icons.qrc ) - -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS} ) - # Include the headers which are generated by uic and moc # and include additional header set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../..) @@ -38,7 +16,6 @@ include_directories( ${SOURCE_DIR_REL}/FileIO ${SOURCE_DIR_REL}/MeshLib ${SOURCE_DIR_REL}/MeshLibGEOTOOLS - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/Base ${CMAKE_CURRENT_BINARY_DIR}/DataView ${CMAKE_CURRENT_BINARY_DIR}/DataView/StratView @@ -65,10 +42,6 @@ set(APP_ICON ${SOURCE_DIR_REL}/scripts/packaging/ogs-de-icon.icns) add_executable(DataExplorer MACOSX_BUNDLE main.cpp ${SOURCES} - ${MOC_HEADERS} - ${MOC_SOURCES} - ${UIS} - ${QTRESOURCES} ${APP_ICON} exe-icon.rc ) @@ -79,20 +52,12 @@ target_link_libraries(DataExplorer Qt4::QtXml Qt4::QtNetwork ApplicationsLib - BaseLib - GeoLib FileIO - InSituLib - MeshLib - QtBase QtDataView + QtDiagramView QtStratView VtkVis VtkAct - ${Boost_LIBRARIES} - ${CATALYST_LIBRARIES} - zlib - shp Threads::Threads ) diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt index bfcb7a8da0f24cbbf31896d434620e95b1cd254e..d0db6e67b6cee835fa680a4455ae197120930b32 100644 --- a/Applications/DataExplorer/DataView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/CMakeLists.txt @@ -39,8 +39,16 @@ set(SOURCES SurfaceExtractionDialog.cpp ) -# Moc Header files -set(MOC_HEADERS +# Header files +set(HEADERS + BaseItem.h + CondItem.h + DirectConditionGenerator.h + CondObjectListItem.h + GeoObjectListItem.h + GeoTreeItem.h + ModelTreeItem.h + MshItem.h ColorTableModel.h ColorTableView.h CondFromRasterDialog.h @@ -77,57 +85,12 @@ set(MOC_HEADERS SurfaceExtractionDialog.h ) -# Header files -set(HEADERS - BaseItem.h - CondItem.h - DirectConditionGenerator.h - CondObjectListItem.h - GeoObjectListItem.h - GeoTreeItem.h - ModelTreeItem.h - MshItem.h -) - -# UI files -set(UIS - CondFromRaster.ui - ConditionWriter.ui - DataExplorerSettings.ui - FEMConditionSetup.ui - GeoOnMeshMapping.ui - GeoTabWidgetBase.ui - GMSHPrefs.ui - License.ui - LinearEdit.ui - LineEdit.ui - MergeGeometries.ui - MeshAnalysis.ui - MeshQualitySelection.ui - MeshValueEdit.ui - ModellingTabWidgetBase.ui - MeshElementRemoval.ui - MeshLayerEdit.ui - MshTabWidgetBase.ui - NetCdfConfigure.ui - NewProcess.ui - SaveMesh.ui - StationTabWidgetBase.ui - SurfaceExtraction.ui -) - # Put filter in a folder source_group("Dialog Header Files" REGULAR_EXPRESSION "[.]*Dialog.h") source_group("Dialog Source Files" REGULAR_EXPRESSION "[.]*Dialog.cpp") source_group("Data Model Header Files" REGULAR_EXPRESSION "[.]*Item.h|[.]*Model.h|[.]*View.h") source_group("Data Model Source Files" REGULAR_EXPRESSION "[.]*Item.cpp|[.]*Model.cpp|[.]*View.cpp") -# Run Qts user interface compiler uic on .ui files -qt4_wrap_ui(UI_HEADERS ${UIS}) - -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) - # Include the headers which are generated by uic and moc # and include additional header @@ -135,7 +98,6 @@ set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../..) set(GUI_SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../Base - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/DiagramView ${CMAKE_CURRENT_BINARY_DIR}/StratView ${SOURCE_DIR_REL}/BaseLib @@ -144,7 +106,6 @@ include_directories( ${SOURCE_DIR_REL}/MeshGeoToolsLib ${SOURCE_DIR_REL}/MeshLib ${SOURCE_DIR_REL}/FileIO - ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/DiagramView ${CMAKE_CURRENT_SOURCE_DIR}/StratView ${GUI_SOURCE_DIR_REL}/Base @@ -168,29 +129,21 @@ source_group("Moc Files" REGULAR_EXPRESSION "moc_.*") add_library(QtDataView STATIC ${SOURCES} ${HEADERS} - ${MOC_HEADERS} - ${MOC_SOURCES} - #${UI_HEADERS} - ${UIS} ) # Link Qt library -target_link_libraries(QtDataView - Qt4::QtCore +target_link_libraries(QtDataView PUBLIC Qt4::QtCore Qt4::QtGui) +target_link_libraries(QtDataView INTERFACE FileIO - GeoLib - MeshLib QtBase - QtDiagramView - QtStratView - shp ) +add_dependencies(QtDataView QtDiagramView) include(AddCatalystDependency) ADD_CATALYST_DEPENDENCY(QtDataView) if(GEOTIFF_FOUND) - target_link_libraries( QtDataView ${GEOTIFF_LIBRARIES} ) + target_link_libraries( QtDataView INTERFACE ${GEOTIFF_LIBRARIES} ) endif () # GEOTIFF_FOUND set_property(TARGET QtDataView PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt index 9df92e614c8725a7cfb2b5e7ae9c5fc44016afd6..e16b72bf3fd6255cab3670bf6fedf1997e870f89 100644 --- a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt @@ -9,33 +9,17 @@ set(SOURCES QGraphicsGrid.cpp ) -# Moc Header files -set(MOC_HEADERS - DetailWindow.h - DiagramPrefsDialog.h - DiagramView.h -) - # Header files set(HEADERS DiagramList.h QArrow.h QGraphicsGrid.h DiagramScene.h + DetailWindow.h + DiagramPrefsDialog.h + DiagramView.h ) -# UI files -set(UIS - DetailWindow.ui - DiagramPrefs.ui -) - -# Run Qts user interface compiler uic on .ui files -qt4_wrap_ui(UI_HEADERS ${UIS}) - -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) - # Include the headers which are generated by uic and moc # and include additional header set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../../..) @@ -44,7 +28,6 @@ include_directories( ${SOURCE_DIR_REL}/BaseLib ${SOURCE_DIR_REL}/GeoLib ${SOURCE_DIR_REL}/MathLib - ${CMAKE_CURRENT_SOURCE_DIR} ${GUI_SOURCE_DIR_REL}/Base ${GUI_SOURCE_DIR_REL}/DataView ${CMAKE_CURRENT_BINARY_DIR}/../../DataView @@ -58,15 +41,9 @@ source_group("Moc Files" REGULAR_EXPRESSION moc_*) add_library(QtDiagramView STATIC ${SOURCES} ${HEADERS} - ${MOC_HEADERS} - ${MOC_SOURCES} - ${UI_HEADERS} ) # Link Qt library -target_link_libraries(QtDiagramView - Qt4::QtGui - GeoLib -) +target_link_libraries(QtDiagramView PUBLIC Qt4::QtGui) set_property(TARGET QtDiagramView PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt index ee464388472bd9bde84fc1d8dab8ba2318842b80..d2532d341e8d0d1ac87e38756db1355041ce4458 100644 --- a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt @@ -6,36 +6,19 @@ set(SOURCES StratWindow.cpp ) -# Moc Header files -set(MOC_HEADERS - StratView.h - StratWindow.h -) - # Header files set(HEADERS StratBar.h StratScene.h + StratView.h + StratWindow.h ) -# UI files -set(UIS - StratWindow.ui -) - -# Run Qts user interface compiler uic on .ui files -qt4_wrap_ui(UI_HEADERS ${UIS}) - -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) - # Include the headers which are generated by uic and moc # and include additional header set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../../..) set(GUI_SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../..) include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} ${SOURCE_DIR_REL}/BaseLib ${SOURCE_DIR_REL}/GeoLib ${SOURCE_DIR_REL}/MathLib @@ -50,17 +33,9 @@ source_group("Moc Files" REGULAR_EXPRESSION moc_*) add_library(QtStratView STATIC ${SOURCES} ${HEADERS} - ${MOC_HEADERS} - ${MOC_SOURCES} - ${UI_HEADERS} ) # Link Qt library -target_link_libraries(QtStratView - Qt4::QtGui - BaseLib - GeoLib - MathLib -) +target_link_libraries(QtStratView PUBLIC Qt4::QtGui) set_property(TARGET QtStratView PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/VtkAct/CMakeLists.txt b/Applications/DataExplorer/VtkAct/CMakeLists.txt index ed3648734475fc06e540a2c314ea936aa21c4541..1eeb6db75a56dc25b6c9d27db871da1c8268eaa8 100644 --- a/Applications/DataExplorer/VtkAct/CMakeLists.txt +++ b/Applications/DataExplorer/VtkAct/CMakeLists.txt @@ -4,22 +4,17 @@ set(SOURCES VtkCustomInteractorStyle.cpp ) -# Moc headers -set(MOC_HEADERS +# Headers +set(HEADERS VtkPickCallback.h VtkCustomInteractorStyle.h ) # Put moc files in a project folder -source_group("UI Files" REGULAR_EXPRESSION "\\w*\\.ui") source_group("Moc Files" REGULAR_EXPRESSION "moc_.*") -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../BaseLib ${CMAKE_CURRENT_SOURCE_DIR}/../../GeoLib ${CMAKE_CURRENT_SOURCE_DIR}/../../FileIO @@ -32,13 +27,13 @@ include_directories( # Create the library add_library( VtkAct STATIC ${SOURCES} - ${MOC_HEADERS} - ${MOC_SOURCES} + ${HEADERS} ) include(AddCatalystDependency) ADD_CATALYST_DEPENDENCY(VtkAct) -target_link_libraries( VtkAct Qt4::QtGui ) +target_link_libraries( VtkAct PUBLIC Qt4::QtCore ) +target_link_libraries( VtkAct INTERFACE ${CATALYST_LIBRARIES} ) set_property(TARGET VtkAct PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index ad3a74b1173c658ff3da837cd514f0ac75dc6bc9..fd011f61395d695b18e305733c94b01338580e4f 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -44,22 +44,6 @@ set(SOURCES VtkAlgorithmProperties.cpp ) -# Moc headers -set(MOC_HEADERS - MeshFromRasterDialog.h - QVtkDataSetMapper.h - VisPrefsDialog.h - VisualizationWidget.h - VtkAddFilterDialog.h - VtkAlgorithmProperties.h - VtkAlgorithmPropertyLineEdit.h - VtkAlgorithmPropertyCheckbox.h - VtkAlgorithmPropertyVectorEdit.h - VtkVisPipeline.h - VtkVisPipelineView.h - VtkVisTabWidget.h -) - # Header files set(HEADERS VtkAppendArrayFilter.h @@ -92,15 +76,18 @@ set(HEADERS VtkVisImageItem.h VtkVisPipelineItem.h VtkVisPointSetItem.h -) - -# UI files -set(UIS - MeshFromRaster.ui - VtkAddFilterDialogBase.ui - VtkVisTabWidgetBase.ui - VisualizationWidgetBase.ui - VisPrefs.ui + MeshFromRasterDialog.h + QVtkDataSetMapper.h + VisPrefsDialog.h + VisualizationWidget.h + VtkAddFilterDialog.h + VtkAlgorithmProperties.h + VtkAlgorithmPropertyLineEdit.h + VtkAlgorithmPropertyCheckbox.h + VtkAlgorithmPropertyVectorEdit.h + VtkVisPipeline.h + VtkVisPipelineView.h + VtkVisTabWidget.h ) # Put moc files in a project folder @@ -115,16 +102,9 @@ source_group("Filter Source Files" REGULAR_EXPRESSION "[.]*Filter.cpp") source_group("Source Header Files" REGULAR_EXPRESSION "[.]*Source.h") source_group("Source Source Files" REGULAR_EXPRESSION "[.]*Source.cpp") -# Run Qts user interface compiler uic on .ui files -qt4_wrap_ui(UI_HEADERS ${UIS}) - -# Run Qts meta object compiler moc on header files -qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) - set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../..) set(GUI_SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} ${SOURCE_DIR_REL}/BaseLib ${SOURCE_DIR_REL}/GeoLib ${SOURCE_DIR_REL}/MathLib @@ -134,7 +114,6 @@ include_directories( ${GUI_SOURCE_DIR_REL}/Base ${GUI_SOURCE_DIR_REL}/DataView - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../../BaseLib ${CMAKE_CURRENT_BINARY_DIR}/../DataView ) @@ -143,9 +122,6 @@ include_directories( add_library(VtkVis STATIC ${SOURCES} ${HEADERS} - ${MOC_HEADERS} - ${MOC_SOURCES} - ${UIS} ) include(AddCatalystDependency) @@ -153,12 +129,11 @@ ADD_CATALYST_DEPENDENCY(VtkVis) if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) - target_link_libraries(VtkVis ${GEOTIFF_LIBRARIES}) + target_link_libraries(VtkVis INTERFACE ${GEOTIFF_LIBRARIES}) endif() # GEOTIFF_FOUND -target_link_libraries(VtkVis Qt4::QtGui) - -add_dependencies(VtkVis QtDataView) +target_link_libraries(VtkVis PUBLIC Qt4::QtGui) +target_link_libraries(VtkVis INTERFACE VtkAct) if(VTKOSGCONVERTER_FOUND) USE_OPENSG(VtkVis) diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index cceae22bc39d1d66e98db55a120f3eb600925ea6..18616e2e4e6427d707694ac0c3e5cfb622c8af4f 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -13,113 +13,52 @@ if (QT4_FOUND) add_executable(ConvertSHPToGLI ConvertSHPToGLI.cpp) set_target_properties(ConvertSHPToGLI PROPERTIES FOLDER Utilities) - target_link_libraries(ConvertSHPToGLI - FileIO - GeoLib - BaseLib - shp - ${QT_LIBRARIES} - ) + target_link_libraries(ConvertSHPToGLI FileIO) add_executable(generateBCandGLI generateBCandGLI.cpp ) - target_link_libraries(generateBCandGLI - ApplicationsLib - FileIO - GeoLib - ${QT_LIBRARIES} - ) + target_link_libraries(generateBCandGLI FileIO) add_executable(generateBCFromPolyline generateBCFromPolyline.cpp ) - target_link_libraries(generateBCFromPolyline - ApplicationsLib - FileIO - GeoLib - ${QT_LIBRARIES} - ) + target_link_libraries(generateBCFromPolyline FileIO) set_target_properties(generateBCandGLI generateBCFromPolyline PROPERTIES FOLDER Utilities) add_executable(FEFLOW2OGS FEFLOW2OGS.cpp) set_target_properties(FEFLOW2OGS PROPERTIES FOLDER Utilities) - target_link_libraries(FEFLOW2OGS - GeoLib - MeshLib - FileIO - InSituLib - ${CATALYST_LIBRARIES} - ${QT_LIBRARIES} - ) + target_link_libraries(FEFLOW2OGS FileIO) ADD_CATALYST_DEPENDENCY(FEFLOW2OGS) endif () # QT4_FOUND add_executable(generateMatPropsFromMatID generateMatPropsFromMatID.cpp ) -target_link_libraries(generateMatPropsFromMatID - FileIO - MeshLib - logog - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(generateMatPropsFromMatID FileIO) ADD_CATALYST_DEPENDENCY(generateMatPropsFromMatID) set_target_properties(generateMatPropsFromMatID PROPERTIES FOLDER Utilities) add_executable(GMSH2OGS GMSH2OGS.cpp) set_target_properties(GMSH2OGS PROPERTIES FOLDER Utilities) -target_link_libraries(GMSH2OGS - MeshLib - FileIO - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(GMSH2OGS FileIO ) ADD_CATALYST_DEPENDENCY(GMSH2OGS) -if(MSVC) - target_link_libraries(GMSH2OGS winmm) -endif() add_executable(OGS2VTK OGS2VTK.cpp) set_target_properties(OGS2VTK PROPERTIES FOLDER Utilities) -target_link_libraries(OGS2VTK - MeshLib - FileIO - zlib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(OGS2VTK FileIO) ADD_CATALYST_DEPENDENCY(OGS2VTK) add_executable(VTK2OGS VTK2OGS.cpp) set_target_properties(VTK2OGS PROPERTIES FOLDER Utilities) -target_link_libraries(VTK2OGS - MeshLib - FileIO - zlib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(VTK2OGS FileIO) ADD_CATALYST_DEPENDENCY(VTK2OGS) add_executable(VTK2TIN VTK2TIN.cpp) set_target_properties(VTK2TIN PROPERTIES FOLDER Utilities) -target_link_libraries(VTK2TIN - MeshLib - FileIO - zlib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(VTK2TIN FileIO) ADD_CATALYST_DEPENDENCY(VTK2TIN) add_executable(TIN2VTK TIN2VTK.cpp) set_target_properties(TIN2VTK PROPERTIES FOLDER Utilities) -target_link_libraries(TIN2VTK - MeshLib - FileIO - zlib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(TIN2VTK FileIO) ADD_CATALYST_DEPENDENCY(TIN2VTK) #################### diff --git a/Applications/Utils/GeoTools/CMakeLists.txt b/Applications/Utils/GeoTools/CMakeLists.txt index 571e495b1d8c4aeb1484bae5fb099c598710eeea..d7a9effb4acaac41215e2ff2dbd671dd71e974ce 100644 --- a/Applications/Utils/GeoTools/CMakeLists.txt +++ b/Applications/Utils/GeoTools/CMakeLists.txt @@ -1,5 +1,4 @@ include_directories( - ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/BaseLib ${CMAKE_SOURCE_DIR}/GeoLib ${CMAKE_SOURCE_DIR}/FileIO @@ -8,12 +7,7 @@ include_directories( if(QT4_FOUND) add_executable(TriangulatePolyline TriangulatePolyline.cpp) - target_link_libraries(TriangulatePolyline - BaseLib - FileIO - MathLib - Qt4::QtCore - ) + target_link_libraries(TriangulatePolyline FileIO) set_target_properties(TriangulatePolyline PROPERTIES FOLDER Utilities) install(TARGETS TriangulatePolyline diff --git a/Applications/Utils/MeshEdit/CMakeLists.txt b/Applications/Utils/MeshEdit/CMakeLists.txt index 1bca0002be5609ef76394e5a57c6baf5843492bd..9c3ef3235741e4ea36f92f213528efcb45ea4c35 100644 --- a/Applications/Utils/MeshEdit/CMakeLists.txt +++ b/Applications/Utils/MeshEdit/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( - ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/BaseLib ${CMAKE_SOURCE_DIR}/GeoLib ${CMAKE_SOURCE_DIR}/FileIO @@ -13,155 +12,72 @@ include_directories( if(QT4_FOUND) add_executable(moveMeshNodes moveMeshNodes.cpp) - target_link_libraries(moveMeshNodes - BaseLib - FileIO - MathLib - MeshLib - InSituLib - ${CATALYST_LIBRARIES} - Qt4::QtCore - ) + target_link_libraries(moveMeshNodes FileIO) ADD_CATALYST_DEPENDENCY(moveMeshNodes) set_target_properties(moveMeshNodes PROPERTIES FOLDER Utilities) add_executable(MapGeometryToMeshSurface MapGeometryToMeshSurface.cpp ) - target_link_libraries(MapGeometryToMeshSurface - MeshLib - MeshGeoToolsLib - FileIO - InSituLib - ${CATALYST_LIBRARIES} - ) + target_link_libraries(MapGeometryToMeshSurface FileIO MeshGeoToolsLib) ADD_CATALYST_DEPENDENCY(MapGeometryToMeshSurface) set_target_properties(MapGeometryToMeshSurface PROPERTIES FOLDER Utilities) endif() # QT4_FOUND add_executable(removeMeshElements removeMeshElements.cpp) -target_link_libraries(removeMeshElements - BaseLib - FileIO - MathLib - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(removeMeshElements FileIO) ADD_CATALYST_DEPENDENCY(removeMeshElements) set_target_properties(removeMeshElements PROPERTIES FOLDER Utilities) add_executable(NodeReordering NodeReordering.cpp) -target_link_libraries(NodeReordering - FileIO - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(NodeReordering FileIO) ADD_CATALYST_DEPENDENCY(NodeReordering) set_target_properties(NodeReordering PROPERTIES FOLDER Utilities) add_executable(MoveMesh MoveMesh.cpp) -target_link_libraries(MoveMesh - FileIO - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(MoveMesh FileIO) ADD_CATALYST_DEPENDENCY(MoveMesh) set_target_properties(MoveMesh PROPERTIES FOLDER Utilities) add_executable(appendLinesAlongPolyline appendLinesAlongPolyline.cpp) -target_link_libraries(appendLinesAlongPolyline - BaseLib - FileIO - MathLib - MeshLib - MeshGeoToolsLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(appendLinesAlongPolyline FileIO MeshGeoToolsLib) ADD_CATALYST_DEPENDENCY(appendLinesAlongPolyline) set_target_properties(appendLinesAlongPolyline PROPERTIES FOLDER Utilities) add_executable(editMaterialID editMaterialID.cpp) -target_link_libraries(editMaterialID - BaseLib - FileIO - MathLib - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(editMaterialID FileIO) ADD_CATALYST_DEPENDENCY(editMaterialID) set_target_properties(editMaterialID PROPERTIES FOLDER Utilities) add_executable(checkMesh checkMesh.cpp) -target_link_libraries(checkMesh - BaseLib - FileIO - MathLib - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(checkMesh FileIO) ADD_CATALYST_DEPENDENCY(checkMesh) set_target_properties(checkMesh PROPERTIES FOLDER Utilities) add_executable(reviseMesh reviseMesh.cpp) -target_link_libraries (reviseMesh - BaseLib - FileIO - MathLib - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries (reviseMesh FileIO) ADD_CATALYST_DEPENDENCY(reviseMesh) set_target_properties(reviseMesh PROPERTIES FOLDER Utilities) add_executable(ResetPropertiesInPolygonalRegion ResetPropertiesInPolygonalRegion.cpp) -target_link_libraries(ResetPropertiesInPolygonalRegion - FileIO - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(ResetPropertiesInPolygonalRegion FileIO) set_target_properties(ResetPropertiesInPolygonalRegion PROPERTIES FOLDER Utilities) add_executable(AddTopLayer AddTopLayer.cpp) -target_link_libraries(AddTopLayer - FileIO - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(AddTopLayer FileIO) set_target_properties(AddTopLayer PROPERTIES FOLDER Utilities) add_executable(CreateBoundaryConditionsAlongPolylines CreateBoundaryConditionsAlongPolylines.cpp ) -target_link_libraries(CreateBoundaryConditionsAlongPolylines - BaseLib - FileIO - MathLib - MeshLib - MeshGeoToolsLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(CreateBoundaryConditionsAlongPolylines FileIO MeshGeoToolsLib) ADD_CATALYST_DEPENDENCY(CreateBoundaryConditionsAlongPolylines) set_target_properties(CreateBoundaryConditionsAlongPolylines PROPERTIES FOLDER Utilities) add_executable(queryMesh queryMesh.cpp) -target_link_libraries(queryMesh - FileIO - MeshLib - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(queryMesh FileIO) set_target_properties(queryMesh PROPERTIES FOLDER Utilities) #################### diff --git a/Applications/Utils/OGSFileConverter/CMakeLists.txt b/Applications/Utils/OGSFileConverter/CMakeLists.txt index 41632410e30a8843bde46518d89354142c6256de..24be26602a6b2f396f426af5b474b56549da9252 100644 --- a/Applications/Utils/OGSFileConverter/CMakeLists.txt +++ b/Applications/Utils/OGSFileConverter/CMakeLists.txt @@ -60,17 +60,7 @@ add_executable(OGSFileConverter ${UIS} ) -target_link_libraries(OGSFileConverter - ${QT_LIBRARIES} - ApplicationsLib - FileIO - GeoLib - MeshLib - QtDataView - VtkVis - InSituLib - ${CATALYST_LIBRARIES} -) +target_link_libraries(OGSFileConverter FileIO QtBase) ADD_CATALYST_DEPENDENCY(OGSFileConverter) # Adds useful macros and variables diff --git a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt index ad735a6b52ad706d9a6921b9bbedaa2ba19c8940..8d67ddb55f439b3c147f261e9026d59e6a473ead 100644 --- a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt +++ b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( - ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/BaseLib ${CMAKE_SOURCE_DIR}/FileIO ${CMAKE_SOURCE_DIR}/FileIO/Legacy @@ -14,40 +13,19 @@ if(OGS_BUILD_GUI) add_executable(generateStructuredQuadMesh generateStructuredQuadMesh.cpp) set_target_properties(generateStructuredQuadMesh PROPERTIES FOLDER Utils) - target_link_libraries(generateStructuredQuadMesh - MeshLib - FileIO - GeoLib - MathLib - VtkVis - ${CATALYST_LIBRARIES} - ${QT_LIBRARIES} - ) + target_link_libraries(generateStructuredQuadMesh FileIO) ADD_CATALYST_DEPENDENCY(generateStructuredQuadMesh) add_executable(createMeshElemPropertiesFromASCRaster createMeshElemPropertiesFromASCRaster.cpp) set_target_properties(createMeshElemPropertiesFromASCRaster PROPERTIES FOLDER Utils) - target_link_libraries(createMeshElemPropertiesFromASCRaster - MeshLib - FileIO - VtkVis - InSituLib - zlib - ${CATALYST_LIBRARIES} - ${QT_LIBRARIES} - ) + target_link_libraries(createMeshElemPropertiesFromASCRaster FileIO) ADD_CATALYST_DEPENDENCY(createMeshElemPropertiesFromASCRaster) endif() # OGS_BUILD_GUI (VtkVis-target is existing) add_executable(generateStructuredMesh generateStructuredMesh.cpp) -target_link_libraries(generateStructuredMesh - BaseLib - FileIO - MathLib - MeshLib -) +target_link_libraries(generateStructuredMesh FileIO) set_target_properties(generateStructuredMesh PROPERTIES FOLDER Utilities) #################### diff --git a/AssemblerLib/CMakeLists.txt b/AssemblerLib/CMakeLists.txt index 58c3980bb3cf9259cbaa3be97c33efb7a51be2f2..8c5769b87c5a05ffb7097fb2d7b5b6ee23e33be8 100644 --- a/AssemblerLib/CMakeLists.txt +++ b/AssemblerLib/CMakeLists.txt @@ -12,8 +12,3 @@ include_directories( ../MathLib ../MeshLib ) - -target_link_libraries(AssemblerLib - ${Boost_LIBRARIES} - MeshLib -) diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index 0bffc12fef64ff31b64afce5ecc76264bc561e5a..0a1d2912c988f277acd88d3f24d4b16c659ce10b 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -11,7 +11,10 @@ include_directories( . ) -target_link_libraries(BaseLib INTERFACE ${Boost_LIBRARIES}) +target_link_libraries(BaseLib INTERFACE + logog + ${Boost_LIBRARIES} +) if(MSVC) target_link_libraries(BaseLib INTERFACE WinMM) # needed for timeGetTime diff --git a/CMakeLists.txt b/CMakeLists.txt index afefa80dd209d3a49a5a31a802615ea8488f0a83..fdd16db595885c740e7788b6dab7043d631393f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,7 @@ include(scripts/cmake/Find.cmake) include(scripts/cmake/SubmoduleSetup.cmake) include(scripts/cmake/ProjectSetup.cmake) include(scripts/cmake/DocumentationSetup.cmake) -if(CMAKE_VERSION VERSION_GREATER 2.8.10) - include(scripts/cmake/test/Test.cmake) -endif() +include(scripts/cmake/test/Test.cmake) if(OGS_COVERAGE AND NOT IS_SUBPROJECT) include(scripts/cmake/Coverage.cmake) endif() @@ -154,9 +152,6 @@ add_subdirectory( MeshGeoToolsLib ) add_subdirectory( NumLib ) add_subdirectory( ProcessLib ) if( OGS_BUILD_TESTS AND NOT IS_SUBPROJECT ) - if(CMAKE_VERSION VERSION_LESS 2.8.11) - message(FATAL_ERROR "CMAKE 2.8.11 or higher is required to build the tests!") - endif() add_subdirectory( Tests ) if(OGS_USE_MPI) diff --git a/FileIO/CMakeLists.txt b/FileIO/CMakeLists.txt index b5a08d1f30bdcf7fc71537a7e0693b470bdd42c9..8a6e9daf818f8929358d8d4d68870d57493340bf 100644 --- a/FileIO/CMakeLists.txt +++ b/FileIO/CMakeLists.txt @@ -53,14 +53,16 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../BaseLib ) -target_link_libraries(FileIO +target_link_libraries(FileIO INTERFACE GeoLib + InSituLib MeshLib - zlib + logog shp + zlib ) if(QT4_FOUND) - target_link_libraries(FileIO Qt4::QtXml Qt4::QtXmlPatterns) + target_link_libraries(FileIO PUBLIC Qt4::QtXml Qt4::QtXmlPatterns) endif() ADD_CATALYST_DEPENDENCY(FileIO) diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index 62182b216778e9fc2f623572cc0d1067c9cdcc1e..00064260dd2ea5a5efc8d943b25e17183c4735c3 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -10,8 +10,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../MathLib ) -target_link_libraries(GeoLib +target_link_libraries(GeoLib INTERFACE BaseLib MathLib + logog ) diff --git a/InSituLib/CMakeLists.txt b/InSituLib/CMakeLists.txt index af06cdbca79f6032d3953d50e01a8eb15a66a827..472605a84ede78da41cdea3893fc0a6c70bc0135 100644 --- a/InSituLib/CMakeLists.txt +++ b/InSituLib/CMakeLists.txt @@ -12,17 +12,7 @@ add_library(InSituLib VtkMappedMeshSource.cpp ) -target_link_libraries(InSituLib - BaseLib - MeshLib - logog -) - -target_link_libraries(InSituLib - BaseLib - MeshLib - logog -) +target_link_libraries(InSituLib INTERFACE MeshLib ${CATALYST_LIBRARIES}) include(AddCatalystDependency) ADD_CATALYST_DEPENDENCY(InSituLib) diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index 09c09926eacad2654f32f30396d2fffba77c7e9e..36d2e7a3b62accab4c675b2162d473e179267bb7 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -74,15 +74,16 @@ add_library(MathLib STATIC ${SOURCES}) set_target_properties(MathLib PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(MathLib +target_link_libraries(MathLib INTERFACE GeoLib + logog ) if(LAPACK_FOUND) - target_link_libraries(MathLib ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) + target_link_libraries(MathLib INTERFACE ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) endif() if (LIS_FOUND) - target_link_libraries(MathLib ${LIS_LIBRARIES}) + target_link_libraries(MathLib INTERFACE ${LIS_LIBRARIES}) endif() diff --git a/MeshGeoToolsLib/CMakeLists.txt b/MeshGeoToolsLib/CMakeLists.txt index 76c8ffb69a4e72807f814a6360521e1c5565cb54..7d51b0efff5e4833b154a16c0cdc6b62f5af1943 100644 --- a/MeshGeoToolsLib/CMakeLists.txt +++ b/MeshGeoToolsLib/CMakeLists.txt @@ -12,10 +12,11 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../GeoLib ) -target_link_libraries(MeshGeoToolsLib +target_link_libraries(MeshGeoToolsLib INTERFACE BaseLib MathLib MeshLib GeoLib + logog ) diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index 0ce23cbf767f030bad9dfc145095127a68713dc7..ebce703a6b9df502b9fb73f5ab9502553d47dd9d 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -17,7 +17,7 @@ set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_ # Create the library add_library(MeshLib STATIC ${SOURCES}) -target_link_libraries(MeshLib +target_link_libraries(MeshLib INTERFACE BaseLib GeoLib MathLib diff --git a/NumLib/CMakeLists.txt b/NumLib/CMakeLists.txt index 6f25ae3e3569181b8eee34e6a6d317be09bdfcc5..dc446ffbb4bf5e83d769c55f9c496acbe28f5694 100644 --- a/NumLib/CMakeLists.txt +++ b/NumLib/CMakeLists.txt @@ -38,7 +38,7 @@ add_library(NumLib STATIC ${SOURCES}) set_target_properties(NumLib PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(NumLib +target_link_libraries(NumLib INTERFACE BaseLib GeoLib MathLib diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 552480006cb0dd1518a6ea93d9704d7fe5507c13..23349d2fb6feed729d7d1f5e3c4baeeeefbf91eb 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -3,8 +3,9 @@ GET_SOURCE_FILES(SOURCES) add_library(ProcessLib STATIC ${SOURCES}) -target_link_libraries(ProcessLib +target_link_libraries(ProcessLib INTERFACE AssemblerLib MeshLib MeshGeoToolsLib + logog ) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 438296035dc00cff605c8fa53dad8dac661d3d64..7c263e0515d99eaf6d5cf59f3d4fd43302a225d8 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -43,21 +43,13 @@ add_executable(testrunner testrunner.cpp ${TEST_SOURCES}) set_target_properties(testrunner PROPERTIES FOLDER Testing) target_link_libraries(testrunner - GTest ApplicationsLib AssemblerLib - BaseLib FileIO - GeoLib - InSituLib - MathLib - MeshLib MeshGeoToolsLib NumLib - logog - ${BOOST_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${CATALYST_LIBRARIES} + GTest + Threads::Threads ) ADD_CATALYST_DEPENDENCY(testrunner) @@ -72,6 +64,7 @@ endif() if(OGS_BUILD_GUI) target_link_libraries(testrunner QtDataView + QtStratView VtkVis vtkInteractionStyle ) diff --git a/ThirdParty/gtest/CMakeLists.txt b/ThirdParty/gtest/CMakeLists.txt index e1e88d24158b2ac64e4909e42d5a963d34ae9db5..b4edeff3698b2564f26e68f128b0b7313c36d272 100644 --- a/ThirdParty/gtest/CMakeLists.txt +++ b/ThirdParty/gtest/CMakeLists.txt @@ -10,7 +10,7 @@ else () add_definitions (-DGTEST_HAS_PTHREAD=0) endif () -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) add_library (GTest src/gtest-all.cc) set_target_properties(GTest PROPERTIES FOLDER Testing) diff --git a/scripts/cmake/CMakeSetup.cmake b/scripts/cmake/CMakeSetup.cmake index eec1f587ff4a95fbefaf5d7ead1db766dea57287..158c797a2620e8c5efa0ddd6f77147353644b91a 100644 --- a/scripts/cmake/CMakeSetup.cmake +++ b/scripts/cmake/CMakeSetup.cmake @@ -71,3 +71,5 @@ if(APPLE) endif() endif() mark_as_advanced(OSX_VERSION OSX_VERSION_NAME) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/scripts/cmake/cmake/FindBLAS.cmake b/scripts/cmake/cmake/FindBLAS.cmake deleted file mode 100644 index 8e273e397b0361c969e90e74251455c367d8cb21..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/FindBLAS.cmake +++ /dev/null @@ -1,462 +0,0 @@ -# - Find BLAS library -# This module finds an installed fortran library that implements the BLAS -# linear-algebra interface (see http://www.netlib.org/blas/). -# The list of libraries searched for is taken -# from the autoconf macro file, acx_blas.m4 (distributed at -# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). -# -# This module sets the following variables: -# BLAS_FOUND - set to true if a library implementing the BLAS interface -# is found -# BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l -# and -L). -# BLAS_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use BLAS -# BLAS95_LIBRARIES - uncached list of libraries (using full path name) -# to link against to use BLAS95 interface -# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface -# is found -# BLA_STATIC if set on this determines what kind of linkage we do (static) -# BLA_VENDOR if set checks only the specified vendor, if not set checks -# all the possibilities -# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK -########## -### List of vendors (BLA_VENDOR) valid in this module -## ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), -## Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic -# C/CXX should be enabled to use Intel mkl - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - -get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) -include(CheckFunctionExists) - -macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads) -# This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the -# Check_Fortran_Function_Exists macro) whether can link against that library -# combination using the name of a routine given by _name using the linker -# flags given by _flags. If the combination of libraries is found and passes -# the link test, LIBRARIES is set to the list of complete library paths that -# have been found. Otherwise, LIBRARIES is set to FALSE. - -# N.B. _prefix is the prefix applied to the names of all cached variables that -# are generated internally and marked advanced by this macro. - -set(_libraries_work TRUE) -set(${LIBRARIES}) -set(_combined_name) -foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - if ( WIN32 ) - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ENV LIB - ) - endif () - - if ( APPLE ) - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH - ) - - else () - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH - ) - endif() - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif() -endforeach() -if(_libraries_work) - # Test this combination of libraries. - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads}) - #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - set(CMAKE_REQUIRED_LIBRARIES) - mark_as_advanced(${_prefix}${_combined_name}_WORKS) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) -endif() -if(NOT _libraries_work) - set(${LIBRARIES} FALSE) -endif() -#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endmacro() - -set(BLAS_LINKER_FLAGS) -set(BLAS_LIBRARIES) -set(BLAS95_LIBRARIES) -if ($ENV{BLA_VENDOR} MATCHES ".+") - set(BLA_VENDOR $ENV{BLA_VENDOR}) -else () - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif() -endif () - -if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "cblas;f77blas;atlas" - "" - ) - endif() -endif () - -# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "sgemm;dgemm;blas" - "" - ) - endif() -endif () - -# BLAS in Alpha CXML library? -if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "cxml" - "" - ) - endif() -endif () - -# BLAS in Alpha DXML library? (now called CXML, see above) -if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "dxml" - "" - ) - endif() -endif () - -# BLAS in Sun Performance library? -if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "-xlic_lib=sunperf" - "sunperf;sunmath" - "" - ) - if(BLAS_LIBRARIES) - set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") - endif() - endif() -endif () - -# BLAS in SCSL library? (SGI/Cray Scientific Library) -if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "scsl" - "" - ) - endif() -endif () - -# BLAS in SGIMATH library? -if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "complib.sgimath" - "" - ) - endif() -endif () - -# BLAS in IBM ESSL library? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "essl;blas" - "" - ) - endif() -endif () - -#BLAS in acml library? -if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml_mp;acml_mv" - "" - ) - endif() -endif () - -# Apple BLAS library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "Accelerate" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT BLAS_LIBRARIES ) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "vecLib" - "" - ) - endif () -endif () -# Generic BLAS library? -if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "blas" - "" - ) - endif() -endif () - -#BLAS in intel mkl 10 library? (em64t 64bit) -if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") - if (NOT WIN32) - set(LM "-lm") - endif () - if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) - if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - find_package(Threads) - else() - find_package(Threads REQUIRED) - endif() - if (WIN32) - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40" - "" - ) - endif() - else() - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - SGEMM - "" - "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40" - "" - ) - endif() - endif() - else() - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - else() - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_intel;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT}" - "${LM}" - ) - endif() - endif() - endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - else() - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - endif() - endif () - endif () - #older vesions of intel mkl libs - # BLAS in intel mkl library? (shared) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - #BLAS in intel mkl library? (static, 32bit) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_ia32;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - #BLAS in intel mkl library? (static, em64t 64bit) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_em64t;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif() - endif () -endif () - - -if(BLA_F95) - if(BLAS95_LIBRARIES) - set(BLAS95_FOUND TRUE) - else() - set(BLAS95_FOUND FALSE) - endif() - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS95_FOUND) - message(STATUS "A library with BLAS95 API found.") - else() - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS95 API not found. Please specify library location.") - else() - message(STATUS - "A library with BLAS95 API not found. Please specify library location.") - endif() - endif() - endif() - set(BLAS_FOUND TRUE) - set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") -else() - if(BLAS_LIBRARIES) - set(BLAS_FOUND TRUE) - else() - set(BLAS_FOUND FALSE) - endif() - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS_FOUND) - message(STATUS "A library with BLAS API found.") - else() - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS API not found. Please specify library location." - ) - else() - message(STATUS - "A library with BLAS API not found. Please specify library location." - ) - endif() - endif() - endif() -endif() diff --git a/scripts/cmake/cmake/FindLAPACK.cmake b/scripts/cmake/cmake/FindLAPACK.cmake deleted file mode 100644 index 9fb8ae33422e2ec5614d8b609197c308613312a9..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/FindLAPACK.cmake +++ /dev/null @@ -1,308 +0,0 @@ -# - Find LAPACK library -# This module finds an installed fortran library that implements the LAPACK -# linear-algebra interface (see http://www.netlib.org/lapack/). -# -# The approach follows that taken for the autoconf macro file, acx_lapack.m4 -# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). -# -# This module sets the following variables: -# LAPACK_FOUND - set to true if a library implementing the LAPACK interface -# is found -# LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l -# and -L). -# LAPACK_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use LAPACK -# LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use LAPACK95 -# LAPACK95_FOUND - set to true if a library implementing the LAPACK f95 -# interface is found -# BLA_STATIC if set on this determines what kind of linkage we do (static) -# BLA_VENDOR if set checks only the specified vendor, if not set checks -# all the possibilities -# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK -### List of vendors (BLA_VENDOR) valid in this module -## Intel(mkl), ACML,Apple, NAS, Generic - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) -if (NOT _LANGUAGES_ MATCHES Fortran) -include(CheckFunctionExists) -else () -include(CheckFortranFunctionExists) -endif () - -set(LAPACK_FOUND FALSE) -set(LAPACK95_FOUND FALSE) - -macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) -# This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the -# Check_Fortran_Function_Exists macro) whether can link against that library -# combination using the name of a routine given by _name using the linker -# flags given by _flags. If the combination of libraries is found and passes -# the link test, LIBRARIES is set to the list of complete library paths that -# have been found. Otherwise, LIBRARIES is set to FALSE. - -# N.B. _prefix is the prefix applied to the names of all cached variables that -# are generated internally and marked advanced by this macro. - -set(_libraries_work TRUE) -set(${LIBRARIES}) -set(_combined_name) -foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - if (WIN32) - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ENV LIB - ) - endif () - - if(APPLE) - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH - ) - else() - if(BLA_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so") - endif() - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH - ) - endif() - - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif() -endforeach() - -if(_libraries_work) - # Test this combination of libraries. - if(UNIX AND BLA_STATIC) - set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas};-Wl,--end-group" ${_threads}) - else() - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads}) - endif() -# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - if (NOT _LANGUAGES_ MATCHES Fortran) - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - else () - check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) - endif () - set(CMAKE_REQUIRED_LIBRARIES) - mark_as_advanced(${_prefix}${_combined_name}_WORKS) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) - #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endif() - - if(_libraries_work) - set(${LIBRARIES} ${${LIBRARIES}} ${_blas}) - else() - set(${LIBRARIES} FALSE) - endif() - -endmacro() - - -set(LAPACK_LINKER_FLAGS) -set(LAPACK_LIBRARIES) -set(LAPACK95_LIBRARIES) - -if(LAPACK_FIND_QUIETLY) - if(LAPACK_FIND_REQUIRED) - find_package(BLAS QUIET REQUIRED) - else() - find_package(BLAS QUIET) - endif() -else() - if(LAPACK_FIND_REQUIRED) - find_package(BLAS REQUIRED) - else() - find_package(BLAS) - endif() -endif() - -if(BLAS_FOUND) - set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) - if ($ENV{BLA_VENDOR} MATCHES ".+") - set(BLA_VENDOR $ENV{BLA_VENDOR}) - else () - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif() - endif () -#acml lapack - if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "acml;acml_mv" - "" - "" - ) - endif() - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "acml_mp;acml_mv" - "" - "" - ) - endif() - endif () - -# Apple LAPACK library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "Accelerate" - "${BLAS_LIBRARIES}" - "" - ) - endif() -endif () -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "vecLib" - "${BLAS_LIBRARIES}" - "" - ) - endif () -endif () -# Generic LAPACK library? -if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "lapack" - "${BLAS_LIBRARIES}" - "" - ) - endif () -endif () -#intel lapack - if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") - if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) - if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_PACKAGE(Threads) - else() - find_package(Threads REQUIRED) - endif() - if (BLA_F95) - if(NOT LAPACK95_LIBRARIES) - check_lapack_libraries( - LAPACK95_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack95" - "${BLAS95_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT}" - ) - endif() - else() - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack" - "${BLAS_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT}" - ) - endif() - endif() - endif () - endif() -else() - message(STATUS "LAPACK requires BLAS") -endif() - -if(BLA_F95) - if(LAPACK95_LIBRARIES) - set(LAPACK95_FOUND TRUE) - else() - set(LAPACK95_FOUND FALSE) - endif() - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK95_FOUND) - message(STATUS "A library with LAPACK95 API found.") - else() - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK95 API not found. Please specify library location." - ) - else() - message(STATUS - "A library with LAPACK95 API not found. Please specify library location." - ) - endif() - endif() - endif() - set(LAPACK_FOUND "${LAPACK95_FOUND}") - set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") -else() - if(LAPACK_LIBRARIES) - set(LAPACK_FOUND TRUE) - else() - set(LAPACK_FOUND FALSE) - endif() - - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK_FOUND) - message(STATUS "A library with LAPACK API found.") - else() - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK API not found. Please specify library location." - ) - else() - message(STATUS - "A library with LAPACK API not found. Please specify library location." - ) - endif() - endif() - endif() -endif() diff --git a/scripts/cmake/cmake/FindLAPACKLibs.cmake b/scripts/cmake/cmake/FindLAPACKLibs.cmake deleted file mode 100644 index 51d0c41dd2a630f691405dd1a7caa4ac3ff347aa..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/FindLAPACKLibs.cmake +++ /dev/null @@ -1,91 +0,0 @@ -# - Try to find LAPACK and BLAS libraries -# Once done, this will define -# LAPACKLIBS_LIBRARIES, all libraries to link against -# LAPACKLIBS_FOUND, If false, do not try to use LAPACK library features. -# -# Users may wish to set: -# LAPACKLIBS_ROOT_DIR, location to start searching for LAPACK libraries -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(_check) - -set(LAPACKLIBS_ROOT_DIR - "${LAPACKLIBS_ROOT_DIR}" - CACHE - PATH - "Directory to search for LAPACK libraries") - -if(APPLE) - find_library(LAPACKLIBS_VECLIB_FRAMEWORK veclib) - find_library(LAPACKLIBS_ACCELERATE_FRAMEWORK accelerate) - mark_as_advanced(LAPACKLIBS_VECLIB_FRAMEWORK - LAPACKLIBS_ACCELERATE_FRAMEWORK) - - set(LAPACKLIBS_LIBRARIES - "${LAPACKLIBS_VECLIB_FRAMEWORK}" - "${LAPACKLIBS_ACCELERATE_FRAMEWORK}") - list(APPEND - _check - LAPACKLIBS_VECLIB_FRAMEWORK - LAPACKLIBS_ACCELERATE_FRAMEWORK) -elseif(WIN32) - # Tested to work with the files from http://www.fi.muni.cz/~xsvobod2/misc/lapack/ - # You might also see http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html for - # the libraries and headers. - - # Good luck! - - find_library(LAPACKLIBS_LAPACK_LIBRARY - NAMES - lapack_win32_MT - lapack - lapackd - HINTS - ${LAPACKLIBS_ROOT_DIR} - PATH_SUFFIXES - lapack-MT-release - lapack-MT-debug - lib) - find_library(LAPACKLIBS_BLAS_LIBRARY - NAMES - blas_win32_MT - blas - blasd - HINTS - ${LAPACKLIBS_ROOT_DIR} - PATH_SUFFIXES - lapack-MT-release - lapack-MT-debug - lib) - set(LAPACKLIBS_LIBRARIES - "${LAPACKLIBS_LAPACK_LIBRARY}" - "${LAPACKLIBS_BLAS_LIBRARY}") - list(APPEND _check LAPACKLIBS_LAPACK_LIBRARY LAPACKLIBS_BLAS_LIBRARY) -elseif(UNIX) - # All other Linux/Unix should have lapack without a fuss - list(APPEND _check LAPACKLIBS_LAPACK_LIBRARY) - find_library(LAPACKLIBS_LAPACK_LIBRARY lapack) - set(LAPACKLIBS_LIBRARIES "${LAPACKLIBS_LAPACK_LIBRARY}") -endif() - -# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LAPACKLibs - DEFAULT_MSG - ${_check}) - -if(LAPACKLIBS_FOUND) - mark_as_advanced(LAPACKLIBS_ROOT_DIR - LAPACKLIBS_LAPACK_LIBRARY - LAPACKLIBS_BLAS_LIBRARY) -endif() diff --git a/scripts/cmake/cmake/FindVRPN.cmake b/scripts/cmake/cmake/FindVRPN.cmake deleted file mode 100644 index b2dabc6c086db76ae19c4f07bdfca20439f22840..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/FindVRPN.cmake +++ /dev/null @@ -1,124 +0,0 @@ -# - try to find VRPN library -# -# Cache Variables: -# VRPN_LIBRARY -# VRPN_SERVER_LIBRARY -# VRPN_INCLUDE_DIR -# -# Non-cache variables you might use in your CMakeLists.txt: -# VRPN_FOUND -# VRPN_SERVER_LIBRARIES -# VRPN_LIBRARIES -# VRPN_INCLUDE_DIRS -# -# VRPN_ROOT_DIR is searched preferentially for these files -# -# Requires these CMake modules: -# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(VRPN_ROOT_DIR - "${VRPN_ROOT_DIR}" - CACHE - PATH - "Root directory to search for VRPN") - -if("${CMAKE_SIZEOF_VOID_P}" MATCHES "8") - set(_libsuffixes lib64 lib) - - # 64-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _progfiles) -else() - set(_libsuffixes lib) - if(NOT "$ENV{ProgramFiles(x86)}" STREQUAL "") - # 32-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _progfiles) - else() - # 32-bit dir on win32, useless to us on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles) - endif() -endif() - -### -# Configure VRPN -### - -find_path(VRPN_INCLUDE_DIR - NAMES - vrpn_Connection.h - PATH_SUFFIXES - include - include/vrpn - HINTS - "${VRPN_ROOT_DIR}" - PATHS - "${_progfiles}/VRPN") - -find_library(VRPN_LIBRARY - NAMES - vrpn - PATH_SUFFIXES - ${_libsuffixes} - HINTS - "${VRPN_ROOT_DIR}" - PATHS - "${_progfiles}/VRPN") - -find_library(VRPN_SERVER_LIBRARY - NAMES - vrpnserver - PATH_SUFFIXES - ${_libsuffixes} - HINTS - "${VRPN_ROOT_DIR}" - PATHS - "${_progfiles}/VRPN") - -### -# Dependencies -### -set(_deps_libs) -set(_deps_includes) -set(_deps_check) - -find_package(quatlib) -list(APPEND _deps_libs ${QUATLIB_LIBRARIES}) -list(APPEND _deps_includes ${QUATLIB_INCLUDE_DIRS}) -list(APPEND _deps_check QUATLIB_FOUND) - -if(NOT WIN32) - find_package(Threads) - list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) - list(APPEND _deps_check CMAKE_HAVE_THREADS_LIBRARY) -endif() - - -# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(VRPN - DEFAULT_MSG - VRPN_LIBRARY - VRPN_INCLUDE_DIR - ${_deps_check}) - -if(VRPN_FOUND) - set(VRPN_INCLUDE_DIRS "${VRPN_INCLUDE_DIR}" ${_deps_includes}) - set(VRPN_LIBRARIES "${VRPN_LIBRARY}" ${_deps_libs}) - set(VRPN_SERVER_LIBRARIES "${VRPN_SERVER_LIBRARY}" ${_deps_libs}) - - mark_as_advanced(VRPN_ROOT_DIR) -endif() - -mark_as_advanced(VRPN_LIBRARY - VRPN_SERVER_LIBRARY - VRPN_INCLUDE_DIR) diff --git a/scripts/cmake/cmake/Findquatlib.cmake b/scripts/cmake/cmake/Findquatlib.cmake deleted file mode 100644 index 578d6d2e099215015c653cd5fe1825fbf33af17f..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/Findquatlib.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# - Find quatlib -# Find the quatlib headers and libraries. -# -# QUATLIB_INCLUDE_DIRS - where to find quat.h -# QUATLIB_LIBRARIES - List of libraries when using quatlib. -# QUATLIB_FOUND - True if quatlib found. -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -if(TARGET quat) - # Look for the header file. - find_path(QUATLIB_INCLUDE_DIR NAMES quat.h - PATHS ${quatlib_SOURCE_DIR}) - - set(QUATLIB_LIBRARY "quat") - -else() - set(QUATLIB_ROOT_DIR - "${QUATLIB_ROOT_DIR}" - CACHE - PATH - "Root directory to search for quatlib") - if(DEFINED VRPN_ROOT_DIR AND NOT QUATLIB_ROOT_DIR) - set(QUATLIB_ROOT_DIR "${VRPN_ROOT_DIR}") - mark_as_advanced(QUATLIB_ROOT_DIR) - endif() - - if("${CMAKE_SIZEOF_VOID_P}" MATCHES "8") - set(_libsuffixes lib64 lib) - - # 64-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _progfiles) - else() - set(_libsuffixes lib) - if(NOT "$ENV{ProgramFiles(x86)}" STREQUAL "") - # 32-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _progfiles) - else() - # 32-bit dir on win32, useless to us on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles) - endif() - endif() - - # Look for the header file. - find_path(QUATLIB_INCLUDE_DIR - NAMES - quat.h - HINTS - "${QUATLIB_ROOT_DIR}" - PATH_SUFFIXES - include - PATHS - "${_progfiles}/VRPN" - "${_progfiles}/quatlib") - - # Look for the library. - find_library(QUATLIB_LIBRARY - NAMES - quat.lib - libquat.a - HINTS - "${QUATLIB_ROOT_DIR}" - PATH_SUFFIXES - ${_libsuffixes} - PATHS - "${_progfiles}/VRPN" - "${_progfiles}/quatlib") -endif() - -# handle the QUIETLY and REQUIRED arguments and set QUATLIB_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(quatlib - DEFAULT_MSG - QUATLIB_LIBRARY - QUATLIB_INCLUDE_DIR) - -if(QUATLIB_FOUND) - set(QUATLIB_LIBRARIES ${QUATLIB_LIBRARY}) - if(NOT WIN32) - list(APPEND QUATLIB_LIBRARIES m) - endif() - set(QUATLIB_INCLUDE_DIRS ${QUATLIB_INCLUDE_DIR}) - - mark_as_advanced(QUATLIB_ROOT_DIR) -else() - set(QUATLIB_LIBRARIES) - set(QUATLIB_INCLUDE_DIRS) -endif() - -mark_as_advanced(QUATLIB_LIBRARY QUATLIB_INCLUDE_DIR) diff --git a/scripts/cmake/cmake/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake b/scripts/cmake/cmake/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake deleted file mode 100644 index c6c4067f9857a547961b7d4ed3db7a83fc9f1a5e..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake +++ /dev/null @@ -1,108 +0,0 @@ -# select_library_configurations( basename ) -# -# This macro takes a library base name as an argument, and will choose good -# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and -# basename_LIBRARY_RELEASE depending on what has been found and set. If only -# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, -# and basename_LIBRARY_RELEASE will be set to the release value. If only -# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, -# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. -# -# If the generator supports configuration types, then basename_LIBRARY and -# basename_LIBRARIES will be set with debug and optimized flags specifying the -# library to be used for the given configuration. If no build type has been set -# or the generator in use does not support configuration types, then -# basename_LIBRARY and basename_LIBRARIES will take only the release values. - -#============================================================================= -# Copyright 2009 Kitware, Inc. -# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com> -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see below. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= -# This macro was adapted from the FindQt4 CMake module and is maintained by Will -# Dicharry <wdicharry@stellarscience.com>. - -# Utility macro to check if one variable exists while another doesn't, and set -# one that doesn't exist to the one that exists. -macro( _set_library_name basename GOOD BAD ) - if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} ) - set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} ) - set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} ) - set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} ) - endif() -endmacro() - -macro( select_library_configurations basename ) - # if only the release version was found, set the debug to be the release - # version. - _set_library_name( ${basename} RELEASE DEBUG ) - # if only the debug version was found, set the release value to be the - # debug value. - _set_library_name( ${basename} DEBUG RELEASE ) - if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) - # if the generator supports configuration types or CMAKE_BUILD_TYPE - # is set, then set optimized and debug options. - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( ${basename}_LIBRARY - optimized ${${basename}_LIBRARY_RELEASE} - debug ${${basename}_LIBRARY_DEBUG} ) - set( ${basename}_LIBRARIES - optimized ${${basename}_LIBRARY_RELEASE} - debug ${${basename}_LIBRARY_DEBUG} ) - else() - # If there are no configuration types or build type, just use - # the release version - set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) - set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} ) - endif() - endif() - - set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH - "The ${basename} library" ) - - if( ${basename}_LIBRARY ) - set( ${basename}_FOUND TRUE ) - endif() - - mark_as_advanced( ${basename}_LIBRARY - ${basename}_LIBRARY_RELEASE - ${basename}_LIBRARY_DEBUG - ) -endmacro() - diff --git a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake b/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake deleted file mode 100644 index 0c5aaf4e0c4103a9b0b2402682cbe7ae35b3dbbd..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake +++ /dev/null @@ -1,363 +0,0 @@ -# - Configure a project for testing with CTest/CDash -# Include this module in the top CMakeLists.txt file of a project to -# enable testing with CTest and dashboard submissions to CDash: -# project(MyProject) -# ... -# include(CTest) -# The module automatically creates a BUILD_TESTING option that selects -# whether to enable testing support (ON by default). After including -# the module, use code like -# if(BUILD_TESTING) -# # ... CMake code to create tests ... -# endif() -# to creating tests when testing is enabled. -# -# To enable submissions to a CDash server, create a CTestConfig.cmake -# file at the top of the project with content such as -# set(CTEST_PROJECT_NAME "MyProject") -# set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") -# set(CTEST_DROP_METHOD "http") -# set(CTEST_DROP_SITE "my.cdash.org") -# set(CTEST_DROP_LOCATION "/submit.php?project=MyProject") -# set(CTEST_DROP_SITE_CDASH TRUE) -# (the CDash server can provide the file to a project administrator -# who configures 'MyProject'). -# Settings in the config file are shared by both this CTest module and -# the CTest command-line tool's dashboard script mode (ctest -S). -# -# While building a project for submission to CDash, CTest scans the -# build output for errors and warnings and reports them with -# surrounding context from the build log. This generic approach works -# for all build tools, but does not give details about the command -# invocation that produced a given problem. One may get more detailed -# reports by adding -# set(CTEST_USE_LAUNCHERS 1) -# to the CTestConfig.cmake file. When this option is enabled, the -# CTest module tells CMake's Makefile generators to invoke every -# command in the generated build system through a CTest launcher -# program. (Currently the CTEST_USE_LAUNCHERS option is ignored on -# non-Makefile generators.) During a manual build each launcher -# transparently runs the command it wraps. During a CTest-driven -# build for submission to CDash each launcher reports detailed -# information when its command fails or warns. -# (Setting CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but -# also adds the launcher overhead even for manual builds. One may -# instead set it in a CTest dashboard script and add it to the CMake -# cache for the build tree.) - -#============================================================================= -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see below. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -option(BUILD_TESTING "Build the testing tree." ON) - -# function to turn generator name into a version string -# like vs7 vs71 vs8 vs9 -function(get_vs_version_string generator var) - string(REGEX - REPLACE - "Visual Studio ([0-9][0-9]?)($|.*)" - "\\1" - NUMBER - "${generator}") - if("${generator}" MATCHES "Visual Studio 7 .NET 2003") - set(ver_string "vs71") - else() - set(ver_string "vs${NUMBER}") - endif() - set(${var} ${ver_string} PARENT_SCOPE) -endfunction() - -if(BUILD_TESTING) - # Setup some auxilary macros - macro(set_if_not_set var val) - if(NOT DEFINED "${var}") - set("${var}" "${val}") - endif() - endmacro() - - macro(set_if_set var val) - if(NOT "${val}" MATCHES "^$") - set("${var}" "${val}") - endif() - endmacro() - - macro(set_if_set_and_not_set var val) - if(NOT "${val}" MATCHES "^$") - set_if_not_set("${var}" "${val}") - endif() - endmacro() - - # Make sure testing is enabled - enable_testing() - - if(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") - include("${PROJECT_SOURCE_DIR}/CTestConfig.cmake") - set_if_set_and_not_set(NIGHTLY_START_TIME - "${CTEST_NIGHTLY_START_TIME}") - set_if_set_and_not_set(DROP_METHOD "${CTEST_DROP_METHOD}") - set_if_set_and_not_set(DROP_SITE "${CTEST_DROP_SITE}") - set_if_set_and_not_set(DROP_SITE_USER "${CTEST_DROP_SITE_USER}") - set_if_set_and_not_set(DROP_SITE_PASSWORD - "${CTEST_DROP_SITE_PASWORD}") - set_if_set_and_not_set(DROP_SITE_MODE "${CTEST_DROP_SITE_MODE}") - set_if_set_and_not_set(DROP_LOCATION "${CTEST_DROP_LOCATION}") - set_if_set_and_not_set(TRIGGER_SITE "${CTEST_TRIGGER_SITE}") - set_if_set_and_not_set(UPDATE_TYPE "${CTEST_UPDATE_TYPE}") - endif() - - # the project can have a DartConfig.cmake file - if(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") - include("${PROJECT_SOURCE_DIR}/DartConfig.cmake") - else() - # Dashboard is opened for submissions for a 24 hour period starting at - # the specified NIGHTLY_START_TIME. Time is specified in 24 hour format. - set_if_not_set(NIGHTLY_START_TIME "00:00:00 EDT") - set_if_not_set(DROP_METHOD "http") - set_if_not_set(COMPRESS_SUBMISSION ON) - endif() - set_if_not_set(NIGHTLY_START_TIME "00:00:00 EDT") - - if(NOT UPDATE_TYPE) - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") - set(UPDATE_TYPE cvs) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") - set(UPDATE_TYPE svn) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr") - set(UPDATE_TYPE bzr) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg") - set(UPDATE_TYPE hg) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") - set(UPDATE_TYPE git) - endif() - endif() - - if(NOT UPDATE_TYPE) - if(NOT __CTEST_UPDATE_TYPE_COMPLAINED) - set(__CTEST_UPDATE_TYPE_COMPLAINED - 1 - CACHE - INTERNAL - "Already complained about update type.") - message(STATUS - "CTest cannot determine repository type. Please set UPDATE_TYPE to cvs, svn, bzr, hg, or git. CTest update will not work.") - endif() - endif() - - string(TOLOWER "${UPDATE_TYPE}" _update_type) - if("${_update_type}" STREQUAL "cvs") - find_program(CVSCOMMAND cvs) - set(CVS_UPDATE_OPTIONS - "-d -A -P" - CACHE - STRING - "Options passed to the cvs update command.") - set(UPDATE_COMMAND "${CVSCOMMAND}") - set(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}") - - elseif("${_update_type}" STREQUAL "svn") - find_program(SVNCOMMAND svn) - set(UPDATE_COMMAND "${SVNCOMMAND}") - set(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}") - - elseif("${_update_type}" STREQUAL "bzr") - find_program(BZRCOMMAND bzr) - set(UPDATE_COMMAND "${BZRCOMMAND}") - set(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}") - - elseif("${_update_type}" STREQUAL "hg") - find_program(HGCOMMAND hg) - set(UPDATE_COMMAND "${HGCOMMAND}") - set(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}") - - elseif("${_update_type}" STREQUAL "git") - find_program(GITCOMMAND git) - set(UPDATE_COMMAND "${GITCOMMAND}") - set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}") - endif() - - set(DART_TESTING_TIMEOUT - 1500 - CACHE - STRING - "Maximum time allowed before CTest will kill the test.") - - find_program(MEMORYCHECK_COMMAND - NAMES - purify - valgrind - boundscheck - PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" - DOC - "Path to the memory checking command, used for memory error detection.") - find_program(SLURM_SBATCH_COMMAND - sbatch - DOC - "Path to the SLURM sbatch executable") - find_program(SLURM_SRUN_COMMAND - srun - DOC - "Path to the SLURM srun executable") - set(MEMORYCHECK_SUPPRESSIONS_FILE - "" - CACHE - FILEPATH - "File that contains suppressions for the memory checker") - find_program(SCPCOMMAND - scp - DOC - "Path to scp command, used by CTest for submitting results to a Dart server") - find_program(COVERAGE_COMMAND - gcov - DOC - "Path to the coverage program that CTest uses for performing coverage inspection") - - # set the site name - site_name(SITE) - # set the build name - if(NOT BUILDNAME) - set(DART_COMPILER "${CMAKE_CXX_COMPILER}") - - if(NOT DART_COMPILER) - set(DART_COMPILER "${CMAKE_C_COMPILER}") - endif() - - if(NOT DART_COMPILER) - set(DART_COMPILER "unknown") - endif() - - if(WIN32) - set(DART_NAME_COMPONENT "NAME_WE") - else() - set(DART_NAME_COMPONENT "NAME") - endif() - - if(NOT BUILD_NAME_SYSTEM_NAME) - set(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") - endif() - - if(WIN32) - set(BUILD_NAME_SYSTEM_NAME "Win32") - endif() - - if(UNIX OR BORLAND) - get_filename_component(DART_CXX_NAME - "${CMAKE_CXX_COMPILER}" - ${DART_NAME_COMPONENT}) - else() - get_filename_component(DART_CXX_NAME - "${CMAKE_BUILD_TOOL}" - ${DART_NAME_COMPONENT}) - endif() - - if(DART_CXX_NAME MATCHES "msdev") - set(DART_CXX_NAME "vs60") - endif() - - if(DART_CXX_NAME MATCHES "devenv") - get_vs_version_string("${CMAKE_GENERATOR}" DART_CXX_NAME) - endif() - - set(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}") - endif() - - # the build command - build_command(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}") - set(MAKECOMMAND - ${MAKECOMMAND} - CACHE - STRING - "Command to build the project") - - # the default build configuration the ctest build handler will use - # if there is no -C arg given to ctest: - set(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") - if(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "") - set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release") - endif() - - if(NOT "${CMAKE_GENERATOR}" MATCHES "Make") - set(CTEST_USE_LAUNCHERS 0) - endif() - - if(CTEST_USE_LAUNCHERS) - set(CTEST_LAUNCH_COMPILE - "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_LINK - "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_CUSTOM - "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --") - set_property(GLOBAL - PROPERTY - RULE_LAUNCH_COMPILE - "${CTEST_LAUNCH_COMPILE}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}") - set_property(GLOBAL - PROPERTY - RULE_LAUNCH_CUSTOM - "${CTEST_LAUNCH_CUSTOM}") - endif() - - mark_as_advanced(COVERAGE_COMMAND - CVSCOMMAND - SVNCOMMAND - BZRCOMMAND - HGCOMMAND - GITCOMMAND - CVS_UPDATE_OPTIONS - SVN_UPDATE_OPTIONS - BZR_UPDATE_OPTIONS - HG_UPDATE_OPTIONS - GIT_UPDATE_OPTIONS - MAKECOMMAND - MEMORYCHECK_COMMAND - MEMORYCHECK_SUPPRESSIONS_FILE - PURIFYCOMMAND - SCPCOMMAND - SLURM_SBATCH_COMMAND - SLURM_SRUN_COMMAND - SITE) - - if(NOT RUN_FROM_DART) - set(RUN_FROM_CTEST_OR_DART 1) - include(CTestTargets) - set(RUN_FROM_CTEST_OR_DART) - endif() -endif() diff --git a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake b/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake deleted file mode 100644 index e6ab6341ba73fd7cc0dd4cab1154ad7c7b31472b..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# This file is read by ctest in script mode (-S) - -#============================================================================= -# Copyright 2009 Kitware, Inc. -# Copyright 2009 Alexander Neundorf <neundorf@kde.org> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see below. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -# Determine the current system, so this information can be used -# in ctest scripts -include(CMakeDetermineSystem) - -# Also load the system specific file, which sets up e.g. the search paths. -# This makes the FIND_XXX() calls work much better -include(CMakeSystemSpecificInformation) - diff --git a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake b/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake deleted file mode 100644 index a964a039f039eb24d646371e99010c060e967e79..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake +++ /dev/null @@ -1,131 +0,0 @@ - -#============================================================================= -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see below. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -if(NOT RUN_FROM_CTEST_OR_DART) - message(FATAL_ERROR "Do not incldue CTestTargets.cmake directly") -endif() - -# make directories in the binary tree -file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary) -get_filename_component(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH) -set(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH}) -find_program(CMAKE_CTEST_COMMAND - ctest - ${CMAKE_HOST_PATH} - ${CMAKE_TARGET_PATH}) -mark_as_advanced(CMAKE_CTEST_COMMAND) - -# Use CTest -# configure files - -if(CTEST_NEW_FORMAT) - configure_file(${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in - ${PROJECT_BINARY_DIR}/CTestConfiguration.ini) -else() - configure_file(${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in - ${PROJECT_BINARY_DIR}/DartConfiguration.tcl) -endif() - -# -# Section 3: -# -# Custom targets to perform dashboard builds and submissions. -# These should NOT need to be modified from project to project. -# - -set(__conf_types "") -if(CMAKE_CONFIGURATION_TYPES) - # We need to pass the configuration type on the test command line. - set(__conf_types -C "${CMAKE_CFG_INTDIR}") -endif() - -# Add convenience targets. Do this at most once in case of nested -# projects. -define_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED - BRIEF_DOCS "Internal property used by CTestTargets module." - FULL_DOCS "Set by the CTestTargets module to track addition of testing targets.") - -get_property(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED) -if(NOT _CTEST_TARGETS_ADDED) - set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) - - # For all generators add basic testing targets. - foreach(mode Experimental Nightly Continuous NightlyMemoryCheck) - add_custom_target(${mode} - ${CMAKE_CTEST_COMMAND} - ${__conf_types} - -D - ${mode}) - set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "") - endforeach() - - # For Makefile generators add more granular targets. - if("${CMAKE_GENERATOR}" MATCHES Make) - # Make targets for Experimental builds - foreach(mode Nightly Experimental Continuous) - foreach(testtype - Start - Update - Configure - Build - Test - Coverage - MemCheck - Submit) # missing purify - - add_custom_target(${mode}${testtype} - ${CMAKE_CTEST_COMMAND} - ${__conf_types} - -D - ${mode}${testtype}) - set_property(TARGET - ${mode}${testtype} - PROPERTY - RULE_LAUNCH_CUSTOM - "") - endforeach() - endforeach() - endif() # makefile generators - -endif() diff --git a/scripts/cmake/cmake/cmake-2.8.3-modules/FixWinInstallPrefix.cmake b/scripts/cmake/cmake/cmake-2.8.3-modules/FixWinInstallPrefix.cmake deleted file mode 100644 index 8169ddd6271464f44428c66e19b217ad90a95d29..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.3-modules/FixWinInstallPrefix.cmake +++ /dev/null @@ -1,77 +0,0 @@ -# - Automatically fix CMAKE_INSTALL_PREFIX to be bit-appropriate on Win -# -# This is a workaround for CMake bug #9992 in at least <=2.8.0 - see -# http://public.kitware.com/Bug/view.php?id=9992 -# -# It runs automatically when included on a Windows build (passes if(WIN32)) - -# include after setting your project name (and your module search path, -# obviously) -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -if(WIN32) - # caution - ENV{ProgramFiles} on Win64 is adjusted to point to the arch - # of the running executable which, since CMake is 32-bit on Windows as - # I write this, will always be = $ENV{ProgramFiles(x86)}. - # Thus, we only use this environment variable if we are on a 32 machine - - # 32-bit dir on win32, useless to us on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) - - # 32-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _PROG_FILES_X86) - - # 64-bit dir: only set on win64 - file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) - - if(CMAKE_SIZEOF_VOID_P MATCHES "8") - # 64-bit build on win64 - set(_PROGFILESDIR "${_PROG_FILES_W6432}") - else() - if(_PROG_FILES_W6432) - # 32-bit build on win64 - set(_PROGFILESDIR "${_PROG_FILES_X86}") - else() - # 32-bit build on win32 - set(_PROGFILESDIR "${_PROG_FILES}") - endif() - endif() - - if(NOT FIXWININSTALLPREFIX_PREFIX) - set(_needsfix yes) - elseif(NOT - "${FIXWININSTALLPREFIX_PREFIX}" - STREQUAL - "${CMAKE_INSTALL_PREFIX}") - set(_needsfix yes) - else() - set(_needsfix) - endif() - - if(_needsfix) - if("${CMAKE_INSTALL_PREFIX}" - STREQUAL - "${_PROG_FILES}/${CMAKE_PROJECT_NAME}") - # The user didn't change this yet - it's the potentially broken default - set(CMAKE_INSTALL_PREFIX - "${_PROGFILESDIR}/${CMAKE_PROJECT_NAME}" - CACHE - PATH - "Where to install the project - has been adjusted by FixWinInstallPrefix" - FORCE) - endif() - set(FIXWININSTALLPREFIX_PREFIX - "${CMAKE_INSTALL_PREFIX}" - CACHE - INTERNAL - "We've fixed the prefix.") - endif() -endif() diff --git a/scripts/cmake/cmake/cmake-2.8.3-modules/autoinclude.cmake b/scripts/cmake/cmake/cmake-2.8.3-modules/autoinclude.cmake deleted file mode 100644 index 64d8f62b90be741ce9ecb525fa9556cc353a60df..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.3-modules/autoinclude.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# - Autoinclude these policies automatically -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -include(FixWinInstallPrefix) diff --git a/scripts/cmake/cmake/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake b/scripts/cmake/cmake/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake deleted file mode 100644 index 2f7f3170d62e4f347767cf1ed81c4a8eea6c9923..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# - Add a GCC flag so that the errors are more suitable to parsing by Eclipse -# -# include(ImproveEclipseGCCErrors) -# -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -if("${CMAKE_GENERATOR}" MATCHES "Eclipse" AND CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") -endif() diff --git a/scripts/cmake/cmake/cmake-2.8.4-modules/autoinclude.cmake b/scripts/cmake/cmake/cmake-2.8.4-modules/autoinclude.cmake deleted file mode 100644 index 2c98e249991fe29da3711b76580d210f95c2dcf0..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.4-modules/autoinclude.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# - Autoinclude these policies automatically -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -include(ImproveEclipseGCCErrors) diff --git a/scripts/cmake/cmake/cmake-2.8.4-modules/boost/FindBoost.cmake b/scripts/cmake/cmake/cmake-2.8.4-modules/boost/FindBoost.cmake deleted file mode 100644 index f544814bb956a813fbd8511aa9b53b874e31c625..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.8.4-modules/boost/FindBoost.cmake +++ /dev/null @@ -1,1171 +0,0 @@ -# - Try to find Boost include dirs and libraries -# Usage of this module as follows: -# -# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below. -# Due to Boost naming conventions and limitations in CMake this find -# module is NOT future safe with respect to Boost version numbers, -# and may break. -# -# == Using Header-Only libraries from within Boost: == -# -# find_package( Boost 1.36.0 ) -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# endif() -# -# -# == Using actual libraries from within Boost: == -# -# set(Boost_USE_STATIC_LIBS ON) -# set(Boost_USE_MULTITHREADED ON) -# set(Boost_USE_STATIC_RUNTIME OFF) -# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) -# -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# target_link_libraries(foo ${Boost_LIBRARIES}) -# endif() -# -# -# The components list needs to contain actual names of boost libraries only, -# such as "date_time" for "libboost_date_time". If you're using parts of -# Boost that contain header files only (e.g. foreach) you do not need to -# specify COMPONENTS. -# -# You should provide a minimum version number that should be used. If you provide this -# version number and specify the REQUIRED attribute, this module will fail if it -# can't find the specified or a later version. If you specify a version number this is -# automatically put into the considered list of version numbers and thus doesn't need -# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). -# -# NOTE for Visual Studio Users: -# Automatic linking is used on MSVC & Borland compilers by default when -# #including things in Boost. It's important to note that setting -# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, -# should you need this feature. Automatic linking typically uses static -# libraries with a few exceptions (Boost.Python is one). -# -# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for -# more details. Adding a target_link_libraries() as shown in the example -# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS -# gets set to OFF. It is suggested you avoid automatic linking since it -# will make your application less portable. -# -# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ -# -# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of -# boost version numbers that should be taken into account when searching -# for Boost. Unfortunately boost puts the version number into the -# actual filename for the libraries, so this variable will certainly be needed -# in the future when new Boost versions are released. -# -# Currently this module searches for the following version numbers: -# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, -# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, -# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0, -# 1.45, 1.45.0, 1.46, 1.46.0 -# -# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should -# add both 1.x and 1.x.0 as shown above. Official Boost include directories -# omit the 3rd version number from include paths if it is 0 although not all -# binary Boost releases do so. -# -# set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") -# -# ===================================== ============= ======================== -# -# Variables used by this module, they can change the default behaviour and -# need to be set before calling find_package: -# -# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded -# boost libraries. If not specified, defaults -# to ON. -# -# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static -# boost libraries. Defaults to OFF. -# -# Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching in system -# paths (or other locations outside of BOOST_ROOT -# or BOOST_INCLUDEDIR). Useful when specifying -# BOOST_ROOT. Defaults to OFF. -# [Since CMake 2.8.3] -# -# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries -# linked against a static C++ standard library -# ('s' ABI tag). This option should be set to -# ON or OFF because the default behavior -# if not specified is platform dependent -# for backwards compatibility. -# [Since CMake 2.8.3] -# -# Boost_USE_DEBUG_PYTHON If enabled, searches for boost libraries -# compiled against a special debug build of -# Python ('y' ABI tag). Defaults to OFF. -# [Since CMake 2.8.3] -# -# Boost_USE_STLPORT If enabled, searches for boost libraries -# compiled against the STLPort standard -# library ('p' ABI tag). Defaults to OFF. -# [Since CMake 2.8.3] -# -# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS -# If enabled, searches for boost libraries -# compiled against the deprecated STLPort -# "native iostreams" feature ('n' ABI tag). -# Defaults to OFF. -# [Since CMake 2.8.3] -# -# Other Variables used by this module which you may want to set. -# -# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching -# the boost include directory. Please see -# the documentation above regarding this -# annoying, but necessary variable :( -# -# Boost_DEBUG Set this to TRUE to enable debugging output -# of FindBoost.cmake if you are having problems. -# Please enable this before filing any bug -# reports. -# -# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information -# about why it failed or how to fix the problem -# unless this is set to TRUE or the REQUIRED -# keyword is specified in find_package(). -# [Since CMake 2.8.0] -# -# Boost_COMPILER Set this to the compiler suffix used by Boost -# (e.g. "-gcc43") if FindBoost has problems finding -# the proper Boost installation -# -# Boost_THREADAPI When building boost.thread, sometimes the name of the -# library contains an additional "pthread" or "win32" -# string known as the threadapi. This can happen when -# compiling against pthreads on Windows or win32 threads -# on Cygwin. You may specify this variable and if set -# when FindBoost searches for the Boost threading library -# it will first try to match the threadapi you specify. -# For Example: libboost_thread_win32-mgw45-mt-1_43.a -# might be found if you specified "win32" here before -# falling back on libboost_thread-mgw45-mt-1_43.a. -# [Since CMake 2.8.3] -# -# Boost_REALPATH Resolves symbolic links for discovered boost libraries -# to assist with packaging. For example, instead of -# Boost_SYSTEM_LIBRARY_RELEASE being resolved to -# "/usr/lib/libboost_system.so" it would be -# "/usr/lib/libboost_system.so.1.42.0" instead. -# This does not affect linking and should not be -# enabled unless the user needs this information. -# [Since CMake 2.8.3] -# - - -# -# These last three variables are available also as environment variables: -# -# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for -# Boost. Set this if the module has problems finding -# the proper Boost installation. To prevent falling -# back on the system paths, set Boost_NO_SYSTEM_PATHS -# to true. -# -# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the -# module has problems finding the proper Boost installation -# -# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the -# module has problems finding the proper Boost installation -# -# Variables defined by this module: -# -# Boost_FOUND System has Boost, this means the include dir was -# found, as well as all the libraries specified in -# the COMPONENTS list. -# -# Boost_INCLUDE_DIRS Boost include directories: not cached -# -# Boost_INCLUDE_DIR This is almost the same as above, but this one is -# cached and may be modified by advanced users -# -# Boost_LIBRARIES Link to these to use the Boost libraries that you -# specified: not cached -# -# Boost_LIBRARY_DIRS The path to where the Boost library files are. -# -# Boost_VERSION The version number of the boost libraries that -# have been found, same as in version.hpp from Boost -# -# Boost_LIB_VERSION The version number in filename form as -# it's appended to the library filenames -# -# Boost_MAJOR_VERSION major version number of boost -# Boost_MINOR_VERSION minor version number of boost -# Boost_SUBMINOR_VERSION subminor version number of boost -# -# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call -# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) -# to have diagnostic information about Boost's -# automatic linking outputted during compilation time. -# -# For each component you specify in find_package(), the following (UPPER-CASE) -# variables are set. You can use these variables if you would like to pick and -# choose components for your targets instead of just using Boost_LIBRARIES. -# -# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. -# -# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost -# "component" (includes debug and optimized keywords -# when needed). - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org> -# Copyright 2007 Wengo -# Copyright 2007 Mike Jackson -# Copyright 2008 Andreas Pakulat <apaku@gmx.de> -# Copyright 2008-2010 Philip Lowman <philip@yhbt.com> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see below. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -#------------------------------------------------------------------------------- -# FindBoost functions & macros -# -############################################ -# -# Check the existence of the libraries. -# -############################################ -# This macro was taken directly from the FindQt4.cmake file that is included -# with the CMake distribution. This is NOT my work. All work was done by the -# original authors of the FindQt4.cmake file. Only minor modifications were -# made to remove references to Qt and make this file more generally applicable -# And ELSE/ENDIF pairs were removed for readability. -######################################################################### - -macro (_Boost_ADJUST_LIB_VARS basename) - if (Boost_INCLUDE_DIR ) - if (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) - # if the generator supports configuration types then set - # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value - if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - else() - # if there are no configuration types and CMAKE_BUILD_TYPE has no value - # then just use the release libraries - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) - endif() - # FIXME: This probably should be set for both cases - set(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - endif() - - # if only the release version was found, set the debug variable also to the release version - if (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) - set(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) - set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) - endif() - - # if only the debug version was found, set the release variable also to the debug version - if (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) - set(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) - set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) - endif() - - if (Boost_${basename}_LIBRARY) - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") - - # Remove superfluous "debug" / "optimized" keywords from - # Boost_LIBRARY_DIRS - foreach(_boost_my_lib ${Boost_${basename}_LIBRARY}) - get_filename_component(_boost_my_lib_path "${_boost_my_lib}" PATH) - list(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) - endforeach() - list(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) - - set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") - set(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") - endif() - - endif () - # Make variables changeble to the advanced user - mark_as_advanced( - Boost_${basename}_LIBRARY - Boost_${basename}_LIBRARY_RELEASE - Boost_${basename}_LIBRARY_DEBUG - ) -endmacro () - -#------------------------------------------------------------------------------- - -# -# Runs compiler with "-dumpversion" and parses major/minor -# version with a regex. -# -function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - exec_program(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) - - set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) -endfunction() - -# -# A convenience function for marking desired components -# as found or not -# -function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no) - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} UPPERCOMPONENT) - set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE) - endforeach() -endfunction() - -# -# Take a list of libraries with "thread" in it -# and prepend duplicates with "thread_${Boost_THREADAPI}" -# at the front of the list -# -function(_Boost_PREPEND_LIST_WITH_THREADAPI _output) - set(_orig_libnames ${ARGN}) - string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames}) - set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE) -endfunction() - -# -# If a library is found, replace its cache entry with its REALPATH -# -function(_Boost_SWAP_WITH_REALPATH _library _docstring) - if(${_library}) - get_filename_component(_boost_filepathreal ${${_library}} REALPATH) - unset(${_library} CACHE) - set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}") - endif() -endfunction() - -# -# End functions/macros -# -#------------------------------------------------------------------------------- - - - - -if(NOT DEFINED Boost_USE_MULTITHREADED) - set(Boost_USE_MULTITHREADED TRUE) -endif() - -if(Boost_FIND_VERSION_EXACT) - # The version may appear in a directory with or without the patch - # level, even when the patch level is non-zero. - set(_boost_TEST_VERSIONS - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") -else() - # The user has not requested an exact version. Among known - # versions, find those that are acceptable to the user request. - set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" - "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" - "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" - "1.34" "1.33.1" "1.33.0" "1.33") - set(_boost_TEST_VERSIONS) - if(Boost_FIND_VERSION) - set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - # Select acceptable versions. - foreach(version ${_Boost_KNOWN_VERSIONS}) - if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") - # This version is high enough. - list(APPEND _boost_TEST_VERSIONS "${version}") - elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") - # This version is a short-form for the requested version with - # the patch level dropped. - list(APPEND _boost_TEST_VERSIONS "${version}") - endif() - endforeach() - else() - # Any version is acceptable. - set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") - endif() -endif() - -# The reason that we failed to find Boost. This will be set to a -# user-friendly message when we fail to find some necessary piece of -# Boost. -set(Boost_ERROR_REASON) - -set( _boost_IN_CACHE TRUE) -if(Boost_INCLUDE_DIR) - - # On versions < 1.35, remove the System library from the considered list - # since it wasn't added until 1.35. - if(Boost_VERSION AND Boost_FIND_COMPONENTS) - if(Boost_VERSION LESS 103500) - list(REMOVE_ITEM Boost_FIND_COMPONENTS system) - endif() - endif() - - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) - if(NOT Boost_${COMPONENT}_FOUND) - set( _boost_IN_CACHE FALSE) - endif() - endforeach() -else() - set( _boost_IN_CACHE FALSE) -endif() - -if (_boost_IN_CACHE) - # in cache already - set(Boost_FOUND TRUE) - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) - _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) - set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) - endforeach() - set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) - if(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") - math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " - "is already in the cache. To view debugging messages, please clear the cache.") - endif() -else () - # Need to search for boost - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost not in cache") - # Output some of their choices - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}") - endif() - - if(WIN32) - # In windows, automatic linking is performed, so you do not have - # to specify the libraries. If you are linking to a dynamic - # runtime, then you can choose to link to either a static or a - # dynamic Boost library, the default is to do a static link. You - # can alter this for a specific library "whatever" by defining - # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be - # linked dynamically. Alternatively you can force all Boost - # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. - - # This feature can be disabled for Boost library "whatever" by - # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining - # BOOST_ALL_NO_LIB. - - # If you want to observe which libraries are being linked against - # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking - # code to emit a #pragma message each time a library is selected - # for linking. - set(Boost_LIB_DIAGNOSTIC_DEFINITIONS - "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") - endif() - - set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM - C:/boost/include - C:/boost - "$ENV{ProgramFiles}/boost/include" - "$ENV{ProgramFiles}/boost" - /sw/local/include - ) - - # If Boost_ROOT was defined, gently correct the user - if(Boost_ROOT) - message("WARNING: Boost_ROOT was set which is incorrect and is being ignored. " - "You need to use BOOST_ROOT instead. " - "Also, we suggest setting Boost_NO_SYSTEM_PATHS.") - endif() - - # If BOOST_ROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOST_ROOT}) - endif() - - # If BOOSTROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOSTROOT}) - endif() - - # If BOOST_INCLUDEDIR was defined in the environment, use it. - if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) - endif() - - # If BOOST_LIBRARYDIR was defined in the environment, use it. - if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) - set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) - endif() - - if( BOOST_ROOT ) - file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) - endif() - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Declared as CMake or Environmental Variables:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_ROOT = ${BOOST_ROOT}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - endif() - - if( Boost_NO_SYSTEM_PATHS) - set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH) - else() - set(_boost_INCLUDE_SEARCH_DIRS ${_boost_INCLUDE_SEARCH_DIRS_SYSTEM}) - endif() - - if( BOOST_ROOT ) - set(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_ROOT}/include - ${BOOST_ROOT} - ${_boost_INCLUDE_SEARCH_DIRS}) - endif() - - # prepend BOOST_INCLUDEDIR to search path if specified - if( BOOST_INCLUDEDIR ) - file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) - set(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) - endif() - - # ------------------------------------------------------------------------ - # Search for Boost include DIR - # ------------------------------------------------------------------------ - # Try to find Boost by stepping backwards through the Boost versions - # we know about. - if( NOT Boost_INCLUDE_DIR ) - # Build a list of path suffixes for each version. - set(_boost_PATH_SUFFIXES) - foreach(_boost_VER ${_boost_TEST_VERSIONS}) - # Add in a path suffix, based on the required version, ideally - # we could read this from version.hpp, but for that to work we'd - # need to know the include dir already - set(_boost_BOOSTIFIED_VERSION) - - # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 - if(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") - string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - elseif(_boost_VER MATCHES "[0-9]+\\.[0-9]+") - string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - endif() - - list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") - list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") - - endforeach() - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Include debugging info:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") - endif() - - # Look for a standard boost header file. - find_path(Boost_INCLUDE_DIR - NAMES boost/config.hpp - HINTS ${_boost_INCLUDE_SEARCH_DIRS} - PATH_SUFFIXES ${_boost_PATH_SUFFIXES} - ${_boost_FIND_OPTIONS} - ) - endif() - - # ------------------------------------------------------------------------ - # Extract version information from version.hpp - # ------------------------------------------------------------------------ - - if(Boost_INCLUDE_DIR) - # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp - # Read the whole file: - # - set(BOOST_VERSION 0) - set(BOOST_LIB_VERSION "") - file(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") - endif() - - string(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") - string(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") - - set(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") - set(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") - - if(NOT "${Boost_VERSION}" STREQUAL "0") - math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "version.hpp reveals boost " - "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - endif() - else() - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") - endif() - - # ------------------------------------------------------------------------ - # Suffix initialization and compiler suffix detection. - # ------------------------------------------------------------------------ - - # Setting some more suffixes for the library - set (Boost_LIB_PREFIX "") - if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) - set (Boost_LIB_PREFIX "lib") - endif() - - if (Boost_COMPILER) - set(_boost_COMPILER ${Boost_COMPILER}) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "using user-specified Boost_COMPILER = ${_boost_COMPILER}") - endif() - else() - # Attempt to guess the compiler suffix - # NOTE: this is not perfect yet, if you experience any issues - # please report them and use the Boost_COMPILER variable - # to work around the problems. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - if(WIN32) - set (_boost_COMPILER "-iw") - else() - set (_boost_COMPILER "-il") - endif() - elseif (MSVC90) - set (_boost_COMPILER "-vc90") - elseif (MSVC10) - set (_boost_COMPILER "-vc100") - elseif (MSVC80) - set (_boost_COMPILER "-vc80") - elseif (MSVC71) - set (_boost_COMPILER "-vc71") - elseif (MSVC70) # Good luck! - set (_boost_COMPILER "-vc7") # yes, this is correct - elseif (MSVC60) # Good luck! - set (_boost_COMPILER "-vc6") # yes, this is correct - elseif (BORLAND) - set (_boost_COMPILER "-bcb") - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro") - set(_boost_COMPILER "-sw") - elseif (MINGW) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - set (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") - endif() - elseif (UNIX) - if (CMAKE_COMPILER_IS_GNUCXX) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - # Determine which version of GCC we have. - if(APPLE) - if(Boost_MINOR_VERSION) - if(${Boost_MINOR_VERSION} GREATER 35) - # In Boost 1.36.0 and newer, the mangled compiler name used - # on Mac OS X/Darwin is "xgcc". - set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") - else() - # In Boost <= 1.35.0, there is no mangled compiler name for - # the Mac OS X/Darwin version of GCC. - set(_boost_COMPILER "") - endif() - else() - # We don't know the Boost version, so assume it's - # pre-1.36.0. - set(_boost_COMPILER "") - endif() - else() - set (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") - endif() - endif() - endif () - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "guessed _boost_COMPILER = ${_boost_COMPILER}") - endif() - endif() - - set (_boost_MULTITHREADED "-mt") - if( NOT Boost_USE_MULTITHREADED ) - set (_boost_MULTITHREADED "") - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") - endif() - - #====================== - # Systematically build up the Boost ABI tag - # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming - set( _boost_RELEASE_ABI_TAG "-") - set( _boost_DEBUG_ABI_TAG "-") - # Key Use this library when: - # s linking statically to the C++ standard library and - # compiler runtime support libraries. - if(Boost_USE_STATIC_RUNTIME) - set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s") - set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s") - endif() - # g using debug versions of the standard and runtime - # support libraries - if(WIN32) - if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g") - endif() - endif() - # y using special debug build of python - if(Boost_USE_DEBUG_PYTHON) - set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y") - endif() - # d using a debug version of your code - set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d") - # p using the STLport standard library rather than the - # default one supplied with your compiler - if(Boost_USE_STLPORT) - set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p") - set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p") - endif() - # n using the STLport deprecated "native iostreams" feature - if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS) - set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n") - set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n") - endif() - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}") - endif() - - # ------------------------------------------------------------------------ - # Begin finding boost libraries - # ------------------------------------------------------------------------ - - if(BOOST_ROOT) - set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS - ${BOOST_ROOT}/lib - ${BOOST_ROOT}/stage/lib) - endif() - set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS - ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS} - ${Boost_INCLUDE_DIR}/lib - ${Boost_INCLUDE_DIR}/../lib - ${Boost_INCLUDE_DIR}/stage/lib - ) - set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM - C:/boost/lib - C:/boost - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/lib" - "$ENV{ProgramFiles}/boost" - /sw/local/lib - ) - set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}) - if( Boost_NO_SYSTEM_PATHS ) - set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH) - else() - list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM}) - endif() - - # prepend BOOST_LIBRARYDIR to search path if specified - if( BOOST_LIBRARYDIR ) - file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) - set(_boost_LIBRARY_SEARCH_DIRS - ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS}) - endif() - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}") - endif() - - # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES - if( Boost_USE_STATIC_LIBS ) - set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - if(WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else() - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ) - endif() - endif() - - # We want to use the tag inline below without risking double dashes - if(_boost_RELEASE_ABI_TAG) - if(${_boost_RELEASE_ABI_TAG} STREQUAL "-") - set(_boost_RELEASE_ABI_TAG "") - endif() - endif() - if(_boost_DEBUG_ABI_TAG) - if(${_boost_DEBUG_ABI_TAG} STREQUAL "-") - set(_boost_DEBUG_ABI_TAG "") - endif() - endif() - - # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled - # on WIN32 was to: - # 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found) - # 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found) - # We maintain this behavior since changing it could break people's builds. - # To disable the ambiguous behavior, the user need only - # set Boost_USE_STATIC_RUNTIME either ON or OFF. - set(_boost_STATIC_RUNTIME_WORKAROUND false) - if(WIN32 AND Boost_USE_STATIC_LIBS) - if(NOT DEFINED Boost_USE_STATIC_RUNTIME) - set(_boost_STATIC_RUNTIME_WORKAROUND true) - endif() - endif() - - - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} UPPERCOMPONENT) - set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) - set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) - set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") - - set( _boost_docstring_release "Boost ${COMPONENT} library (release)") - set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)") - - # - # Find RELEASE libraries - # - set(_boost_RELEASE_NAMES - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT} ) - if(_boost_STATIC_RUNTIME_WORKAROUND) - set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") - list(APPEND _boost_RELEASE_NAMES - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) - endif() - if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") - _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES}) - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}") - endif() - find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE - NAMES ${_boost_RELEASE_NAMES} - HINTS ${_boost_LIBRARY_SEARCH_DIRS} - ${_boost_FIND_OPTIONS} - DOC "${_boost_docstring_release}" - ) - - # - # Find DEBUG libraries - # - set(_boost_DEBUG_NAMES - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} - ${Boost_LIB_PREFIX}boost_${COMPONENT} ) - if(_boost_STATIC_RUNTIME_WORKAROUND) - set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") - list(APPEND _boost_DEBUG_NAMES - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) - endif() - if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") - _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES}) - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}") - endif() - find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG - NAMES ${_boost_DEBUG_NAMES} - HINTS ${_boost_LIBRARY_SEARCH_DIRS} - ${_boost_FIND_OPTIONS} - DOC "${_boost_docstring_debug}" - ) - - if(Boost_REALPATH) - _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}") - _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" ) - endif() - - _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) - - endforeach() - - # Restore the original find library ordering - if( Boost_USE_STATIC_LIBS ) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) - endif() - # ------------------------------------------------------------------------ - # End finding boost libraries - # ------------------------------------------------------------------------ - - set(Boost_INCLUDE_DIRS - ${Boost_INCLUDE_DIR} - ) - - set(Boost_FOUND FALSE) - if(Boost_INCLUDE_DIR) - set( Boost_FOUND TRUE ) - - # Check the version of Boost against the requested version. - if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) - message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") - endif () - if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - endif() - endif() - endif() - - if (NOT Boost_FOUND) - _Boost_MARK_COMPONENTS_FOUND(OFF) - endif() - - if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) - # If the user requested an exact version of Boost, check - # that. We already know that the Boost version we have is >= the - # requested version. - set(_Boost_VERSION_AGE "new") - - # If the user didn't specify a patchlevel, it's 0. - if (NOT Boost_FIND_VERSION_PATCH) - set(Boost_FIND_VERSION_PATCH 0) - endif () - - # We'll set Boost_FOUND true again if we have an exact version match. - set(Boost_FOUND FALSE) - _Boost_MARK_COMPONENTS_FOUND(OFF) - if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND TRUE ) - _Boost_MARK_COMPONENTS_FOUND(ON) - endif() - endif() - endif() - endif () - - if(NOT Boost_FOUND) - # State that we found a version of Boost that is too new or too old. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - if (Boost_FIND_VERSION_PATCH) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") - endif () - if (NOT Boost_FIND_VERSION_EXACT) - set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") - endif () - set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") - endif () - - # Always check for missing components - set(_boost_CHECKED_COMPONENT FALSE) - set(_Boost_MISSING_COMPONENTS "") - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) - set(_boost_CHECKED_COMPONENT TRUE) - if(NOT Boost_${COMPONENT}_FOUND) - string(TOLOWER ${COMPONENT} COMPONENT) - list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) - set( Boost_FOUND FALSE) - endif() - endforeach() - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") - endif() - - if (_Boost_MISSING_COMPONENTS) - # We were unable to find some libraries, so generate a sensible - # error message that lists the libraries we were unable to find. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") - foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON} boost_${COMPONENT}\n") - endforeach() - - list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) - list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) - if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - else () - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - endif () - endif () - - if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) - # Compatibility Code for backwards compatibility with CMake - # 2.4's FindBoost module. - - # Look for the boost library path. - # Note that the user may not have installed any libraries - # so it is quite possible the Boost_LIBRARY_PATH may not exist. - set(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) - - if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") - get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - endif () - - if("${_boost_LIB_DIR}" MATCHES "/include$") - # Strip off the trailing "/include" in the path. - get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - endif() - - if(EXISTS "${_boost_LIB_DIR}/lib") - set (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) - else() - if(EXISTS "${_boost_LIB_DIR}/stage/lib") - set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) - else() - set(_boost_LIB_DIR "") - endif() - endif() - - if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") - set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") - endif() - - endif() - - else() - set( Boost_FOUND FALSE) - endif() - - if (Boost_FOUND) - if (NOT Boost_FIND_QUIETLY) - message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - if(Boost_FIND_COMPONENTS) - message(STATUS "Found the following Boost libraries:") - endif() - endif() - foreach ( COMPONENT ${Boost_FIND_COMPONENTS} ) - string( TOUPPER ${COMPONENT} UPPERCOMPONENT ) - if ( Boost_${UPPERCOMPONENT}_FOUND ) - if (NOT Boost_FIND_QUIETLY) - message (STATUS " ${COMPONENT}") - endif() - set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) - endif () - endforeach() - else() - if(Boost_FIND_REQUIRED) - message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") - else() - if(NOT Boost_FIND_QUIETLY) - # we opt not to automatically output Boost_ERROR_REASON here as - # it could be quite lengthy and somewhat imposing in it's requests - # Since Boost is not always a required dependency we'll leave this - # up to the end-user. - if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG) - message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}") - else() - message(STATUS "Could NOT find Boost") - endif() - endif() - endif() - endif() - - # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view - mark_as_advanced(Boost_INCLUDE_DIR - Boost_INCLUDE_DIRS - Boost_LIBRARY_DIRS - ) -endif() diff --git a/scripts/cmake/cmake/cmake-2.9.0-modules/RequireOutOfSourceBuild.cmake b/scripts/cmake/cmake/cmake-2.9.0-modules/RequireOutOfSourceBuild.cmake deleted file mode 100644 index 9b27970b500cecfa730dbb82fc8da90c62f12117..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.9.0-modules/RequireOutOfSourceBuild.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# - Issue an error if the source tree is in or equal to the build tree -# -# include(RequireOutOfSourceBuild) -# -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -get_filename_component(_src "${CMAKE_SOURCE_DIR}" ABSOLUTE) -get_filename_component(_cur_src "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) -get_filename_component(_bin "${CMAKE_BINARY_DIR}" ABSOLUTE) - -string(LENGTH "${_src}" _src_len) -string(LENGTH "${_cur_src}" _cur_src_len) -string(LENGTH "${_bin}" _bin_len) - -set(_test) - -if(NOT "${_bin_len}" GREATER "${_src_len}") - list(APPEND _test _src) - #message(STATUS "Checking ${_src}") -endif() - -if(NOT "${_bin_len}" GREATER "${_cur_src_len}") - list(APPEND _test _cur_src) - #message(STATUS "Checking ${_cur_src}") -endif() - -foreach(_var ${_test}) - string(SUBSTRING "${${_var}}" 0 ${_bin_len} _chopped) - #message(STATUS "comparing ${_bin} and ${_chopped}") - if("${_bin}" STREQUAL "${_chopped}") - get_filename_component(_parent "${CMAKE_SOURCE_DIR}/.." ABSOLUTE) - message(FATAL_ERROR - "You must set a binary directory that is different from your source directory. You might consider ${CMAKE_SOURCE_DIR}/build or ${_parent}/build-${CMAKE_PROJECT_NAME}") - endif() -endforeach() diff --git a/scripts/cmake/cmake/cmake-2.9.0-modules/autoinclude.cmake b/scripts/cmake/cmake/cmake-2.9.0-modules/autoinclude.cmake deleted file mode 100644 index e9206ee08a3a82b97d10fd822d5b43e688f1b10d..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/cmake-2.9.0-modules/autoinclude.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# - Autoinclude these policies automatically -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file ../LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -include(RequireOutOfSourceBuild) diff --git a/scripts/cmake/cmake/module-docs/Example-FindMyPackage.cmake b/scripts/cmake/cmake/module-docs/Example-FindMyPackage.cmake deleted file mode 100644 index cdf3bfcadc053dbdbe661514975efb953aea323e..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/module-docs/Example-FindMyPackage.cmake +++ /dev/null @@ -1,189 +0,0 @@ -# - try to find MyPackage library -# -# Example-FindMyPackage.cmake -# -# This example is for a fairly in-depth library that has four -# internal dependencies as well as an external dependency. -# The dependency tree is described below, in graphviz/dot format, and you -# can remove the #'s from the following lines and run it through graphviz, -# with this command: dot dependencies.dot -O -Tpdf -# -# --- start of dependencies.dot --- -# digraph { -# BLAS; -# subgraph cluster_mypackage { -# label = "Components that are part of MyPackage"; -# libmypackagecore -> libmypackagea; -# libmypackagea -> libmypackageb; -# libmypackageb -> libmypackagec; -# libmypackagec -> BLAS; -# } -# } -# --- end of dependencies.dot --- -# -# Because our imaginary component "c" requires BLAS and BLAS needs some -# linker flags, MYPACKAGE_..._LINKER_FLAGS joins the usual group of -# _LIBRARY/_LIBRARIES and _INCLUDE_DIR/_INCLUDE_DIRS variables. If -# you don't use a library like that, you don't need to include the -# lines dealing with that group of variables. -# -# Most library aren't nearly this complex - but some are, and many -# have some parts of the complexity handled here. -# -# Start of what would be a minimal module documentation block: -# -# Cache Variables: (not for direct use in CMakeLists.txt) -# MYPACKAGE_ROOT -# MYPACKAGE_LIBRARY -# MYPACKAGE_INCLUDE_DIR -# MYPACKAGE_a_LIBRARY -# MYPACKAGE_a_INCLUDE_DIR -# MYPACKAGE_b_LIBRARY -# MYPACKAGE_b_INCLUDE_DIR -# MYPACKAGE_c_LIBRARY -# MYPACKAGE_c_INCLUDE_DIR -# -# Non-cache variables you might use in your CMakeLists.txt: -# MYPACKAGE_FOUND -# -# MYPACKAGE_LIBRARIES -# MYPACKAGE_INCLUDE_DIRS -# MYPACKAGE_LINKER_FLAGS -# -# MYPACKAGE_a_LIBRARIES -# MYPACKAGE_a_INCLUDE_DIRS -# MYPACKAGE_a_LINKER_FLAGS -# -# MYPACKAGE_b_LIBRARIES -# MYPACKAGE_b_INCLUDE_DIRS -# MYPACKAGE_b_LINKER_FLAGS -# -# MYPACKAGE_c_LIBRARIES -# MYPACKAGE_c_INCLUDE_DIRS -# MYPACKAGE_c_LINKER_FLAGS -# -# Use this module this way: -# find_package(MyPackage) -# include_directories(${MYPACKAGE_INCLUDE_DIRS}) -# add_executable(myapp ${SOURCES}) -# target_link_libraries(myapp ${MYPACKAGE_LIBRARIES}) -# set_property(TARGET myapp PROPERTY LINK_FLAGS ${MYPACKAGE_LINKER_FLAGS}) -# -# Requires these CMake modules: -# FindPackageHandleStandardArgs (CMake standard module) -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC - -set(MYPACKAGE_ROOT - "${MYPACKAGE_ROOT}" - CACHE - PATH - "Root directory to look in") - -find_library(MYPACKAGE_LIBRARY - NAMES - mypackagecore - PATHS - "${MYPACKAGE_ROOT}" - PATH_SUFFIXES - lib) - -find_path(MYPACKAGE_INCLUDE_DIR - NAMES - mypackage/mypackage.h - PATHS - "${MYPACKAGE_ROOT}" - PATH_SUFFIXES - include) - -# Assuming that the components are named libmypackagea, libmypackageb, etc -foreach(lib a b c) - find_library(MYPACKAGE_${lib}_LIBRARY - NAMES - mypackage${lib} - PATHS - "${MYPACKAGE_ROOT}" - PATH_SUFFIXES - lib) - - find_path(MYPACKAGE_${lib}_INCLUDE_DIR - NAMES - mypackage/${lib}/${lib}.h - PATHS - "${MYPACKAGE_ROOT}" - PATH_SUFFIXES - include) - -endforeach() - -# Searching for dependencies here - always quiet. -# see /usr/share/cmake-2.x/Modules/FindBLAS.cmake for the variables this will define -if(NOT BLAS_FOUND) - find_package(BLAS QUIETLY) -endif() - -# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(MyPackage - DEFAULT_MSG - MYPACKAGE_LIBRARY - MYPACKAGE_INCLUDE_DIR - MYPACKAGE_a_LIBRARY - MYPACKAGE_a_INCLUDE_DIR - MYPACKAGE_b_LIBRARY - MYPACKAGE_b_INCLUDE_DIR - MYPACKAGE_c_LIBRARY - MYPACKAGE_c_INCLUDE_DIR - BLAS_FOUND) - -if(MYPACKAGE_FOUND) - # Set variables containing libraries and their dependencies - # Always use the plural form for the variables defined by other find modules: - # they might have dependencies too! - - set(MYPACKAGE_c_LIBRARIES ${MYPACKAGE_c_LIBRARY} ${BLAS_LIBRARIES}) - set(MYPACKAGE_c_INCLUDE_DIRS ${MYPACKAGE_c_INCLUDE_DIR}) # No include dir for BLAS? - set(MYPACKAGE_c_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) - - set(MYPACKAGE_b_LIBRARIES - ${MYPACKAGE_b_LIBRARY} - ${MYPACKAGE_c_LIBRARIES}) - set(MYPACKAGE_b_INCLUDE_DIRS - ${MYPACKAGE_b_INCLUDE_DIR} - ${MYPACKAGE_c_INCLUDE_DIRS}) - set(MYPACKAGE_b_LINKER_FLAGS ${MYPACKAGE_c_LINKER_FLAGS}) - - set(MYPACKAGE_a_LIBRARIES - ${MYPACKAGE_a_LIBRARY} - ${MYPACKAGE_b_LIBRARIES}) - set(MYPACKAGE_a_INCLUDE_DIRS - ${MYPACKAGE_a_INCLUDE_DIR} - ${MYPACKAGE_b_INCLUDE_DIRS}) - set(MYPACKAGE_a_LINKER_FLAGS ${MYPACKAGE_b_LINKER_FLAGS}) - - set(MYPACKAGE_LIBRARIES ${MYPACKAGE_LIBRARY} ${MYPACKAGE_a_LIBRARIES}) - set(MYPACKAGE_INCLUDE_DIRS - ${MYPACKAGE_INCLUDE_DIR} - ${MYPACKAGE_a_INCLUDE_DIRS}) - set(MYPACKAGE_LINKER_FLAGS ${MYPACKAGE_a_LINKER_FLAGS}) - -endif() - -mark_as_advanced(MYPACKAGE_LIBRARY - MYPACKAGE_INCLUDE_DIR - MYPACKAGE_a_LIBRARY - MYPACKAGE_a_INCLUDE_DIR - MYPACKAGE_b_LIBRARY - MYPACKAGE_b_INCLUDE_DIR - MYPACKAGE_c_LIBRARY - MYPACKAGE_c_INCLUDE_DIR) - -if(MYPACKAGE_FOUND) - mark_as_advanced(MYPACKAGE_ROOT) -endif() - -# End of Example-FindMyPackage.cmake diff --git a/scripts/cmake/cmake/module-docs/Example-FindMySimplePackage.cmake b/scripts/cmake/cmake/module-docs/Example-FindMySimplePackage.cmake deleted file mode 100644 index 678b8684e620f029aada5720fd0256e3cb0d5fc7..0000000000000000000000000000000000000000 --- a/scripts/cmake/cmake/module-docs/Example-FindMySimplePackage.cmake +++ /dev/null @@ -1,101 +0,0 @@ -# - try to find MySimplePackage library -# -# Example-MySimplePackage.cmake -# -# This example is for a pretty simple library but that is still fairly -# common in its complexity. -# -# Cache Variables: (probably not for direct use in your scripts) -# MYSIMPLEPACKAGE_INCLUDE_DIR -# MYSIMPLEPACKAGE_LIBRARY -# -# Non-cache variables you might use in your CMakeLists.txt: -# MYSIMPLEPACKAGE_FOUND -# MYSIMPLEPACKAGE_INCLUDE_DIRS -# MYSIMPLEPACKAGE_LIBRARIES -# MYSIMPLEPACKAGE_RUNTIME_LIBRARIES - aka the dll for installing -# MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS -# -# Requires these CMake modules: -# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -# -# Original Author: -# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(MYSIMPLEPACKAGE_ROOT_DIR - "${MYSIMPLEPACKAGE_ROOT_DIR}" - CACHE - PATH - "Directory to search") - -if(CMAKE_SIZEOF_VOID_P MATCHES "8") - set(_LIBSUFFIXES /lib64 /lib) -else() - set(_LIBSUFFIXES /lib) -endif() - -find_library(MYSIMPLEPACKAGE_LIBRARY - NAMES - mysimplepackage - PATHS - "${MYSIMPLEPACKAGE_ROOT_DIR}" - PATH_SUFFIXES - "${_LIBSUFFIXES}") - -# Might want to look close to the library first for the includes. -get_filename_component(_libdir "${MYSIMPLEPACKAGE_LIBRARY}" PATH) - -find_path(MYSIMPLEPACKAGE_INCLUDE_DIR - NAMES - mysimplepackage.h - HINTS - "${_libdir}" # the library I based this on was sometimes bundled right next to its include - "${_libdir}/.." - PATHS - "${MYSIMPLEPACKAGE_ROOT_DIR}" - PATH_SUFFIXES - include/) - -# There's a DLL to distribute on Windows - find where it is. -set(_deps_check) -if(WIN32) - find_file(MYSIMPLEPACKAGE_RUNTIME_LIBRARY - NAMES - mysimplepackage.dll - HINTS - "${_libdir}") - set(MYSIMPLEPACKAGE_RUNTIME_LIBRARIES - "${MYSIMPLEPACKAGE_RUNTIME_LIBRARY}") - get_filename_component(MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS - "${MYSIMPLEPACKAGE_RUNTIME_LIBRARY}" - PATH) - list(APPEND _deps_check MYSIMPLEPACKAGE_RUNTIME_LIBRARY) -else() - get_filename_component(MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS - "${MYSIMPLEPACKAGE_LIBRARY}" - PATH) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(MySimplePackage - DEFAULT_MSG - MYSIMPLEPACKAGE_LIBRARY - MYSIMPLEPACKAGE_INCLUDE_DIR - ${_deps_check}) - -if(MYSIMPLEPACKAGE_FOUND) - set(MYSIMPLEPACKAGE_LIBRARIES "${MYSIMPLEPACKAGE_LIBRARY}") - set(MYSIMPLEPACKAGE_INCLUDE_DIRS "${MYSIMPLEPACKAGE_INCLUDE_DIR}") - mark_as_advanced(MYSIMPLEPACKAGE_ROOT_DIR) -endif() - -mark_as_advanced(MYSIMPLEPACKAGE_INCLUDE_DIR - MYSIMPLEPACKAGE_LIBRARY - MYSIMPLEPACKAGE_RUNTIME_LIBRARY)