diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2016-10-02 20:09:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-02 20:09:51 -0700 |
| commit | 3b2425833bfe8f11ba673c97864e8626aad683d7 (patch) | |
| tree | bf6d800451847335adb2629e82087e2bc99a0a9d /scripts | |
| parent | 3791fd9c10bfeab4a48c65a5ac7a4f2001623336 (diff) | |
| parent | 6cf29cdfb6ca86332cee8b221ed4e6c46dc025b9 (diff) | |
| download | vcpkg-3b2425833bfe8f11ba673c97864e8626aad683d7.tar.gz vcpkg-3b2425833bfe8f11ba673c97864e8626aad683d7.zip | |
Merge pull request #108 from traversaro/add-ace-port
Add ace port
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_build_msbuild.cmake | 46 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_execute_required_process.cmake | 2 |
2 files changed, 44 insertions, 4 deletions
diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index bf7c1b546..5b422fe5e 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -1,5 +1,42 @@ +#.rst: +# .. command:: vcpkg_build_msbuild +# +# Build a msbuild-based project. +# +# :: +# vcpkg_build_msbuild(PROJECT_PATH <sln_project_path> +# [RELEASE_CONFIGURATION <release_configuration>] # (default = "Release") +# [DEBUG_CONFIGURATION <debug_configuration>] @ (default = "Debug") +# [PLATFORM <platform>] # (default = "${TRIPLET_SYSTEM_ARCH}") +# [OPTIONS arg1 [arg2 ...]] +# [OPTIONS_RELEASE arg1 [arg2 ...]] +# [OPTIONS_DEBUG arg1 [arg2 ...]] +# ) +# +# ``PROJECT_PATH`` +# The path to the *.sln msbuild project file. +# ``RELEASE_CONFIGURATION`` +# The configuration (``/p:Configuration`` msbuild parameter) +# used for Release builds. +# ``DEBUG_CONFIGURATION`` +# The configuration (``/p:Configuration`` msbuild parameter) +# used for Debug builds. +# ``DEBUG_CONFIGURATION`` +# The configuration (``/p:Configuration`` msbuild parameter) +# used for Debug builds. +# ``PLATFORM`` +# The platform (``/p:Platform`` msbuild parameter) +# used for the build. +# ``OPTIONS`` +# The options passed to msbuild for all builds. +# ``OPTIONS_RELEASE`` +# The options passed to msbuild for Release builds. +# ``OPTIONS_DEBUG`` +# The options passed to msbuild for Debug builds. +# + function(vcpkg_build_msbuild) - cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) if(NOT DEFINED _csc_RELEASE_CONFIGURATION) set(_csc_RELEASE_CONFIGURATION Release) @@ -7,13 +44,16 @@ function(vcpkg_build_msbuild) if(NOT DEFINED _csc_DEBUG_CONFIGURATION) set(_csc_DEBUG_CONFIGURATION Debug) endif() + if(NOT DEFINED _csc_PLATFORM) + set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH}) + endif() message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} /p:Configuration=${_csc_RELEASE_CONFIGURATION} - /p:Platform=${TRIPLET_SYSTEM_ARCH} + /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel @@ -24,7 +64,7 @@ function(vcpkg_build_msbuild) vcpkg_execute_required_process( COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} /p:Configuration=${_csc_DEBUG_CONFIGURATION} - /p:Platform=${TRIPLET_SYSTEM_ARCH} + /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index bd6e56f7b..e10a12678 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -1,7 +1,7 @@ # Usage: vcpkg_execute_required_process(COMMAND <cmd> [<args>...] WORKING_DIRECTORY </path/to/dir> LOGNAME <my_log_name>) function(vcpkg_execute_required_process) cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) - #debug_message("vcpkg_execute_required_process(${vcpkg_execute_required_process_COMMAND})") + debug_message("vcpkg_execute_required_process(${vcpkg_execute_required_process_COMMAND})") execute_process( COMMAND ${vcpkg_execute_required_process_COMMAND} OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log |
