diff options
author | Brad King <brad.king@kitware.com> | 2013-11-13 21:01:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-15 19:38:18 (GMT) |
commit | bca67c710f21cdea70c9b23fe927c87135ee81d9 (patch) | |
tree | a661bbd7b31601f890ffbc7110bb242c92e1d8b5 /Tests/RunCMake/build_command | |
parent | 05923172f94d804dfba33957aa08ac88cc5cd0bd (diff) | |
download | CMake-bca67c710f21cdea70c9b23fe927c87135ee81d9.zip CMake-bca67c710f21cdea70c9b23fe927c87135ee81d9.tar.gz CMake-bca67c710f21cdea70c9b23fe927c87135ee81d9.tar.bz2 |
build_command: Return a "cmake --build" command-line
Re-implement the build_command() command to use "cmake --build" instead
of generating a native build tool invocation directly. This command
will internally invoke the proper native build tool.
This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce
a string so that it can be later refactored to produce a vector with no
quoting or escaping. It will also allow us to later teach CMake to
delay the decision about which build tool to invoke until after the
project build system is generated to disk. For example, on Visual
Studio 10 and above the preferred command-line tool is MSBuild, but we
need to fall back to devenv if the .sln has Intel Fortran .vfproj files.
Diffstat (limited to 'Tests/RunCMake/build_command')
-rw-r--r-- | Tests/RunCMake/build_command/BeforeProject-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/build_command/BeforeProject-stderr.txt | 10 | ||||
-rw-r--r-- | Tests/RunCMake/build_command/BeforeProject.cmake | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/Tests/RunCMake/build_command/BeforeProject-result.txt b/Tests/RunCMake/build_command/BeforeProject-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/build_command/BeforeProject-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/build_command/BeforeProject-stderr.txt b/Tests/RunCMake/build_command/BeforeProject-stderr.txt index d3d7661..2ae0ed1 100644 --- a/Tests/RunCMake/build_command/BeforeProject-stderr.txt +++ b/Tests/RunCMake/build_command/BeforeProject-stderr.txt @@ -1,5 +1,7 @@ -CMake Error at BeforeProject.cmake:[0-9]+ \(build_command\): - build_command\(\) requires CMAKE_MAKE_PROGRAM to be defined. Call project\(\) - or enable_language\(\) first. +CMake Warning \(dev\) at BeforeProject.cmake:2 \(message\): + build_command\(\) returned: + + .*cmake.* --build \..* Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) + CMakeLists.txt:5 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/build_command/BeforeProject.cmake b/Tests/RunCMake/build_command/BeforeProject.cmake index 15788d1..a2175c4 100644 --- a/Tests/RunCMake/build_command/BeforeProject.cmake +++ b/Tests/RunCMake/build_command/BeforeProject.cmake @@ -1,2 +1,3 @@ build_command(MAKECOMMAND_DEFAULT_VALUE) +message(AUTHOR_WARNING "build_command() returned:\n ${MAKECOMMAND_DEFAULT_VALUE}") project(${RunCMake_TEST} NONE) |