Commit 737c2871 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez
Browse files

updated status messages to actually use the STATUS param + cleaner messages

parent d106484f
Loading
Loading
Loading
Loading
+53 −38
Original line number Diff line number Diff line
@@ -66,11 +66,16 @@ 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(pybindings      "Turn on to build Python bindings"               OFF )
option(pybindings      "Turn on to build Python bindings"               ON )

Iterate through all variables and extract the libraries and include directories

# Iterate through all variables and extract the libraries and include directories
get_cmake_property(_variableNames VARIABLES) # Get All VARIABLES

set(ALLLIBDIRS "")
set(ALLLIBS "")
set(ALLINCDIRS "")

# Get all include dir variables
foreach (_variableName ${_variableNames})
#message("VAR=${_variableName}")
@@ -107,36 +112,27 @@ list(REMOVE_DUPLICATES ALLINCDIRS)
if(DEFINED ENV{CONDA_PREFIX} AND CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
 set(CMAKE_INSTALL_PREFIX $ENV{CONDA_PREFIX})
endif()
message("Installing in: ${CMAKE_INSTALL_PREFIX}")

# 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})
 set(isis3Data ON)
endif()
if(DEFINED ENV{ISIS3TESTDATA} AND NOT isis3TestData)
 set(isis3TestData $ENV{ISIS3TESTDATA})
 set(isis3TestData ON)
endif()

if(EXISTS ${isis3Data})
 set(ENV{ISIS3DATA} "${isis3Data}")
 message("Using ISIS3DATA = $ENV{ISIS3DATA}")
else()
 message(WARNING "Isis3Data directory ${isis3Data} not found, unit tests will fail.")
 set(isis3Data OFF)
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.")
 set(isis3TestData OFF)
endif()

if(${testOutputDir} STREQUAL "OFF")
@@ -149,25 +145,52 @@ else()
 execute_process(COMMAND mkdir -p ${testOutputDir})
endif()

message("========================== CONFIGURATION ========================== ")
message(STATUS "ISIS3DATA: ${isis3Data}")
message(STATUS "ISISTESTDATA: ${isis3TestData}")
message(STATUS "TEST OUTPUT DIR: ${testOutputDir}")
message(STATUS "BUILD STATIC CORE: ${buildStaticCore}")
message(STATUS "BUILD TESTS: ${buildTests}")
message(STATUS "BUILD CORE: ${buildCore}")
message(STATUS "BUILD MISSIONS: ${buildMissions}")
message(STATUS "JP2K SUPPORT: ${JP2KFLAG}")
message(STATUS "PYTHON BINDINGS: ${pybindings}")
message(STATUS "INSTALL LOCATION: ${CMAKE_INSTALL_PREFIX}")
message("=================================================================== ")
#===============================================================================
#===============================================================================

if(EXISTS ENV{CONDA_PREFIX})
  message("USING CONDA PREFIX: $ENV{CONDA_PREFIX}")
  list(APPEND CMAKE_FIND_ROOT_PATH $ENV{CONDA_PREFIX} $ENV{CONDA_PREFIX}/lib/cmake/Qt5)
endif()

# 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()

# Specify flags used
# on linux, add the conda prefix to handle possible issues with rpaths at link time
# sometimes third parties do not set their rpaths correctly
set(thirdPartyCppFlags -Wall                              \
                       -std=c++11                         \
                       -DISIS_LITTLE_ENDIAN=1             \
                       -fPIC -Wno-unused-parameter        \
                       -Wno-overloaded-virtual            \
                       -Wl,-rpath,$ENV{CONDA_PREFIX}/lib  \
                       -DGMM_USES_SUPERLU                 \
                       -DENABLEJP2K=${JP2KFLAG}           \
set(thirdPartyCppFlags -Wall
                       -std=c++11
                       -DISIS_LITTLE_ENDIAN=1
                       -fPIC -Wno-unused-parameter
                       -Wno-overloaded-virtual
                       -Wl,-rpath,$ENV{CONDA_PREFIX}/lib
                       -DGMM_USES_SUPERLU
                       -DENABLEJP2K=${JP2KFLAG}
                     )

 # Append CPP flags set in the third party lib file to the string set in this file.
 string(REPLACE ";" " " FLAGS_STR "${thirdPartyCppFlags}")
 set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} ${FLAGS_STR}" )
 # Set up the ctest tool which is used to run all of the tests.
 enable_testing()
 include(CTest)

# Flag to fix numeric literals problem with boost on linux
if(NOT APPLE)
  set(thirdPartyCppFlags ${thirdPartyCppFlags} -fext-numeric-literals )
@@ -176,7 +199,7 @@ endif()
# Set python bindings configuration
if(pybindings)
 find_package(Python REQUIRED)

 find_package(Sip    REQUIRED)
 # use PYINSTALL_DIR to overwrite python install directory
 # Better to use find Python script
 if (NOT DEFINED PYINSTALL_DIR)
@@ -269,7 +292,6 @@ ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.hpp)
file(COPY ${ISIS_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/inc)

include_directories(${CMAKE_BINARY_DIR}/inc)

set(CORE_LIB_NAME isis3)

# Specify relative library include paths which will be set up on
@@ -283,19 +305,12 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# We will set up some links with these files at the end of the install process so
#  make sure they are cleared at the start of the install process.
install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.5.0${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.5${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.${SO})")
EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestPreferences ${CMAKE_BINARY_DIR}/)
install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestPreferences ${CMAKE_INSTALL_PREFIX}/)")
install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/IsisPreferences ${CMAKE_INSTALL_PREFIX}/)")

