* [scripts-audit rollup] PR #16419 * pull the cmake doc comment parsing out into its own function * support cmake helper ports * add real support for deprecation, as opposed to ad-hoc * [scripts-audit rollup] PR #16192 * add a z_ in front of internal functions * move internal functions out set feature_vars again in parent scope * [scripts-audit rollup] PR #16309 Audit vcpkg_copy_pdbs * [scripts-audit rollup] PR #16304 * Fix usage, documentation * [scripts-audit rollup] PR #16393 * [scripts-audit rollup] PR #16377 Deprecate `vcpkg_*_cmake` in favor of `vcpkg_cmake_*` from the `vcpkg-cmake` port, as well as `vcpkg_fixup_cmake_targets` in favor of `vcpkg_cmake_config_fixup` from the `vcpkg-cmake-config` port.
2.6 KiB
vcpkg_configure_cmake
The latest version of this document lives in the vcpkg repo.
This function has been deprecated in favor of vcpkg_cmake_configure
from the vcpkg-cmake port.
Configure CMake for Debug and Release builds of a project.
Usage
vcpkg_configure_cmake(
SOURCE_PATH <${SOURCE_PATH}>
[PREFER_NINJA]
[DISABLE_PARALLEL_CONFIGURE]
[NO_CHARSET_FLAG]
[GENERATOR <"NMake Makefiles">]
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
)
Parameters
SOURCE_PATH
Specifies the directory containing the CMakeLists.txt
.
By convention, this is usually set in the portfile as the variable SOURCE_PATH
.
PREFER_NINJA
Indicates that, when available, Vcpkg should use Ninja to perform the build. This should be specified unless the port is known to not work under Ninja.
DISABLE_PARALLEL_CONFIGURE
Disables running the CMake configure step in parallel. This is needed for libraries which write back into their source directory during configure.
This also disables CMAKE_DISABLE_SOURCE_CHANGES.
NO_CHARSET_FLAG
Disables passing utf-8
as the default character set to CMAKE_C_FLAGS
and CMAKE_CXX_FLAGS
.
This is needed for libraries that set their own source code's character set.
GENERATOR
Specifies the precise generator to use.
This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build.
If used for this purpose, it should be set to "NMake Makefiles"
.
OPTIONS
Additional options passed to CMake during the configuration.
OPTIONS_RELEASE
Additional options passed to CMake during the Release configuration. These are in addition to OPTIONS
.
OPTIONS_DEBUG
Additional options passed to CMake during the Debug configuration. These are in addition to OPTIONS
.
LOGNAME
Name of the log to write the output of the configure call to.
Notes
This command supplies many common arguments to CMake. To see the full list, examine the source.