New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cmake fixes #1062
Cmake fixes #1062
Changes from all commits
43d27c7
25e6cf5
0e8dd8d
df35157
bb493f6
c4d9df1
89a1920
c7ff44d
96d0e43
1d5554a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
message("SIP: ${sip_pkg}") | ||
set(PyQt_deps ${pkgconfig_pkg} ${qt_pkg} ${sip_pkg} ${python_pkg}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,18 +17,6 @@ set(ENV{FLIBS} "") | |
set(ENV{LD_X11} "") # for xgks | ||
set(ENV{PYTHONPATH} @PYTHONPATH@) | ||
|
||
if (DEFINED ENV{UVCDAT_ANONYMOUS_LOG}) | ||
if (($ENV{UVCDAT_ANONYMOUS_LOG} STREQUAL "True") OR ($ENV{UVCDAT_ANONYMOUS_LOG} STREQUAL "False")) | ||
message("[INFO] Using UVCDAT_ANONYMOUS_LOG found in environment which is set to: '$ENV{UVCDAT_ANONYMOUS_LOG}'") | ||
else() | ||
message("[INFO] Found UVCDAT_ANONYMOUS_LOG in environment which is set to: '$ENV{UVCDAT_ANONYMOUS_LOG}'") | ||
message("[INFO] Valid values are 'True' or 'False' resetting to: 'True'") | ||
set(ENV{UVCDAT_ANONYMOUS_LOG} "True") | ||
endif() | ||
else() | ||
set(ENV{UVCDAT_ANONYMOUS_LOG} "True") | ||
endif() | ||
|
||
if(APPLE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That block is needed I think it will hang if you don't have a .uvcdat directory |
||
set(ENV{MAC_OSX_DEPLOYMENT_TARGET} "@CMAKE_OSX_DEPLOYMENT_TARGET@") | ||
endif() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import mpi4py" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err) | ||
|
||
if ( NOT ${res} EQUAL 0 ) | ||
message("[INFO] Could not system mpi4py, ${PYTHON_EXECUTABLE}") | ||
set( Mpi4py_FOUND 0 ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove these warmings? |
||
else ( NOT ${res} EQUAL 0 ) | ||
execute_process(COMMAND "@PYTHON_EXECUTABLE@" -c "import mpi4py;print mpi4py.__version__" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#============================================================================= | ||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) | ||
|
||
if ("${CMAKE_VERSION}" VERSION_LESS "2.8.12") | ||
message(WARNING "Your CMake version is ${CMAKE_VERSION} which is depreciated for UV-CDAT. The recommended minimum CMake version is 2.8.12. Using older versions can result in build errors particularly with Xcode 5") | ||
endif() | ||
|
||
# Project name and initial checks | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
project(cdat) | ||
|
||
# Set cdat and cmake variables | ||
#----------------------------------------------------------------------------- | ||
# Set various variables | ||
#============================================================================= | ||
set(LLNL_URL http://uv-cdat.llnl.gov/cdat/resources) | ||
set(cdat_CMAKE_SOURCE_DIR ${cdat_SOURCE_DIR}/CMake) | ||
set(cdat_CMAKE_BINARY_DIR ${cdat_BINARY_DIR}/CMake) | ||
|
@@ -36,8 +37,21 @@ set(CMAKE_MODULE_PATH | |
${CMAKE_MODULE_PATH} | ||
) | ||
|
||
if (DEFINED ENV{UVCDAT_ANONYMOUS_LOG}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh ok I see you put it back here |
||
if (($ENV{UVCDAT_ANONYMOUS_LOG} STREQUAL "True") OR | ||
($ENV{UVCDAT_ANONYMOUS_LOG} STREQUAL "False")) | ||
message("[INFO] Using UVCDAT_ANONYMOUS_LOG found in environment which is set to: '$ENV{UVCDAT_ANONYMOUS_LOG}'") | ||
else() | ||
message("[INFO] Found UVCDAT_ANONYMOUS_LOG in environment which is set to: '$ENV{UVCDAT_ANONYMOUS_LOG}'") | ||
message("[INFO] Valid values are 'True' or 'False' resetting to: 'True'") | ||
set(ENV{UVCDAT_ANONYMOUS_LOG} "True") | ||
endif() | ||
else() | ||
set(ENV{UVCDAT_ANONYMOUS_LOG} "True") | ||
endif() | ||
|
||
# Disable in source build of any kind. | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
include(CheckBuildOutOfSource) | ||
check_build_out_of_source("${cdat_SOURCE_DIR}" "${cdat_BINARY_DIR}" | ||
BUILDINSOURCE) | ||
|
@@ -48,15 +62,15 @@ if(BUILDINSOURCE) | |
endif() | ||
|
||
# Include useful cmake scripts | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
include(cmake_utils) | ||
include(check_fortran) | ||
include(CTest) | ||
|
||
# Set up the test data. If UVCDAT_USE_SYSTEM_TESTDATA is ON and UVCDAT_TESTDATA | ||
# is not set then we won't use it for testing. Otherwise we'll test either | ||
# with the system test data or download it ourselves. | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
if (BUILD_TESTING) | ||
set(UVCDAT_USE_SYSTEM_TESTDATA ON CACHE BOOL "Use UV-CDAT's test data from the system") | ||
if(UVCDAT_USE_SYSTEM_TESTDATA) | ||
|
@@ -121,7 +135,7 @@ if(APPLE) | |
endif() | ||
|
||
# Setup git and related options | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
find_package(Git) | ||
|
||
if(NOT GIT_PROTOCOL) | ||
|
@@ -146,7 +160,7 @@ if(NOT GIT_PROTOCOL) | |
endif() | ||
|
||
set(GIT_PROTOCOL ${temp_git_protocol} CACHE STRING "Choose protocol to be used by git" FORCE) | ||
set_property(CACHE GIT_PROTOCOL PROPERTY STRINGS "git://" "http://") | ||
set_property(CACHE GIT_PROTOCOL PROPERTY STRINGS "git://" "http://" "https://") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice |
||
endif() | ||
|
||
if(GIT_PROTOCOL MATCHES "http://") | ||
|
@@ -194,6 +208,7 @@ else() | |
endif() | ||
|
||
# Checkout the baseline repository. | ||
#============================================================================= | ||
if(BUILD_TESTING) | ||
set(UVCDAT_GIT_TESTDATA_DIR "${CMAKE_BINARY_DIR}/uvcdat-testdata/" | ||
CACHE PATH "Directory to store supplemental testing data (Baselines, etc).") | ||
|
@@ -214,44 +229,25 @@ if(BUILD_TESTING) | |
) | ||
endif() | ||
|
||
# Initialize submodules | ||
#----------------------------------------------------------------------------- | ||
# C. Doutriaux commented this out no submodules left at this time | ||
#if(GIT_FOUND) | ||
# message("[INFO] Updating git submodules") | ||
# execute_process( | ||
# COMMAND ${GIT_EXECUTABLE} submodule init | ||
# OUTPUT_VARIABLE subinit_out | ||
# ERROR_VARIABLE subinit_err | ||
# WORKING_DIRECTORY ${cdat_SOURCE_DIR} | ||
# ) | ||
# execute_process( | ||
# COMMAND ${GIT_EXECUTABLE} submodule update | ||
# OUTPUT_VARIABLE subup_out | ||
# ERROR_VARIABLE subup_err | ||
# WORKING_DIRECTORY ${cdat_SOURCE_DIR} | ||
# ) | ||
#endif() | ||
|
||
# Check if system has fortran compiler and act accordingly | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
if(CMAKE_Fortran_COMPILER) | ||
enable_language(Fortran) | ||
set(CONFIG_SUMMARY ${cdat_BINARY_DIR}/logs/config.summary) | ||
include(${CMAKE_ROOT}/Modules/CMakeDetermineFortranCompiler.cmake) | ||
endif(CMAKE_Fortran_COMPILER) | ||
|
||
|
||
# Set build related properties | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
set(PARTS_BUILT_INFO "${cdat_BINARY_DIR}/build_info.txt" CACHE STRING "File where to store build infos" FORCE) | ||
|
||
## The following is to know if we are prepring for an offline installation | ||
## ON is the default means we can download as we build | ||
## PREP means with are using this machine as a proxy to download all needed files in order to move them (somehow) to the OFFLINE machine where build will happen | ||
## OFF the machine has no internet access all files are suppposed to be here, pre-downloaded | ||
option(OFFLINE_BUILD "Is there internet access, are we preping for it?" OFF) | ||
# The following is to know if we are prepring for an offline installation | ||
# ON is the default means we can download as we build | ||
# PREP means with are using this machine as a proxy to download all needed | ||
# files in order to move them (somehow) to the OFFLINE machine where build will happen | ||
# OFF the machine has no internet access all files are suppposed to be here, pre-downloaded | ||
|
||
option(OFFLINE_BUILD "Is there internet access, are we preping for it?" OFF) | ||
option(CDAT_BUILD_PARALLEL "Build parallel components of CDAT" OFF) | ||
|
||
# OSMesa/VTK aren't playing nicely on macs. Disabling for now. | ||
|
@@ -274,7 +270,7 @@ option(CDAT_USE_SYSTEM_PYTHON "Use system Python" OFF) | |
set(CDAT_BUILD_LEAN OFF) | ||
set(CDAT_BUILD_ALL OFF) | ||
|
||
# Options | ||
# Some more options | ||
option(CDAT_BUILD_GUI "Builds GUI-based dependencies (Vistrails, ParaView, VisIt, R, etc.) " ON) | ||
option(CDAT_BUILD_GRAPHICS "Build graphics-based dependencies (vcs, pyqt, Vistrails, ParaView, VisIt, R, etc.) " ON) | ||
option(CDAT_BUILD_ESGF "Alias for CDAT_BUILD_LEAN" OFF) | ||
|
@@ -356,6 +352,8 @@ set(ep_log_options | |
) | ||
endif() | ||
|
||
# Set compiler arguments | ||
#============================================================================= | ||
set(cdat_compiler_args | ||
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} | ||
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} | ||
|
@@ -419,7 +417,7 @@ endif() | |
# Include external project now (we have our own modifications) and create | ||
# required directories as often third party install systems do bad things | ||
# when left to create them. | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
set(CDAT_PACKAGE_CACHE_DIR | ||
# ${CMAKE_CURRENT_BINARY_DIR}/../cdat_dependencies" | ||
"${CMAKE_CURRENT_BINARY_DIR}" | ||
|
@@ -438,13 +436,13 @@ file(MAKE_DIRECTORY ${cdat_BINARY_DIR}/build) | |
file(MAKE_DIRECTORY ${cdat_BINARY_DIR}/sources) | ||
|
||
# Configure cdat command files | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
set(cdat_configure_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/cdat_configure_step.cmake) | ||
set(cdat_make_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/cdat_make_step.cmake) | ||
set(cdat_install_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/cdat_install_step.cmake) | ||
|
||
# Include essential packages | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
set(external_packages) | ||
set(found_system_include_dirs) | ||
set(found_system_libraries) | ||
|
@@ -560,7 +558,7 @@ if (CDAT_BUILD_GUI) | |
endif() | ||
|
||
# Configure custom configure/build/install step files | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
configure_file(${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/cdat_common_environment.cmake.in | ||
${cdat_CMAKE_BINARY_DIR}/cdat_common_environment.cmake | ||
@ONLY | ||
|
@@ -602,9 +600,9 @@ configure_file(${cdat_CMAKE_SOURCE_DIR}/fix_install_name.py.in | |
) | ||
|
||
# Now sort and include external packages | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
include(TopologicalSort) | ||
message("[DEBUG] packages ${external_packages}") | ||
message("[INFO] These are the packages that we will try to build: ${external_packages}") | ||
foreach(package ${external_packages}) | ||
string(TOLOWER ${package} lc_package) | ||
include("${lc_package}_deps") | ||
|
@@ -632,8 +630,9 @@ foreach(package ${external_packages}) | |
endif() | ||
endforeach() | ||
file(WRITE ${PARTS_BUILT_INFO} ${packages_info}) | ||
|
||
# Construct Include and Link variables | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
if(found_system_include_dirs) | ||
list(REMOVE_DUPLICATES found_system_include_dirs) | ||
list(REMOVE_ITEM found_system_include_dirs ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}) | ||
|
@@ -657,11 +656,10 @@ message("[INFO] CDAT external link directories: ${cdat_external_link_directories | |
message("[INFO] WGET EXEC: ${WGET_EXECUTABLE}") | ||
|
||
# Configure remaining files | ||
#----------------------------------------------------------------------------- | ||
#============================================================================= | ||
|
||
# set candidate paths for setup_runtime scripts | ||
# will be added to environment variables in reverse order | ||
message("PARAVIEW VALS:${PARAVIEW_MAJOR}") | ||
set(SETUP_LIBRARY_PATHS | ||
"Externals/lib/paraview-${PARAVIEW_MAJOR}.${PARAVIEW_MINOR} " | ||
"Externals/lib/R/lib " | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove that one it was kind of nice to know it couldn't get the desired branch