You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/05/15 17:33:42 UTC
[4/6] mesos git commit: CMake: Fixed `/debug:fastlink` on Windows.
CMake: Fixed `/debug:fastlink` on Windows.
A previous commit attempted to enable this option, but it was not
actually being used by the linker. This patch correctly adds the option
to each linker flag variable for static/shared libraries, modules, and
executables, and only for the debug configuration. This results in much
faster link times.
Also, the `/zc:inline` option was removed, as it is only relevant in
optimized builds (i.e. release configurations).
Review: https://reviews.apache.org/r/59155/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e938dade
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e938dade
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e938dade
Branch: refs/heads/master
Commit: e938dade76cba4202cc14c6b7fbdcf24d1cccd4e
Parents: 877f24b
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Wed May 10 14:03:22 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon May 15 09:44:08 2017 -0700
----------------------------------------------------------------------
cmake/CompilationConfigure.cmake | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e938dade/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index 7b2669f..08ecf27 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -74,11 +74,6 @@ if (WIN32)
echo "ERROR: Environment variable 'PreferredToolArchitecture' must be set to 'x64', see MESOS-6720 for details" 1>&2 && EXIT 1
)
)
-
- # Speed up incremental linking for the VS compiler/linker, for more info, see:
- # https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:inline")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /debug:FASTLINK")
endif (WIN32)
@@ -239,6 +234,12 @@ string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Linux" LINUX)
# WINDOWS CONFIGURATION.
########################
if (WIN32)
+ # Speed up incremental linking for the VS compiler/linker, for more info, see:
+ # https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/
+ foreach(t EXE SHARED STATIC MODULE)
+ string(APPEND CMAKE_${t}_LINKER_FLAGS_DEBUG " /debug:fastlink")
+ endforeach()
+
# COFF/PE and friends are somewhat limited in the number of sections they
# allow for an object file. We use this to avoid those problems.
set(CMAKE_CXX_FLAGS