# Append CPP flags set in the third party lib file to the string set in this file.
string(REPLACE ";" " " FLAGS_STR "${thirdPartyCppFlags}")
set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} ${FLAGS_STR}" )
# Set up the ctest tool which is used to run all of the tests.
enable_testing()
include(CTest)
# install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.5.0${SO})")
# install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.5${SO})")
# install(CODE "EXECUTE_PROCESS(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/lib/libisis3.${SO})")
# EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestPreferences ${CMAKE_BINARY_DIR}/)
# install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestPreferences ${CMAKE_INSTALL_PREFIX}/)")
# install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/IsisPreferences ${CMAKE_INSTALL_PREFIX}/)")

# Delete any existing plugin files in the build folder so they
#  don't get filled with duplicate entries.
+0 −2
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

include(CodeGeneration)


# Incorporate an application folder
function(add_isis_app folder libDependencies)

@@ -58,7 +57,6 @@ function(add_isis_app folder libDependencies)
      add_makefile_test_folder(${f} ${appName}_app)
    endforeach()
  endif()

endfunction(add_isis_app)


+0 −4
Original line number Diff line number Diff line

# This file contains everything that should be exectuted AFTER the installation
# step has completed.

@@ -10,8 +9,6 @@ install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3.5.0${SO} ${CMAKE_INSTALL_P
install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3.5${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis3${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis${SO})")



# On OSX, need to correct all the paths encoded in each of the distributed library files so
#  that they properly find the distruted files using relative paths.
if (APPLE)
@@ -26,5 +23,4 @@ if (APPLE)
    get_filename_component(name ${f} NAME)
    install(CODE "EXECUTE_PROCESS(COMMAND python ${CMAKE_SOURCE_DIR}/scripts/finalizeInstalledOsxRpaths.py ${CMAKE_INSTALL_PREFIX}/3rdParty/plugins/${name} resetRpath)")
  endforeach()

endif()
+11 −11
Original line number Diff line number Diff line
@@ -23,14 +23,14 @@ find_library(BULLET3_LINEARMATH_LIBRARY NAMES LinearMath)

get_filename_component(BULLET_ROOT_INCLUDE_DIR "${BULLET_INCLUDE_DIR}" DIRECTORY)

message( "-- BULLET INCLUDE: " ${BULLET_INCLUDE_DIR} )
message( "-- BULLET OPENCL: " ${BULLET_OPENCL_LIBRARY} )
message( "-- BULLET SOFTBODY: " ${BULLET_SOFTBODY_LIBRARY})
message( "-- BULLET INVERSE DYNAMICS: " ${BULLET_INVERSEDYNAMICS_LIBRARY} )
message( "-- BULLET DYNAMICS: " ${BULLET_DYNAMICS_LIBRARY} )
message( "-- BULLET COLLISION: " ${BULLET_COLLISION_LIBRARY} )
message( "-- BULLET GEOMETRY: " ${BULLET3_GEOMETRY_LIBRARY} )
message( "-- BULLET3 3DYNAMICS: " ${BULLET3_3DYNAMICS_LIBRARY} )
message( "-- BULLET3 3COLLISION: " ${BULLET3_3COLLISION_LIBRARY} )
message( "-- BULLET3 COMMON: " ${BULLET3_COMMON_LIBRARY} )
message( "-- BULLET3 LINEARMATH: "  ${BULLET3_LINEARMATH_LIBRARY} )
message(STATUS "BULLET INCLUDE: " ${BULLET_INCLUDE_DIR} )
message(STATUS "BULLET OPENCL: " ${BULLET_OPENCL_LIBRARY} )
message(STATUS "BULLET SOFTBODY: " ${BULLET_SOFTBODY_LIBRARY})
message(STATUS "BULLET INVERSE DYNAMICS: " ${BULLET_INVERSEDYNAMICS_LIBRARY} )
message(STATUS "BULLET DYNAMICS: " ${BULLET_DYNAMICS_LIBRARY} )
message(STATUS "BULLET COLLISION: " ${BULLET_COLLISION_LIBRARY} )
message(STATUS "BULLET GEOMETRY: " ${BULLET3_GEOMETRY_LIBRARY} )
message(STATUS "BULLET3 3DYNAMICS: " ${BULLET3_3DYNAMICS_LIBRARY} )
message(STATUS "BULLET3 3COLLISION: " ${BULLET3_3COLLISION_LIBRARY} )
message(STATUS "BULLET3 COMMON: " ${BULLET3_COMMON_LIBRARY} )
message(STATUS "BULLET3 LINEARMATH: "  ${BULLET3_LINEARMATH_LIBRARY} )
+2 −2
Original line number Diff line number Diff line
@@ -14,5 +14,5 @@ find_library(CSPICE_LIBRARY
  NAMES cspice
)

message( "-- CSPICE INCLUDE: " ${CSPICE_INCLUDE_DIR} )
message( "-- CSPICE LIB: "  ${CSPICE_LIBRARY} )
message(STATUS "CSPICE INCLUDE: " ${CSPICE_INCLUDE_DIR} )
message(STATUS "CSPICE LIB: "  ${CSPICE_LIBRARY} )
Loading