2011-01-03 18:02:16 +03:00
|
|
|
cmake_minimum_required(VERSION 2.8.3.20110103)
|
|
|
|
project(ForceInclude C)
|
|
|
|
|
|
|
|
# Make sure the proper compiler is in use.
|
2014-10-14 18:25:32 +04:00
|
|
|
if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
2011-01-03 18:02:16 +03:00
|
|
|
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")
|