Loading isis/CMakeLists.txt +42 −67 Original line number Diff line number Diff line Loading @@ -10,40 +10,7 @@ cmake_minimum_required(VERSION 3.4) # Point cmake to our other CMake files. list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") list(APPEND CMAKE_INCLUDE_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/objects/ /usgs/pkgs/local/v007/include/google-protobuf/protobuf2.6.1/ /usgs/pkgs/local/v007/include/xercesc/xercesc-3.1.2/ /usgs/pkgs/local/v007/include/tiff/tiff-4.0.5/ /usr/lib64/ ) set(CMAKE_PREFIX_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/libexec/ /opt/usgs/v007/ports/Library/Frameworks/ /opt/usgs/v007/ports/libexec/ /opt/usgs/v007/ports/bin/ /opt/usgs/v007/ports/lib/ /opt/usgs/v007/ports/include/ /opt/usgs/v007/ports/libexec/qt5 /opt/usgs/v007/ports/libexec/qt5/bin/ /opt/usgs/v007/ports/libexec/qt5/lib/ /opt/usgs/v007/3rdparty/bin /opt/usgs/v007/3rdparty/include/ /opt/usgs/v007/3rdparty/lib/ /opt/usgs/v007/proprietary/ /opt/usgs/v007/proprietary/include/ /opt/usgs/v007/proprietary/lib/ /usr/lib /usr/lib64/ /usr/local/lib ) set(CMAKE_FIND_FRAMEWORK LAST) include(AddIsisModule) include(Utilities) Loading @@ -56,7 +23,6 @@ include(InstallThirdParty) project (USGS_ISIS) # Short and long name of this package set(PACKAGE "ISIS") set(PACKAGE_NAME "USGS ISIS") Loading Loading @@ -91,20 +57,33 @@ message("Detected Operating System: ${osVersionString}") # as a static library using some specialized code in Utilities.cmake. set(BUILD_SHARED_LIBS ON) # Specify flags used set(thirdPartyCppFlags -Wall -std=c++11 -DISIS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-parameter -Wno-overloaded-virtual) #set(thirdPartyCppFlags -Wall -ansi -DISIS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-parameter -Wno-overloaded-virtual) # Specify user options that can be passed in with the initial CMake command. option(isis3Data "Directory containing Isis3Data" "NA") option(isis3TestData "Directory containing Isis3TestData" "NA") option(testOutputDir "Directory to store app test output folders" "NA") option(isis3Data "Directory containing Isis3Data" OFF ) option(isis3TestData "Directory containing Isis3TestData" OFF ) option(testOutputDir "Directory to store app test output folders" OFF ) option(buildCore "Build the core ISIS modules" ON ) option(buildMissions "Build the mission specific modules" ON ) option(buildStaticCore "Build libisis3 static as well as dynamic" OFF ) option(buildTests "Set up unit, application, and module tests." ON ) option(JP2KFLAG "Whether or not to build using JPEG2000 support" ON ) option(develop "Use a devleopment configuration" ON ) # options only allow on/off but this flag is piped into ISIS as ENABLEJP2K # needs to be either 1 or 0 for C style true false if(JP2KFLAG) set(JP2KFLAG 1) endif() # Prioritize passed in variables over env vars, probably a better way to do this if(DEFINED ENV{ISIS3DATA} AND NOT isis3Data) set(isis3Data $ENV{ISIS3DATA}) endif() if(DEFINED ENV{ISIS3TESTDATA} AND NOT isis3TestData) set(isis3TestData $ENV{ISIS3TESTDATA}) endif() if(EXISTS ${isis3Data}) set(ENV{ISIS3DATA} "${isis3Data}") Loading @@ -112,12 +91,14 @@ if(EXISTS ${isis3Data}) else() message(WARNING "Isis3Data directory ${isis3Data} not found, unit tests will fail.") endif() if(EXISTS ${isis3TestData}) set(ENV{ISIS3TESTDATA} "${isis3TestData}") message("Using ISIS3TESTDATA = $ENV{ISIS3TESTDATA}") else() message(WARNING "Isis3TestData directory ${isis3TestData} not found, application and module tests will fail.") endif() #if(EXISTS ${CMAKE_INSTALL_PREFIX}) # set(ENV{CMAKE_INSTALL_PREFIX} "${CMAKE_INSTALL_PREFIX}") # message("Using INSTALL PREFIX = $ENV{CMAKE_INSTALL_PREFIX}") Loading @@ -127,6 +108,7 @@ endif() if(${testOutputDir} STREQUAL "OFF") message("Writing test data folders to = ${CMAKE_BINARY_DIR}/testOutputDir") set(testOutputDir "${CMAKE_BINARY_DIR}/testOutputDir") execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/testOutputDir) else() # User specified a test output folder, make sure it exists. Loading Loading @@ -155,19 +137,17 @@ include(FindAllDependencies) include_directories(SYSTEM ${ALLINCDIRS}) link_directories(${ALLLIBDIRS}) # add isis headers # inject ISISROOT add_definitions( -DISISROOT="${CMAKE_SOURCE_DIR}" ) add_definitions( -DISISBUILDDIR="${CMAKE_BINARY_DIR}" ) # add isis headers file(GLOB ISIS_HEADERS ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.h ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.hpp) file(COPY ${ISIS_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/inc) include_directories(${CMAKE_BINARY_DIR}/inc) # install scripts # file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/scripts) # file(COPY ${CMAKE_SOURCE_DIR}/scripts DESTINATION ${CMAKE_INSTALL_PREFIX}) set(CORE_LIB_NAME isis3) # Specify relative library include paths which will be set up on Loading Loading @@ -209,7 +189,6 @@ install(FILES "${CMAKE_BINARY_DIR}/qt.conf" DESTINATION ${CMAKE_INSTALL_PREFIX}/ #Create the inc directory execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/inc) # Create an xml folder in the source directory that we will need later set(sourceXmlFolder ${CMAKE_BINARY_DIR}/bin/xml) execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/xml) Loading @@ -224,22 +203,18 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/make DESTINATION ${CMAKE_INSTALL_PREFIX}) add_subdirectory(src objects) # Set up third party libraries for installation install_third_party() # Some unit and app test rely on a 3rdParty structure and need to be copied execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/3rdParty ${CMAKE_BINARY_DIR}/3rdParty/lib ${CMAKE_BINARY_DIR}/3rdParty/plugins) # Create a link from the build/objects directory to each folder in 3rdPartyLibs/plugins. # - This is required so that the plugins can be found during unit tests. # TIP: Set "export QT_DEBUG_PLUGINS=1" to help debug plugin errors. foreach(plugin ${THIRDPARTYPLUGINFOLDERS}) get_filename_component(pluginName ${plugin} NAME) if(NOT EXISTS ${CMAKE_BINARY_DIR}/lib/${pluginName}) execute_process(COMMAND ln -s "${plugin}" ${pluginName} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib") execute_process(COMMAND cp -r ${CMAKE_BINARY_DIR}/lib/${pluginName} ${CMAKE_BINARY_DIR}/3rdParty/plugins/) endif() endforeach() # install_third_party() # # Create a link from the build/objects directory to each folder in 3rdPartyLibs/plugins. # # - This is required so that the plugins can be found during unit tests. # # TIP: Set "export QT_DEBUG_PLUGINS=1" to help debug plugin errors. # foreach(plugin ${THIRDPARTYPLUGINFOLDERS}) # get_filename_component(pluginName ${plugin} NAME) # if(NOT EXISTS ${CMAKE_BINARY_DIR}/lib/${pluginName}) # execute_process(COMMAND ln -s "${plugin}" ${pluginName} # WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib") # endif() # endforeach() # Set up documentation build target. # - This script is called by running "make docs". Loading isis/Jenkinsfile 0 → 100644 +62 −0 Original line number Diff line number Diff line pipeline { agent { docker { label 'cmake' image 'chrisryancombs/docker_isis' args '''\ -v /usgs/pkgs/local/v007:/usgs/pkgs/local/v007 \ -v /usgs/cpkgs/isis3/data:/usgs/cpkgs/isis3/data \ -v /usgs/cpkgs/isis3/testData:/usgs/cpkgs/isis3/testData\ ''' } } environment { ISISROOT="${workspace}" + "/build/" ISIS3TESTDATA="/usgs/cpkgs/isis3/testData/" ISIS3DATA="/usgs/cpkgs/isis3/data/" } stages { stage('Config') { steps { sh """ mkdir -p ./install ./build && cd build cmake -GNinja -DCMAKE_INSTALL_PREFIX=../install -Disis3Data=/usgs/cpkgs/isis3/data -Disis3TestData=/usgs/cpkgs/isis3/testData ../isis \ """ } } stage('Build') { steps { sh """ set +e cd build ninja -j8 && ninja install """ } } stage('Test'){ steps { sh """ export PATH="${PATH}:${ISISROOT}/bin" set +e cd build ctest -j8 -R _unit_ ctest -j8 -R _app_ ctest -j8 -R _module_ """ } } } // post { // success { // sh 'pwd && ls' // archiveArtifacts artifacts: "build/objects/*.o" // } // always { // mail to: 'ccombs@usgs.gov', // subject: "Build Finished: ${currentBuild.fullDisplayName}", // body: "Link: ${env.BUILD_URL}" // sh "rm -rf build/* && rm -rf install/*" // cleanWs() // } // } } isis/cmake/AddIsisModule.cmake +2 −3 Original line number Diff line number Diff line Loading @@ -93,8 +93,6 @@ function(make_obj_unit_test moduleName testFile truthFile reqLibs pluginLibs) endfunction(make_obj_unit_test) # Incorporate a single obj folder function(add_isis_obj folder reqLibs) Loading Loading @@ -164,6 +162,7 @@ function(add_isis_obj folder reqLibs) # Folder with a plugin means that this is a separate library! # Add it here and then we are done with the source files. set(newSourceFiles ${thisSourceFiles} PARENT_SCOPE) if(NOT (${numPlugins} EQUAL 1)) message( FATAL_ERROR "Error: Multiple plugins found in folder!" ) endif() Loading isis/cmake/FindAllDependencies.cmake +75 −33 Original line number Diff line number Diff line Loading @@ -4,6 +4,41 @@ # go looking for them if they are not? #=============================================================================== list(APPEND CMAKE_INCLUDE_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/objects/ /usgs/pkgs/local/v007/include/google-protobuf/protobuf2.6.1/ /usgs/pkgs/local/v007/include/xercesc/xercesc-3.1.2/ /usgs/pkgs/local/v007/include/tiff/tiff-4.0.5/ /usr/lib64/ ) set(CMAKE_PREFIX_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/libexec/ /opt/usgs/v007/ports/Library/Frameworks/ /opt/usgs/v007/ports/libexec/ /opt/usgs/v007/ports/bin/ /opt/usgs/v007/ports/lib/ /opt/usgs/v007/ports/include/ /opt/usgs/v007/ports/libexec/qt5 /opt/usgs/v007/ports/libexec/qt5/bin/ /opt/usgs/v007/ports/libexec/qt5/lib/ /opt/usgs/v007/3rdparty/bin /opt/usgs/v007/3rdparty/include/ /opt/usgs/v007/3rdparty/lib/ /opt/usgs/v007/proprietary/ /opt/usgs/v007/proprietary/include/ /opt/usgs/v007/proprietary/lib/ /usr/lib/ /usr/lib64/ /usr/local/lib/ ) # Specify top level directories set(thirdPartyDir "/usgs/pkgs/local/v007") set(INCLUDE_DIR "${thirdPartyDir}/include") Loading @@ -18,7 +53,6 @@ if(APPLE) set(PLUGIN_DIR "${thirdPartyDir}/ports/libexec/qt5/plugins") endif(APPLE) set(JP2KFLAG 1) # Add thirdPartyCppFlags set(thirdPartyCppFlags ${thirdPartyCppFlags} -DGMM_USES_SUPERLU) Loading @@ -38,6 +72,7 @@ find_program(PROTOC protoc REQUIRED) include(FindProtobuf) if(APPLE) find_package(OpenGL REQUIRED) find_package(Qt5 COMPONENTS Core Concurrent Loading Loading @@ -118,34 +153,43 @@ else() #oh god why find_library(QT5_XMLPATTERNS_LIBRARY NAMES Qt5XmlPatterns) endif(APPLE) find_package(Qwt 6 REQUIRED) find_package(XercesC 3.1 REQUIRED) find_package(GeoTIFF 2 REQUIRED) find_package(TIFF 5 REQUIRED) # Some of these will have non-traditional installs with version numbers in the paths in v007 # For these, we pass in a version number, and use it in the path suffix # This only applies to v007, and outside of the building, we should only expect standard installs # The v007-specific installs are listed beside their find_package calls below: find_package(Boost 1.59.0 REQUIRED) # "boost/boost${Boost_FIND_VERSION}/boost/" find_package(Bullet 2.86 REQUIRED) find_package(Cholmod 4.4.5 REQUIRED) # "SuiteSparse/SuiteSparse${Cholmod_FIND_VERSION}/SuiteSparse/" find_package(CSPICE 65 REQUIRED) find_package(TNT 1.2.6 REQUIRED) find_package(Geos 3.5.0 REQUIRED) find_package(GSL 19 REQUIRED) find_package(Protobuf 9 REQUIRED) find_package(Boost 1.59 REQUIRED) find_package(X11 6 REQUIRED) find_package(Eigen REQUIRED) find_package(Embree 2.15.0 REQUIRED) find_package(GeoTIFF 2 REQUIRED) find_package(GMM 5.0 REQUIRED) # "/gmm/gmm-${GMM_FIND_VERSION}/gmm/" find_package(GSL 19 REQUIRED) find_package(GMM REQUIRED) find_package(HDF5 1.8.15 REQUIRED) find_package(SuperLU 4.3 REQUIRED) find_package(Cholmod 4.4.5 REQUIRED) find_package(Embree 2.15.0 REQUIRED) find_package(PCL 1.8.0 REQUIRED) find_package(Eigen REQUIRED) find_package(Bullet 2.86 REQUIRED) find_package(OpenCV 3.1.0 REQUIRED) find_package(Jama 125 REQUIRED) # Jama version is 1.2.5, but v007 directory is "jama/jama125/" find_package(NN REQUIRED) find_package(Jama REQUIRED) # Only include Kakadu if it is available if(${JP2KFLAG}) find_package(OpenCV 3.1.0 REQUIRED) find_package(OpenGL REQUIRED) find_package(PCL 1.8 REQUIRED) # "pcl-${PCL_FIND_VERSION}" find_package(Protobuf 2.6.1 REQUIRED) # "google-protobuf/protobuf${Protobuf_FIND_VERSION}/" find_package(Qwt 6 REQUIRED) # "qwt${Qwt_FIND_VERSION}" find_package(SuperLU 4.3 REQUIRED) # "superlu/superlu${SuperLU_FIND_VERSION}/superlu/" find_package(TIFF 4.0.5 REQUIRED) # "tiff/tiff-${TIFF_FIND_VERSION}" find_package(TNT 126 REQUIRED) # TNT version is 1.2.6, but v007 directory is "tnt/tnt126/" find_package(XercesC 3.1.2 REQUIRED) # "xercesc/xercesc-${XercesC_FIND_VERSION}/" find_package(X11 6 REQUIRED) find_package(Kakadu) endif(${JP2KFLAG}) # v007 might have different versions installed for our mac and linux systems. # Im this case, we specify the version numbers being searched for in the non-traditional installs. if(APPLE) find_package(Geos 3.5.0 REQUIRED) else(APPLE) find_package(Geos 3.5.1 REQUIRED) endif(APPLE) get_cmake_property(_variableNames VARIABLES) # Get All VARIABLES foreach (_variableName ${_variableNames}) Loading Loading @@ -181,7 +225,6 @@ foreach (_variableName ${_variableNames}) endif(_variableName MATCHES "^CMAKE+") endforeach() #list(APPEND ALLLIBDIRS "/usr/lib64") list(REMOVE_DUPLICATES ALLLIBDIRS) list(REMOVE_DUPLICATES ALLLIBS) list(REMOVE_DUPLICATES ALLINCDIRS) Loading Loading @@ -319,7 +362,6 @@ set(RAW_DYNAMIC_LIBS ${QT_DYNAMIC_LIBS} # For each item in this list, expand the wildcard to get the actual library list. foreach(lib ${RAW_DYNAMIC_LIBS}) string(FIND "${lib}" "*" position) if(${position} EQUAL -1) # No wildcard, just add it. Loading @@ -331,7 +373,7 @@ foreach(lib ${RAW_DYNAMIC_LIBS}) endif() endforeach() message("THIRDPARTYLIBS = ${THIRDPARTYLIBS}") # message("THIRDPARTYLIBS = ${THIRDPARTYLIBS}") # Plugins file(GLOB_RECURSE THIRDPARTYPLUGINS "${PLUGIN_DIR}/*${SO}") Loading isis/cmake/FindBoost.cmake +32 −3 Original line number Diff line number Diff line Loading @@ -6,91 +6,115 @@ find_path(BOOST_INCLUDE_DIR NAME flyweight.hpp PATH_SUFFIXES boost/boost1.59.0/boost/ boost PATH_SUFFIXES "boost/boost${Boost_FIND_VERSION}/boost/" "boost" ) message("BOOST_INCLUDE_DIR = ${BOOST_INCLUDE_DIR}") get_filename_component(BOOST_ROOT_INCLUDE_DIR "${BOOST_INCLUDE_DIR}" DIRECTORY) find_library(BOOST_ATOMIC_MT_LIBRARY NAMES boost_atomic-mt boost_atomic ) find_library(BOOST_LOG_MT_LIBRARY NAMES boost_log-mt boost_log ) find_library(BOOST_REGEX_MT_LIBRARY NAMES boost_regex-mt boost_regex ) find_library(BOOST_LOG_SETUP_MT_LIBRARY NAMES boost_log_setup-mt boost_log_setup ) find_library(BOOST_SERIALIZATION_MT_LIBRARY NAMES boost_serialization-mt boost_serialization ) find_library(BOOST_CHRONO_MT_LIBRARY NAMES boost_chrono-mt boost_chrono ) find_library(BOOST_MATH_C99_MT_LIBRARY NAMES boost_math_c99-mt boost_math_c99 ) find_library(BOOST_SIGNALS_MT_LIBRARY NAMES boost_signals-mt boost_signals ) find_library(BOOST_CONTAINER_MT_LIBRARY NAMES boost_container-mt boost_container ) find_library(BOOST_MATH_C99F_MT_LIBRARY NAMES boost_math_c99f-mt boost_math_c99f ) find_library(BOOST_CONTEXT_MT_LIBRARY NAMES boost_context-mt boost_context ) find_library(BOOST_MATH_C99L_MT_LIBRARY NAMES boost_math_c99l-mt boost_math_c99l ) find_library(BOOST_SYSTEM_MT_LIBRARY NAMES boost_system-mt boost_system ) find_library(BOOST_COROUTINE_MT_LIBRARY NAMES boost_coroutine-mt boost_coroutine ) find_library(BOOST_MATH_TR1_MT_LIBRARY NAMES boost_math_tr1-mt boost_math_tr1 ) find_library(BOOST_MATH_TR1F_MT_LIBRARY NAMES boost_math_tr1f-mt boost_math_tr1f ) find_library(BOOST_MATH_TR1L_MT_LIBRARY NAMES boost_math_tr1l-mt boost_math_tr1l ) find_library(BOOST_TEST_EXEC_MONITOR_MT_LIBRARY NAMES boost_test_exec_monitor-mt boost_test_exec_monitor ) find_library(BOOST_DATE_TIME_MT_LIBRARY NAMES boost_date_time-mt boost_date_time ) find_library(BOOST_THREAD_MT_LIBRARY NAMES boost_thread-mt boost_thread ) find_library(BOOST_EXCEPTION_MT_LIBRARY NAMES boost_exception-mt boost_exception ) find_library(BOOST_TIMER_MT_LIBRARY NAMES boost_timer-mt boost_timer ) find_library(BOOST_FILESYSTEM_MT_LIBRARY NAMES boost_filesystem-mt boost_filesystem ) find_library(BOOST_PRG_EXEC_MONITOR_MT_LIBRARY NAMES boost_prg_exec_monitor-mt boost_prg_exec_monitor ) find_library(BOOST_PROGRAM_OPTIONS_MT_LIBRARY NAMES boost_program_options-mt boost_program_options ) find_library(BOOST_UNIT_TEST_FRAMEWORK_MT_LIBRARY NAMES boost_unit_test_framework-mt boost_unit_test_framework ) find_library(BOOST_IOSTREAMS_MT_LIBRARY NAMES boost_iostreams-mt boost_iostreams ) Loading @@ -100,9 +124,11 @@ find_library(BOOST_IOSTREAMS_MT_LIBRARY #find_library(BOOST_PYTHON_MT_LIBRARY # NAMES boost_python-mt boost_python #) find_library(BOOST_WAVE_MT_LIBRARY NAMES boost_wave-mt boost_wave ) #tjw: not being linked against by ISIS presently #find_library(BOOST_LOCAL_MT_LIBRARY # NAMES boost_locale-mt boost_locale Loading @@ -110,12 +136,15 @@ find_library(BOOST_WAVE_MT_LIBRARY find_library(BOOST_RANDOM_MT_LIBRARY NAMES boost_random-mt boost_random ) find_library(BOOST_WSERIALIZATION_MT_LIBRARY NAMES boost_wserialization-mt boost_wserialization ) find_library(PYTHON_LIBRARY NAMES python2 python2.7 python3 ) find_library(C_LIBRARY NAMES c ) Loading
isis/CMakeLists.txt +42 −67 Original line number Diff line number Diff line Loading @@ -10,40 +10,7 @@ cmake_minimum_required(VERSION 3.4) # Point cmake to our other CMake files. list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") list(APPEND CMAKE_INCLUDE_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/objects/ /usgs/pkgs/local/v007/include/google-protobuf/protobuf2.6.1/ /usgs/pkgs/local/v007/include/xercesc/xercesc-3.1.2/ /usgs/pkgs/local/v007/include/tiff/tiff-4.0.5/ /usr/lib64/ ) set(CMAKE_PREFIX_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/libexec/ /opt/usgs/v007/ports/Library/Frameworks/ /opt/usgs/v007/ports/libexec/ /opt/usgs/v007/ports/bin/ /opt/usgs/v007/ports/lib/ /opt/usgs/v007/ports/include/ /opt/usgs/v007/ports/libexec/qt5 /opt/usgs/v007/ports/libexec/qt5/bin/ /opt/usgs/v007/ports/libexec/qt5/lib/ /opt/usgs/v007/3rdparty/bin /opt/usgs/v007/3rdparty/include/ /opt/usgs/v007/3rdparty/lib/ /opt/usgs/v007/proprietary/ /opt/usgs/v007/proprietary/include/ /opt/usgs/v007/proprietary/lib/ /usr/lib /usr/lib64/ /usr/local/lib ) set(CMAKE_FIND_FRAMEWORK LAST) include(AddIsisModule) include(Utilities) Loading @@ -56,7 +23,6 @@ include(InstallThirdParty) project (USGS_ISIS) # Short and long name of this package set(PACKAGE "ISIS") set(PACKAGE_NAME "USGS ISIS") Loading Loading @@ -91,20 +57,33 @@ message("Detected Operating System: ${osVersionString}") # as a static library using some specialized code in Utilities.cmake. set(BUILD_SHARED_LIBS ON) # Specify flags used set(thirdPartyCppFlags -Wall -std=c++11 -DISIS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-parameter -Wno-overloaded-virtual) #set(thirdPartyCppFlags -Wall -ansi -DISIS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-parameter -Wno-overloaded-virtual) # Specify user options that can be passed in with the initial CMake command. option(isis3Data "Directory containing Isis3Data" "NA") option(isis3TestData "Directory containing Isis3TestData" "NA") option(testOutputDir "Directory to store app test output folders" "NA") option(isis3Data "Directory containing Isis3Data" OFF ) option(isis3TestData "Directory containing Isis3TestData" OFF ) option(testOutputDir "Directory to store app test output folders" OFF ) option(buildCore "Build the core ISIS modules" ON ) option(buildMissions "Build the mission specific modules" ON ) option(buildStaticCore "Build libisis3 static as well as dynamic" OFF ) option(buildTests "Set up unit, application, and module tests." ON ) option(JP2KFLAG "Whether or not to build using JPEG2000 support" ON ) option(develop "Use a devleopment configuration" ON ) # options only allow on/off but this flag is piped into ISIS as ENABLEJP2K # needs to be either 1 or 0 for C style true false if(JP2KFLAG) set(JP2KFLAG 1) endif() # Prioritize passed in variables over env vars, probably a better way to do this if(DEFINED ENV{ISIS3DATA} AND NOT isis3Data) set(isis3Data $ENV{ISIS3DATA}) endif() if(DEFINED ENV{ISIS3TESTDATA} AND NOT isis3TestData) set(isis3TestData $ENV{ISIS3TESTDATA}) endif() if(EXISTS ${isis3Data}) set(ENV{ISIS3DATA} "${isis3Data}") Loading @@ -112,12 +91,14 @@ if(EXISTS ${isis3Data}) else() message(WARNING "Isis3Data directory ${isis3Data} not found, unit tests will fail.") endif() if(EXISTS ${isis3TestData}) set(ENV{ISIS3TESTDATA} "${isis3TestData}") message("Using ISIS3TESTDATA = $ENV{ISIS3TESTDATA}") else() message(WARNING "Isis3TestData directory ${isis3TestData} not found, application and module tests will fail.") endif() #if(EXISTS ${CMAKE_INSTALL_PREFIX}) # set(ENV{CMAKE_INSTALL_PREFIX} "${CMAKE_INSTALL_PREFIX}") # message("Using INSTALL PREFIX = $ENV{CMAKE_INSTALL_PREFIX}") Loading @@ -127,6 +108,7 @@ endif() if(${testOutputDir} STREQUAL "OFF") message("Writing test data folders to = ${CMAKE_BINARY_DIR}/testOutputDir") set(testOutputDir "${CMAKE_BINARY_DIR}/testOutputDir") execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/testOutputDir) else() # User specified a test output folder, make sure it exists. Loading Loading @@ -155,19 +137,17 @@ include(FindAllDependencies) include_directories(SYSTEM ${ALLINCDIRS}) link_directories(${ALLLIBDIRS}) # add isis headers # inject ISISROOT add_definitions( -DISISROOT="${CMAKE_SOURCE_DIR}" ) add_definitions( -DISISBUILDDIR="${CMAKE_BINARY_DIR}" ) # add isis headers file(GLOB ISIS_HEADERS ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.h ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.hpp) file(COPY ${ISIS_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/inc) include_directories(${CMAKE_BINARY_DIR}/inc) # install scripts # file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/scripts) # file(COPY ${CMAKE_SOURCE_DIR}/scripts DESTINATION ${CMAKE_INSTALL_PREFIX}) set(CORE_LIB_NAME isis3) # Specify relative library include paths which will be set up on Loading Loading @@ -209,7 +189,6 @@ install(FILES "${CMAKE_BINARY_DIR}/qt.conf" DESTINATION ${CMAKE_INSTALL_PREFIX}/ #Create the inc directory execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/inc) # Create an xml folder in the source directory that we will need later set(sourceXmlFolder ${CMAKE_BINARY_DIR}/bin/xml) execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/xml) Loading @@ -224,22 +203,18 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/make DESTINATION ${CMAKE_INSTALL_PREFIX}) add_subdirectory(src objects) # Set up third party libraries for installation install_third_party() # Some unit and app test rely on a 3rdParty structure and need to be copied execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/3rdParty ${CMAKE_BINARY_DIR}/3rdParty/lib ${CMAKE_BINARY_DIR}/3rdParty/plugins) # Create a link from the build/objects directory to each folder in 3rdPartyLibs/plugins. # - This is required so that the plugins can be found during unit tests. # TIP: Set "export QT_DEBUG_PLUGINS=1" to help debug plugin errors. foreach(plugin ${THIRDPARTYPLUGINFOLDERS}) get_filename_component(pluginName ${plugin} NAME) if(NOT EXISTS ${CMAKE_BINARY_DIR}/lib/${pluginName}) execute_process(COMMAND ln -s "${plugin}" ${pluginName} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib") execute_process(COMMAND cp -r ${CMAKE_BINARY_DIR}/lib/${pluginName} ${CMAKE_BINARY_DIR}/3rdParty/plugins/) endif() endforeach() # install_third_party() # # Create a link from the build/objects directory to each folder in 3rdPartyLibs/plugins. # # - This is required so that the plugins can be found during unit tests. # # TIP: Set "export QT_DEBUG_PLUGINS=1" to help debug plugin errors. # foreach(plugin ${THIRDPARTYPLUGINFOLDERS}) # get_filename_component(pluginName ${plugin} NAME) # if(NOT EXISTS ${CMAKE_BINARY_DIR}/lib/${pluginName}) # execute_process(COMMAND ln -s "${plugin}" ${pluginName} # WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib") # endif() # endforeach() # Set up documentation build target. # - This script is called by running "make docs". Loading
isis/Jenkinsfile 0 → 100644 +62 −0 Original line number Diff line number Diff line pipeline { agent { docker { label 'cmake' image 'chrisryancombs/docker_isis' args '''\ -v /usgs/pkgs/local/v007:/usgs/pkgs/local/v007 \ -v /usgs/cpkgs/isis3/data:/usgs/cpkgs/isis3/data \ -v /usgs/cpkgs/isis3/testData:/usgs/cpkgs/isis3/testData\ ''' } } environment { ISISROOT="${workspace}" + "/build/" ISIS3TESTDATA="/usgs/cpkgs/isis3/testData/" ISIS3DATA="/usgs/cpkgs/isis3/data/" } stages { stage('Config') { steps { sh """ mkdir -p ./install ./build && cd build cmake -GNinja -DCMAKE_INSTALL_PREFIX=../install -Disis3Data=/usgs/cpkgs/isis3/data -Disis3TestData=/usgs/cpkgs/isis3/testData ../isis \ """ } } stage('Build') { steps { sh """ set +e cd build ninja -j8 && ninja install """ } } stage('Test'){ steps { sh """ export PATH="${PATH}:${ISISROOT}/bin" set +e cd build ctest -j8 -R _unit_ ctest -j8 -R _app_ ctest -j8 -R _module_ """ } } } // post { // success { // sh 'pwd && ls' // archiveArtifacts artifacts: "build/objects/*.o" // } // always { // mail to: 'ccombs@usgs.gov', // subject: "Build Finished: ${currentBuild.fullDisplayName}", // body: "Link: ${env.BUILD_URL}" // sh "rm -rf build/* && rm -rf install/*" // cleanWs() // } // } }
isis/cmake/AddIsisModule.cmake +2 −3 Original line number Diff line number Diff line Loading @@ -93,8 +93,6 @@ function(make_obj_unit_test moduleName testFile truthFile reqLibs pluginLibs) endfunction(make_obj_unit_test) # Incorporate a single obj folder function(add_isis_obj folder reqLibs) Loading Loading @@ -164,6 +162,7 @@ function(add_isis_obj folder reqLibs) # Folder with a plugin means that this is a separate library! # Add it here and then we are done with the source files. set(newSourceFiles ${thisSourceFiles} PARENT_SCOPE) if(NOT (${numPlugins} EQUAL 1)) message( FATAL_ERROR "Error: Multiple plugins found in folder!" ) endif() Loading
isis/cmake/FindAllDependencies.cmake +75 −33 Original line number Diff line number Diff line Loading @@ -4,6 +4,41 @@ # go looking for them if they are not? #=============================================================================== list(APPEND CMAKE_INCLUDE_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/objects/ /usgs/pkgs/local/v007/include/google-protobuf/protobuf2.6.1/ /usgs/pkgs/local/v007/include/xercesc/xercesc-3.1.2/ /usgs/pkgs/local/v007/include/tiff/tiff-4.0.5/ /usr/lib64/ ) set(CMAKE_PREFIX_PATH /usgs/pkgs/local/v007/include/ /usgs/pkgs/local/v007/bin/ /usgs/pkgs/local/v007/lib/ /usgs/pkgs/local/v007/libexec/ /opt/usgs/v007/ports/Library/Frameworks/ /opt/usgs/v007/ports/libexec/ /opt/usgs/v007/ports/bin/ /opt/usgs/v007/ports/lib/ /opt/usgs/v007/ports/include/ /opt/usgs/v007/ports/libexec/qt5 /opt/usgs/v007/ports/libexec/qt5/bin/ /opt/usgs/v007/ports/libexec/qt5/lib/ /opt/usgs/v007/3rdparty/bin /opt/usgs/v007/3rdparty/include/ /opt/usgs/v007/3rdparty/lib/ /opt/usgs/v007/proprietary/ /opt/usgs/v007/proprietary/include/ /opt/usgs/v007/proprietary/lib/ /usr/lib/ /usr/lib64/ /usr/local/lib/ ) # Specify top level directories set(thirdPartyDir "/usgs/pkgs/local/v007") set(INCLUDE_DIR "${thirdPartyDir}/include") Loading @@ -18,7 +53,6 @@ if(APPLE) set(PLUGIN_DIR "${thirdPartyDir}/ports/libexec/qt5/plugins") endif(APPLE) set(JP2KFLAG 1) # Add thirdPartyCppFlags set(thirdPartyCppFlags ${thirdPartyCppFlags} -DGMM_USES_SUPERLU) Loading @@ -38,6 +72,7 @@ find_program(PROTOC protoc REQUIRED) include(FindProtobuf) if(APPLE) find_package(OpenGL REQUIRED) find_package(Qt5 COMPONENTS Core Concurrent Loading Loading @@ -118,34 +153,43 @@ else() #oh god why find_library(QT5_XMLPATTERNS_LIBRARY NAMES Qt5XmlPatterns) endif(APPLE) find_package(Qwt 6 REQUIRED) find_package(XercesC 3.1 REQUIRED) find_package(GeoTIFF 2 REQUIRED) find_package(TIFF 5 REQUIRED) # Some of these will have non-traditional installs with version numbers in the paths in v007 # For these, we pass in a version number, and use it in the path suffix # This only applies to v007, and outside of the building, we should only expect standard installs # The v007-specific installs are listed beside their find_package calls below: find_package(Boost 1.59.0 REQUIRED) # "boost/boost${Boost_FIND_VERSION}/boost/" find_package(Bullet 2.86 REQUIRED) find_package(Cholmod 4.4.5 REQUIRED) # "SuiteSparse/SuiteSparse${Cholmod_FIND_VERSION}/SuiteSparse/" find_package(CSPICE 65 REQUIRED) find_package(TNT 1.2.6 REQUIRED) find_package(Geos 3.5.0 REQUIRED) find_package(GSL 19 REQUIRED) find_package(Protobuf 9 REQUIRED) find_package(Boost 1.59 REQUIRED) find_package(X11 6 REQUIRED) find_package(Eigen REQUIRED) find_package(Embree 2.15.0 REQUIRED) find_package(GeoTIFF 2 REQUIRED) find_package(GMM 5.0 REQUIRED) # "/gmm/gmm-${GMM_FIND_VERSION}/gmm/" find_package(GSL 19 REQUIRED) find_package(GMM REQUIRED) find_package(HDF5 1.8.15 REQUIRED) find_package(SuperLU 4.3 REQUIRED) find_package(Cholmod 4.4.5 REQUIRED) find_package(Embree 2.15.0 REQUIRED) find_package(PCL 1.8.0 REQUIRED) find_package(Eigen REQUIRED) find_package(Bullet 2.86 REQUIRED) find_package(OpenCV 3.1.0 REQUIRED) find_package(Jama 125 REQUIRED) # Jama version is 1.2.5, but v007 directory is "jama/jama125/" find_package(NN REQUIRED) find_package(Jama REQUIRED) # Only include Kakadu if it is available if(${JP2KFLAG}) find_package(OpenCV 3.1.0 REQUIRED) find_package(OpenGL REQUIRED) find_package(PCL 1.8 REQUIRED) # "pcl-${PCL_FIND_VERSION}" find_package(Protobuf 2.6.1 REQUIRED) # "google-protobuf/protobuf${Protobuf_FIND_VERSION}/" find_package(Qwt 6 REQUIRED) # "qwt${Qwt_FIND_VERSION}" find_package(SuperLU 4.3 REQUIRED) # "superlu/superlu${SuperLU_FIND_VERSION}/superlu/" find_package(TIFF 4.0.5 REQUIRED) # "tiff/tiff-${TIFF_FIND_VERSION}" find_package(TNT 126 REQUIRED) # TNT version is 1.2.6, but v007 directory is "tnt/tnt126/" find_package(XercesC 3.1.2 REQUIRED) # "xercesc/xercesc-${XercesC_FIND_VERSION}/" find_package(X11 6 REQUIRED) find_package(Kakadu) endif(${JP2KFLAG}) # v007 might have different versions installed for our mac and linux systems. # Im this case, we specify the version numbers being searched for in the non-traditional installs. if(APPLE) find_package(Geos 3.5.0 REQUIRED) else(APPLE) find_package(Geos 3.5.1 REQUIRED) endif(APPLE) get_cmake_property(_variableNames VARIABLES) # Get All VARIABLES foreach (_variableName ${_variableNames}) Loading Loading @@ -181,7 +225,6 @@ foreach (_variableName ${_variableNames}) endif(_variableName MATCHES "^CMAKE+") endforeach() #list(APPEND ALLLIBDIRS "/usr/lib64") list(REMOVE_DUPLICATES ALLLIBDIRS) list(REMOVE_DUPLICATES ALLLIBS) list(REMOVE_DUPLICATES ALLINCDIRS) Loading Loading @@ -319,7 +362,6 @@ set(RAW_DYNAMIC_LIBS ${QT_DYNAMIC_LIBS} # For each item in this list, expand the wildcard to get the actual library list. foreach(lib ${RAW_DYNAMIC_LIBS}) string(FIND "${lib}" "*" position) if(${position} EQUAL -1) # No wildcard, just add it. Loading @@ -331,7 +373,7 @@ foreach(lib ${RAW_DYNAMIC_LIBS}) endif() endforeach() message("THIRDPARTYLIBS = ${THIRDPARTYLIBS}") # message("THIRDPARTYLIBS = ${THIRDPARTYLIBS}") # Plugins file(GLOB_RECURSE THIRDPARTYPLUGINS "${PLUGIN_DIR}/*${SO}") Loading
isis/cmake/FindBoost.cmake +32 −3 Original line number Diff line number Diff line Loading @@ -6,91 +6,115 @@ find_path(BOOST_INCLUDE_DIR NAME flyweight.hpp PATH_SUFFIXES boost/boost1.59.0/boost/ boost PATH_SUFFIXES "boost/boost${Boost_FIND_VERSION}/boost/" "boost" ) message("BOOST_INCLUDE_DIR = ${BOOST_INCLUDE_DIR}") get_filename_component(BOOST_ROOT_INCLUDE_DIR "${BOOST_INCLUDE_DIR}" DIRECTORY) find_library(BOOST_ATOMIC_MT_LIBRARY NAMES boost_atomic-mt boost_atomic ) find_library(BOOST_LOG_MT_LIBRARY NAMES boost_log-mt boost_log ) find_library(BOOST_REGEX_MT_LIBRARY NAMES boost_regex-mt boost_regex ) find_library(BOOST_LOG_SETUP_MT_LIBRARY NAMES boost_log_setup-mt boost_log_setup ) find_library(BOOST_SERIALIZATION_MT_LIBRARY NAMES boost_serialization-mt boost_serialization ) find_library(BOOST_CHRONO_MT_LIBRARY NAMES boost_chrono-mt boost_chrono ) find_library(BOOST_MATH_C99_MT_LIBRARY NAMES boost_math_c99-mt boost_math_c99 ) find_library(BOOST_SIGNALS_MT_LIBRARY NAMES boost_signals-mt boost_signals ) find_library(BOOST_CONTAINER_MT_LIBRARY NAMES boost_container-mt boost_container ) find_library(BOOST_MATH_C99F_MT_LIBRARY NAMES boost_math_c99f-mt boost_math_c99f ) find_library(BOOST_CONTEXT_MT_LIBRARY NAMES boost_context-mt boost_context ) find_library(BOOST_MATH_C99L_MT_LIBRARY NAMES boost_math_c99l-mt boost_math_c99l ) find_library(BOOST_SYSTEM_MT_LIBRARY NAMES boost_system-mt boost_system ) find_library(BOOST_COROUTINE_MT_LIBRARY NAMES boost_coroutine-mt boost_coroutine ) find_library(BOOST_MATH_TR1_MT_LIBRARY NAMES boost_math_tr1-mt boost_math_tr1 ) find_library(BOOST_MATH_TR1F_MT_LIBRARY NAMES boost_math_tr1f-mt boost_math_tr1f ) find_library(BOOST_MATH_TR1L_MT_LIBRARY NAMES boost_math_tr1l-mt boost_math_tr1l ) find_library(BOOST_TEST_EXEC_MONITOR_MT_LIBRARY NAMES boost_test_exec_monitor-mt boost_test_exec_monitor ) find_library(BOOST_DATE_TIME_MT_LIBRARY NAMES boost_date_time-mt boost_date_time ) find_library(BOOST_THREAD_MT_LIBRARY NAMES boost_thread-mt boost_thread ) find_library(BOOST_EXCEPTION_MT_LIBRARY NAMES boost_exception-mt boost_exception ) find_library(BOOST_TIMER_MT_LIBRARY NAMES boost_timer-mt boost_timer ) find_library(BOOST_FILESYSTEM_MT_LIBRARY NAMES boost_filesystem-mt boost_filesystem ) find_library(BOOST_PRG_EXEC_MONITOR_MT_LIBRARY NAMES boost_prg_exec_monitor-mt boost_prg_exec_monitor ) find_library(BOOST_PROGRAM_OPTIONS_MT_LIBRARY NAMES boost_program_options-mt boost_program_options ) find_library(BOOST_UNIT_TEST_FRAMEWORK_MT_LIBRARY NAMES boost_unit_test_framework-mt boost_unit_test_framework ) find_library(BOOST_IOSTREAMS_MT_LIBRARY NAMES boost_iostreams-mt boost_iostreams ) Loading @@ -100,9 +124,11 @@ find_library(BOOST_IOSTREAMS_MT_LIBRARY #find_library(BOOST_PYTHON_MT_LIBRARY # NAMES boost_python-mt boost_python #) find_library(BOOST_WAVE_MT_LIBRARY NAMES boost_wave-mt boost_wave ) #tjw: not being linked against by ISIS presently #find_library(BOOST_LOCAL_MT_LIBRARY # NAMES boost_locale-mt boost_locale Loading @@ -110,12 +136,15 @@ find_library(BOOST_WAVE_MT_LIBRARY find_library(BOOST_RANDOM_MT_LIBRARY NAMES boost_random-mt boost_random ) find_library(BOOST_WSERIALIZATION_MT_LIBRARY NAMES boost_wserialization-mt boost_wserialization ) find_library(PYTHON_LIBRARY NAMES python2 python2.7 python3 ) find_library(C_LIBRARY NAMES c )