diff options
author | Brad King <brad.king@kitware.com> | 2009-10-27 15:31:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-27 15:31:40 (GMT) |
commit | 2e48fe0eeccfd0b7da100d9b38effa0bff3452a7 (patch) | |
tree | 20a927790ded0ed32aad06a43f8b68bece13b836 /Tests/BuildDepends | |
parent | ccdd3e943de6e7bc2202f3f82c64fe2938f52988 (diff) | |
download | CMake-2e48fe0eeccfd0b7da100d9b38effa0bff3452a7.zip CMake-2e48fe0eeccfd0b7da100d9b38effa0bff3452a7.tar.gz CMake-2e48fe0eeccfd0b7da100d9b38effa0bff3452a7.tar.bz2 |
Avoid Intel linker crash in BuildDepends test
The BuildDepends test exercises incremental linking with MSVC and Intel
tools on Windows. In some cases the Intel compiler creates objects that
cause the MS linker it invokes to crash during incremental linking. We
avoid the problem for this test by disabling incremental linking.
Diffstat (limited to 'Tests/BuildDepends')
-rw-r--r-- | Tests/BuildDepends/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 3eb9195..8714640 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -28,6 +28,12 @@ function(help_xcode_depends) endif(HELP_XCODE) endfunction(help_xcode_depends) +# The Intel compiler causes the MSVC linker to crash during +# incremental linking, so avoid the /INCREMENTAL:YES flag. +if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel") + set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=") +endif() + file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project) message("Creating Project/foo.cxx") write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx @@ -49,6 +55,7 @@ try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild + CMAKE_FLAGS ${_cmake_options} OUTPUT_VARIABLE OUTPUT) if(HELP_XCODE) try_compile(RESULT @@ -131,6 +138,7 @@ try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project testRebuild + CMAKE_FLAGS ${_cmake_options} OUTPUT_VARIABLE OUTPUT) # Xcode is in serious need of help here |