
Introduce a new signature for try_compile (and try_run) which removes the `bindir` argument and requires the SOURCES tag. This will eventually allow us to add other ways of providing sources, but also allows us to change the behavior without breaking compatibility. The old signature uses a special, but non-unique temporary location inside the specified `bindir`, which conventionally is just the project's build directory. The new signature unconditionally uses the a unique temporary directory which is unconditionally within the project's build directory (which is no longer separately specified). This ensures that successive runs do not overwrite previous runs, will simplify debugging, and should also, eventually, allow us to execute multiple trials in parallel.
13 lines
339 B
CMake
13 lines
339 B
CMake
include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
|
|
|
|
enable_language(ISPC)
|
|
|
|
set(CMAKE_ISPC_INSTRUCTION_SETS avx512skx-i32x16 avx512skx-i32x16)
|
|
|
|
try_compile(result ${try_compile_bindir_or_SOURCES}
|
|
${try_compile_redundant_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.ispc
|
|
OUTPUT_VARIABLE out
|
|
)
|
|
|
|
message("try_compile output:\n${out}")
|