CMake/Tests/ForceInclude/CMakeLists.txt
Brad King b29eadd8f3 Map multiple /FI flags for VS < 10 (#11649)
The /FI flag may be repeated so the flag table entry needs to be marked
with SemicolonAppendable.  This was already the case for VS 10.
2011-01-03 10:02:16 -05:00

11 lines
365 B
CMake

cmake_minimum_required(VERSION 2.8.3.20110103)
project(ForceInclude C)
# Make sure the proper compiler is in use.
if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
message(FATAL_ERROR "The ForceInclude test works only with MSVC or Intel")
endif()
add_executable(foo foo.c)
set_property(SOURCE foo.c PROPERTY COMPILE_FLAGS "/FIfoo1.h /FIfoo2.h")