Преглед на файлове

Fix PrecompiledHeader test for Intel on Windows

This commit updates the test's sanity check to allow Intel too.
Previously it refused to run on non-MSVC compilers.
Brad King преди 16 години
родител
ревизия
667f0724a8
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      Tests/PrecompiledHeader/CMakeLists.txt

+ 3 - 3
Tests/PrecompiledHeader/CMakeLists.txt

@@ -2,9 +2,9 @@ cmake_minimum_required (VERSION 2.6)
 PROJECT(PrecompiledHeader C)
 
 # Make sure the proper compiler is in use.
-IF(NOT MSVC)
-  MESSAGE(FATAL_ERROR "The PrecompiledHeader test works only with MSVC")
-ENDIF(NOT MSVC)
+IF(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+  MESSAGE(FATAL_ERROR "The PrecompiledHeader test works only with MSVC or Intel")
+ENDIF()
 
 # Compute a custom name for the precompiled header.
 IF(CMAKE_CONFIGURATION_TYPES)