Run PDBDirectoryAndName test on MSVC and Intel

Move it out of the condition that also accepts MinGW/MSYS.
Teach the test to allow the Intel for Windows compiler but
do not verify the results because the compiler does not
seem to write PDB output in all cases.
This commit is contained in:
Brad King 2012-09-29 06:36:46 -04:00
parent efc83b369b
commit 2ccca05fad
2 changed files with 8 additions and 3 deletions

View File

@ -1254,12 +1254,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
if(CMAKE_TEST_MSVC) if(CMAKE_TEST_MSVC)
ADD_TEST_MACRO(ForceInclude foo) ADD_TEST_MACRO(ForceInclude foo)
ADD_TEST_MACRO(PDBDirectoryAndName myexe)
ADD_TEST_MACRO(PrecompiledHeader foo) ADD_TEST_MACRO(PrecompiledHeader foo)
endif() endif()
if(CMAKE_TEST_MSVC OR if(CMAKE_TEST_MSVC OR
"${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles") "${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles")
ADD_TEST_MACRO(ModuleDefinition example_exe) ADD_TEST_MACRO(ModuleDefinition example_exe)
ADD_TEST_MACRO(PDBDirectoryAndName myexe)
endif() endif()
ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables) ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables)

View File

@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(PDBDirectoryAndName C) project(PDBDirectoryAndName C)
if(NOT MSVC) # Make sure the proper compiler is in use.
MESSAGE(FATAL_ERROR "The PDB file test works only with MSVC") if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
message(FATAL_ERROR "The PDBDirectoryAndName test works only with MSVC or Intel")
endif() endif()
set(my_targets "") set(my_targets "")
@ -57,6 +58,10 @@ target_link_libraries(myexe2 mylibA mylibD)
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
return() return()
endif() endif()
# PDB output not fully implemented for Intel
if("${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
return()
endif()
set(pdbs "") set(pdbs "")
foreach(t ${my_targets}) foreach(t ${my_targets})