CMake/Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesISPC.cmake
Brad King 64ac01451d Tests: Clarify RunCMake.Check* case names
Cases for `CheckSource{Compiles,Runs}` and `Check{Compiler,Linker}Flag`
cover the modules with the language as a parameter, not the
language-specific modules.
2022-10-06 10:29:42 -04:00

21 lines
387 B
CMake

enable_language (ISPC)
include(CheckSourceCompiles)
check_source_compiles(ISPC "I don't build" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid ISPC source didn't fail.")
endif()
check_source_compiles(ISPC [=[
float func(uniform int32, float a)
{
return a / 2.25;
}
]=]
SHOULD_BUILD)
if(NOT SHOULD_BUILD)
message(SEND_ERROR "Test fail for valid ISPC source.")
endif()