summaryrefslogtreecommitdiffstats
path: root/Tests/ForceInclude/CMakeLists.txt
blob: 129ced34151e3f8ef8570c6f4ea103f85f5873be (plain)
1
2
3
4
5
6
7
8
9
10
cmake_minimum_required(VERSION 3.10)
project(ForceInclude C)

# Make sure the proper compiler is in use.
if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "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")