Commit 1e5232fe authored by Ben Boeckel's avatar Ben Boeckel

cmake: remove build suppression logic

parent f057f606
......@@ -17,16 +17,13 @@ function(_PVExternalProject_Add_Win32 name)
set (arguments)
set (optional_depends)
set (accumulate TRUE)
set (suppress_output FALSE)
foreach(arg IN LISTS ARGN)
if ("${arg}" MATCHES "^PROCESS_ENVIRONMENT$")
set (accumulate FALSE)
elseif ("${arg}" MATCHES "${_ep_keywords_ExternalProject_Add}")
set (accumulate TRUE)
elseif ("${arg}" MATCHES SUPPRESS_BUILD_OUTPUT)
set (suppress_output TRUE)
endif()
if (accumulate AND NOT "${arg}" MATCHES SUPPRESS_BUILD_OUTPUT)
if (accumulate)
list(APPEND arguments "${arg}")
endif()
endforeach()
......@@ -34,7 +31,6 @@ function(_PVExternalProject_Add_Win32 name)
unset(arguments)
unset(optional_depends)
unset(accumulate)
unset(suppress_output)
endfunction()
function (PVExternalProject_Add name)
......@@ -48,15 +44,7 @@ function (PVExternalProject_Add name)
# just create a temporary target so we can set target properties.
add_custom_target(pv-${name})
set( source )
set( suppress_output FALSE )
foreach(arg IN LISTS ARGN)
if ("${arg}" MATCHES SUPPRESS_BUILD_OUTPUT)
set (suppress_output TRUE)
else()
list(APPEND source "${arg}")
endif()
endforeach()
set( source "${ARGN}" )
_ep_parse_arguments(PVExternalProject_Add pv-${name} _EP_ "${source}")
get_property(loc_TEMP TARGET pv-${name}
PROPERTY _EP_BUILD_IN_SOURCE)
......@@ -93,11 +81,6 @@ function (PVExternalProject_Add name)
# check if we have a BUILD_COMMAND
get_property(has_build_command TARGET pv-${name}
PROPERTY _EP_BUILD_COMMAND SET)
if(suppress_output)
set(SUPPRESS_BUILD_OUTPUT TRUE)
else()
set(SUPPRESS_BUILD_OUTPUT FALSE)
endif()
if(has_build_command)
get_property(build_cmd TARGET pv-${name}
PROPERTY _EP_BUILD_COMMAND)
......@@ -189,7 +172,6 @@ function (PVExternalProject_Add name)
if (has_build_command)
get_target_property(step_command pv-${name} _EP_BUILD_COMMAND)
_ep_replace_location_tags(${name} step_command)
set(process_suppress_output ${suppress_output})
configure_file(${SuperBuild_CMAKE_DIR}/pep_configure.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/pv-${name}-build.cmake
@ONLY)
......
set (environment "@process_environment@")
set (command @step_command@)
set (suppress_output @process_suppress_output@)
set (key)
foreach (arg IN ITEMS ${environment})
......@@ -19,17 +18,8 @@ foreach (arg IN ITEMS ${environment})
endif()
endforeach()
if(suppress_output)
message("Start suppressing output for ${command}")
execute_process(COMMAND ${command}
OUTPUT_QUIET
ERROR_QUIET
RESULT_VARIABLE rv)
message("Done suppressing output for ${command}")
else()
execute_process(COMMAND ${command}
RESULT_VARIABLE rv)
endif()
execute_process(COMMAND ${command}
RESULT_VARIABLE rv)
if (NOT "${rv}" STREQUAL "0")
......
......@@ -19,24 +19,12 @@ endif()
string(REPLACE " " "\\ " boost_build_dir ${SuperBuild_BINARY_DIR}/boost/src/boost)
string(REPLACE " " "\\ " boost_install_dir ${install_location})
option(SUPPRESS_BOOST_BUILD_OUTPUT
"Suppress boost build output"
ON)
mark_as_advanced(SUPPRESS_BOOST_BUILD_OUTPUT)
set(suppress_build_out FALSE)
if(SUPPRESS_BOOST_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(boost
DEPENDS zlib
CONFIGURE_COMMAND ./bootstrap.sh ${boost_toolset} --prefix=${boost_install_dir}
BUILD_COMMAND ./b2 ${boost_toolset} address-model=${am} linkflags="-headerpad_max_install_names" --build-dir=${boost_build_dir} ${boost_with_args}
INSTALL_COMMAND ./b2 ${boost_toolset} address-model=${am} linkflags="-headerpad_max_install_names" ${boost_with_args} install --prefix=${boost_install_dir}
BUILD_IN_SOURCE 1
${suppress_build_out}
)
add_extra_cmake_args(
......
option(SUPPRESS_GDAL_BUILD_OUTPUT
"Suppress GDAL build output"
ON)
mark_as_advanced(SUPPRESS_GDAL_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_GDAL_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(gdal
# apple gdal doesn't install properly, so we have to patch the cmake lists
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/gdal.CMakeLists.txt
<SOURCE_DIR>/CMakeLists.txt
CMAKE_ARGS
${suppress_build_out}
)
add_external_project_step(gdalPatch
COMMAND ${CMAKE_COMMAND} -E copy_if_different
......
option(SUPPRESS_MOLEQUEUE_BUILD_OUTPUT
"Suppress Molequeue build output"
ON)
mark_as_advanced(SUPPRESS_MOLEQUEUE_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_MOLEQUEUE_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(molequeue
DEPENDS qt
......@@ -20,5 +9,4 @@ add_external_project(molequeue
-DBUILD_SHARED_LIBS:BOOL=ON
-DENABLE_TESTING:BOOL=OFF
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
${suppress_build_out}
)
option(SUPPRESS_SHIBOKEN_BUILD_OUTPUT
"Suppress SHIBOKEN build output"
ON)
mark_as_advanced(SUPPRESS_SHIBOKEN_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_SHIBOKEN_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(shiboken
DEPENDS qt python
CMAKE_ARGS
-DDISABLE_DOCSTRINGS:BOOL=ON
${suppress_build_out}
)
option(SUPPRESS_GDAL_BUILD_OUTPUT
"Suppress GDAL build output"
ON)
mark_as_advanced(SUPPRESS_GDAL_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_GDAL_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(gdal
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/gdal.frmts.CMakeLists.txt
<SOURCE_DIR>/frmts/CMakeLists.txt
CMAKE_ARGS
${suppress_build_out}
)
\ No newline at end of file
)
option(SUPPRESS_HDF5_BUILD_OUTPUT
"Suppress HDF5 build output"
ON)
mark_as_advanced(SUPPRESS_HDF5_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_HDF5_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(
hdf5
DEPENDS zlib szip
......@@ -23,5 +12,4 @@ add_external_project(
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=TRUE
-DHDF5_BUILD_HL_LIB:BOOL=TRUE
-DHDF5_BUILD_WITH_INSTALL_NAME:BOOL=TRUE
${suppress_build_out}
)
option(SUPPRESS_KML_BUILD_OUTPUT
"Suppress KML build output"
ON)
mark_as_advanced(SUPPRESS_KML_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_KML_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(kml
# kml has problems with newer gcc compilers with not including unistd.h
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
......@@ -16,5 +5,4 @@ add_external_project(kml
<SOURCE_DIR>/src/kml/base/file_posix.cc
CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF
${suppress_build_out}
)
......@@ -5,24 +5,11 @@ if (WIN32)
set (_install_location "../../../install")
endif()
option(SUPPRESS_NUMPY_BUILD_OUTPUT
"Suppress numpy build output"
ON)
mark_as_advanced(SUPPRESS_NUMPY_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_NUMPY_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(numpy
DEPENDS python
CONFIGURE_COMMAND ""
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
${suppress_build_out}
SUPPRESS_BUILD_OUTPUT
BUILD_COMMAND
${pv_python_executable} setup.py install --prefix=${_install_location}
)
option(SUPPRESS_PNG_BUILD_OUTPUT
"Suppress PNG build output"
ON)
mark_as_advanced(SUPPRESS_PNG_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_PNG_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(png
DEPENDS zlib
......@@ -20,5 +9,4 @@ add_external_project(png
# work right for debug mode (libpng.{so,a} points to libpng14.{so,a}
# instead of libpng14d.{so,a}).
-DCMAKE_BUILD_TYPE:STRING=Release
${suppress_build_out}
)
......@@ -2,17 +2,6 @@ if (APPLE)
message(FATAL_ERROR "ABORT")
endif()
option(SUPPRESS_PYTHON_BUILD_OUTPUT
"Suppress Python build output"
ON)
mark_as_advanced(SUPPRESS_PYTHON_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_PYTHON_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
set(libtype "--enable-shared")
if (CROSS_BUILD_STAGE STREQUAL "TOOLS")
set(libtype "--enable-static --disable-shared")
......@@ -24,6 +13,5 @@ add_external_project_or_use_system(python
--prefix=<INSTALL_DIR>
--enable-unicode
${libtype}
${suppress_build_out}
)
set (pv_python_executable "${install_location}/bin/python" CACHE INTERNAL "" FORCE)
option(SUPPRESS_SHIBOKEN_BUILD_OUTPUT
"Suppress SHIBOKEN build output"
ON)
mark_as_advanced(SUPPRESS_SHIBOKEN_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_SHIBOKEN_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(shiboken
DEPENDS qt python
CMAKE_ARGS
......@@ -17,5 +6,4 @@ add_external_project(shiboken
-DBUILD_SHARED_LIBS:BOOL=ON
-DDISABLE_DOCSTRINGS:BOOL=ON
-DBUILD_TESTS:BOOL=OFF
${suppress_build_out}
)
option(SUPPRESS_SZIP_BUILD_OUTPUT
"Suppress SZIP build output"
ON)
mark_as_advanced(SUPPRESS_SZIP_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_SZIP_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(szip
CONFIGURE_COMMAND <SOURCE_DIR>/configure
--enable-encoding
--prefix=<INSTALL_DIR>
${suppress_build_out}
)
# any project depending on szip, inherits these cmake variables
......
......@@ -5,17 +5,6 @@ else()
set(am 32)
endif()
option(SUPPRESS_BOOST_BUILD_OUTPUT
"Suppress boost build output"
ON)
mark_as_advanced(SUPPRESS_BOOST_BUILD_OUTPUT)
set(suppress_build_out FALSE)
if(SUPPRESS_BOOST_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
set(boost_with_args --with-date_time --with-filesystem --with-system --with-thread)
set(boost_toolset)
......@@ -36,7 +25,6 @@ add_external_project(boost
BUILD_COMMAND ./b2 ${boost_toolset} --build-dir=${boost_build_dir} address-model=${am} dll-path=${install_location}/lib ${boost_with_args}
INSTALL_COMMAND ./b2 ${boost_toolset} address-model=${am} ${boost_with_args} dll-path=${install_location}/lib install
BUILD_IN_SOURCE 1
${suppress_build_out}
)
add_extra_cmake_args(
......
option(SUPPRESS_NUMPY_BUILD_OUTPUT
"Suppress numpy build output"
ON)
mark_as_advanced(SUPPRESS_NUMPY_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_NUMPY_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project_or_use_system(numpy
DEPENDS python
CONFIGURE_COMMAND ""
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
${suppress_build_out}
BUILD_COMMAND
${pv_python_executable} setup.py install --prefix=<INSTALL_DIR>
)
option(SUPPRESS_VXL_BUILD_OUTPUT
"Suppress VXL build output"
ON)
mark_as_advanced(SUPPRESS_VXL_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_VXL_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(vxl
DEPENDS png
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
......@@ -47,7 +36,6 @@ add_external_project(vxl
-DBUILD_UNMAINTAINED_LIBRARIES=OFF
-DBUILD_VGUI=OFF
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
${suppress_build_out}
)
add_extra_cmake_args(
......
option(SUPPRESS_ZEROMQ_BUILD_OUTPUT
"Suppress ZeroMQ build output"
ON)
mark_as_advanced(SUPPRESS_ZEROMQ_BUILD_OUTPUT)
set(suppress_build_out)
if(SUPPRESS_ZEROMQ_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(zeroMQ
CONFIGURE_COMMAND <SOURCE_DIR>/configure
--enable-shared
--disable-static
--prefix=<INSTALL_DIR>
BUILD_IN_SOURCE 1
${suppress_build_out}
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment