diff --git a/CMakeLists.txt b/CMakeLists.txt index b9ef0c935..c7e495248 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,7 +474,7 @@ IF(NOT WIN32) ENDIF() ENDIF() - +MESSAGE(netcdf_libraries: ${netcdf_library}) # Create config.h file configure_file("${NetCDF_SOURCE_DIR}/cmake_config.h.in" "${NetCDF_BINARY_DIR}/config.h") @@ -597,6 +597,26 @@ CONFIGURE_FILE( ) #INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) +# Create CMake package configuration files. With these, other packages using +# cmake should be able to find netcdf using find_package and find_library. +# This call is paired with one in liblib. +install (EXPORT netcdf-targets + DESTINATION share/cmake + COMPONENT documentation) + +configure_file ( + ${NetCDF_SOURCE_DIR}/netcdf-config.cmake.in + ${NetCDF_BINARY_DIR}/netcdf-config.cmake @ONLY) + +configure_file ( + ${NetCDF_SOURCE_DIR}/netcdf-config-version.cmake.in + ${NetCDF_BINARY_DIR}/netcdf-config-version.cmake @ONLY) + +install (FILES ${NetCDF_BINARY_DIR}/netcdf-config.cmake + ${NetCDF_BINARY_DIR}/netcdf-config-version.cmake + DESTINATION share/cmake) + +# End CMake package configuration files. ##### # Various options for CPACK ##### diff --git a/ctest-scripts/ContinuousTest.cmake b/ctest-scripts/ContinuousTest.cmake index ded6896e0..529e4f4a5 100644 --- a/ctest-scripts/ContinuousTest.cmake +++ b/ctest-scripts/ContinuousTest.cmake @@ -44,7 +44,7 @@ set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE 1) ctest_start("Continuous") -while (${CTEST_ELAPSED_TIME} LESS 36000) +while (${CTEST_ELAPSED_TIME}) set (START_TIME ${CTEST_ELAPSED_TIME}) ctest_update(RETURN_VALUE count) @@ -61,5 +61,5 @@ while (${CTEST_ELAPSED_TIME} LESS 36000) message("Submitting") message("Analysis complete.") endif() - ctest_sleep( ${START_TIME} 60 ${CTEST_ELAPSED_TIME}) + ctest_sleep( ${START_TIME} 300 ${CTEST_ELAPSED_TIME}) endwhile() diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt index 64462baf1..0f5a170ae 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -66,8 +66,9 @@ SET_TARGET_PROPERTIES(netcdf PROPERTIES VERSION ${NetCDF_VERSION} SOVERSION ${NetCDF_VERSION_MAJOR}) -INSTALL(TARGETS netcdf RUNTIME DESTINATION bin COMPONENT libraries - LIBRARY DESTINATION lib COMPONENT libraries - ARCHIVE DESTINATION lib COMPONENT libraries) +INSTALL(TARGETS netcdf EXPORT netcdf-targets RUNTIME DESTINATION bin COMPONENT libraries + LIBRARY DESTINATION lib COMPONENT libraries + ARCHIVE DESTINATION lib COMPONENT libraries + ) SET(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)