Commit fad5b34a authored by Robert Maynard's avatar Robert Maynard

Set no-warn-unused-cli always when using a cmake external project.

This fixes having to explicitly state for each project that we want
to state that we should ignore unused command line arguments. This also
fixes a problem where the --no-warn-unused-cli flag was getting added to a
random variable in the generated config file when a project was placed in
developer mode.
parent a7034bcc
......@@ -362,6 +362,8 @@ function(add_external_project_internal name)
${ld_library_path_argument}
CMAKE_PREFIX_PATH "${prefix_path}"
CMAKE_ARGS
#make sure cmake doesn't warn about unused variables that are set
--no-warn-unused-cli
-DCMAKE_INSTALL_PREFIX:PATH=${prefix_path}
-DCMAKE_PREFIX_PATH:PATH=${prefix_path}
-DCMAKE_C_FLAGS:STRING=${project_c_flags}
......
......@@ -89,14 +89,6 @@ option(TRUST_SVN_CERTIFICATES_AUTOMATICALLY
"Trust SVN certificates automatically" ON)
mark_as_advanced(TRUST_SVN_CERTIFICATES_AUTOMATICALLY)
set(ignore_cmake_commandline_warning_option)
option(IGNORE_CMAKE_COMMANDLINE_WARNINGS
"Ignore the 'Manually-specified variables were not used by the project'" ON)
if (IGNORE_CMAKE_COMMANDLINE_WARNINGS)
set(ignore_cmake_commandline_warning_option "--no-warn-unused-cli")
endif()
#-----------------------------------------------------------------------------
# Setup some standard variables that control various locations and flags.
set (install_location "${CMAKE_CURRENT_BINARY_DIR}/install")
......
......@@ -15,6 +15,5 @@ add_external_project(gdal
${SuperBuild_PROJECTS_DIR}/patches/gdal.CMakeLists.txt
<SOURCE_DIR>/CMakeLists.txt
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
${suppress_build_out}
)
......@@ -12,7 +12,6 @@ endif()
add_external_project(shiboken
DEPENDS qt python
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
-DDISABLE_DOCSTRINGS:BOOL=ON
${suppress_build_out}
)
......@@ -2,12 +2,12 @@
add_external_project_or_just_build_dependencies(smtk
DEPENDS boost qt shiboken
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
${extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=ON
-DSMTK_BUILD_QT:BOOL=ON
-DSMTK_BUILD_PYTHON_WRAPPINGS:BOOL=${shiboken_ENABLED}
-DBoost_INCLUDE_DIR:PATH=<INSTALL_DIR>/include
-DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications
)
STRING(REGEX REPLACE ".*/libpython([0-9\\.]+)\\.dylib" "\\1" PYTHON_VERSION "${PYTHON_LIBRARY}" )
......@@ -16,7 +16,7 @@ if(shiboken_ENABLED)
add_external_project_step(install_shiboken_python_plugin
COMMENT "Fixing missing include files."
COMMAND ${CMAKE_COMMAND}
${ignore_cmake_commandline_warning_option}
-DBUILD_SHARED_LIBS:BOOL=ON
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DSMTK_BIN_DIR:PATH=${install_location}
......
......@@ -2,7 +2,6 @@
add_external_project_or_just_build_dependencies(cmb
DEPENDS remus vxl kml gdal qt python paraview molequeue smtk
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
${extra_cmake_args}
-DKML_DIR:PATH=<INSTALL_DIR>
-DGDAL_DIR:PATH=<INSTALL_DIR>
......@@ -23,7 +22,7 @@ if(APPLE)
add_external_project_step(install_cmb_paraview_plugin
COMMENT "Fixing missing include files."
COMMAND ${CMAKE_COMMAND}
${ignore_cmake_commandline_warning_option}
-DBUILD_SHARED_LIBS:BOOL=ON
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DCMB_BINARY_DIR:PATH=${SuperBuild_BINARY_DIR}/cmb/src/cmb-build
......
......@@ -9,8 +9,7 @@ if(SUPPRESS_GDAL_BUILD_OUTPUT)
set(suppress_build_out SUPPRESS_BUILD_OUTPUT)
endif()
add_external_project(gdal
add_external_project(gdal
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
${suppress_build_out}
)
......@@ -16,6 +16,5 @@ add_external_project(kml
<SOURCE_DIR>/src/kml/base/file_posix.cc
CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF
${ignore_cmake_commandline_warning_option}
${suppress_build_out}
)
......@@ -39,7 +39,6 @@ add_external_project(paraview
ffmpeg hdf5 libxml3 manta matplotlib mpi silo cgns mesa osmesa
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
-DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON
......
......@@ -14,7 +14,6 @@ add_external_project(png
CMAKE_ARGS
-DPNG_TESTS:BOOL=OFF
${ignore_cmake_commandline_warning_option}
# VTK uses API that gets hidden when PNG_NO_STDIO is TRUE (default).
-DPNG_NO_STDIO:BOOL=OFF
# Always build in release mode since the symlinks on Linux don't
......
......@@ -2,7 +2,6 @@
add_external_project(remus
DEPENDS boost zeroMQ
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
-DBUILD_SHARED_LIBS=OFF
-DRemus_ENABLE_EXAMPLES:BOOL=OFF
-DRemus_NO_SYSTEM_BOOST:BOOL=ON
......
......@@ -12,7 +12,6 @@ endif()
add_external_project(shiboken
DEPENDS qt python
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
"-C${CMAKE_BINARY_DIR}/env.cmake"
-DSET_RPATH:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=ON
......
......@@ -2,7 +2,6 @@
add_external_project_or_just_build_dependencies(smtk
DEPENDS boost qt shiboken
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
${extra_cmake_args}
"-C${CMAKE_BINARY_DIR}/env.cmake"
-DBUILD_SHARED_LIBS:BOOL=ON
......
......@@ -15,7 +15,6 @@ add_external_project(vxl
${SuperBuild_PROJECTS_DIR}/patches/vxl.core.vul.vul_psfile.h
<SOURCE_DIR>/core/vul/vul_psfile.h
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
#Needed to make sure we find the correct png lib/includes
-DCMAKE_FIND_FRAMEWORK=LAST
......
......@@ -4,7 +4,6 @@
add_external_project(vxl
DEPENDS png
CMAKE_ARGS
${ignore_cmake_commandline_warning_option}
#Needed to make sure we find the correct png lib/includes
-DCMAKE_FIND_FRAMEWORK=LAST
......
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