Debian Codegraph @

Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesISPC.cmake

raw
1
2 enable_language (ISPC)
3 include(CheckSourceCompiles)
4
5 check_source_compiles(ISPC "I don't build" SHOULD_FAIL)
6 if(SHOULD_FAIL)
7 message(SEND_ERROR "invalid ISPC source didn't fail.")
8 endif()
9
10 check_source_compiles(ISPC [=[
11
12 float func(uniform int32, float a)
13 {
14 return a / 2.25;
15 }
16 ]=]
17 SHOULD_BUILD)
18 if(NOT SHOULD_BUILD)
19 message(SEND_ERROR "Test fail for valid ISPC source.")
20 endif()