https://github.com/Kitware/CMake
Revision bad16ab075097f09c5cf98a421cb1b08eec70cb3 authored by KWSys Robot on 07 April 2012, 04:01:03 UTC, committed by KWSys Robot on 07 April 2012, 04:05:06 UTC
1 parent 15f238f
Raw File
Tip revision: bad16ab075097f09c5cf98a421cb1b08eec70cb3 authored by KWSys Robot on 07 April 2012, 04:01:03 UTC
KWSys Nightly Date Stamp
Tip revision: bad16ab
CMakeLists.txt
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")
back to top