diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-09-24 19:39:00 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-10-06 14:47:20 (GMT) |
commit | e17e2c6a517cf40b41014cdf3e239c0b21da868e (patch) | |
tree | 214a35d04a2214d1aa9d074cad80672ce1cb0f18 /Tests/RunCMake/CheckCompilerFlag | |
parent | a12da6fb5ece6baf3b4540d8204b8b29dde92538 (diff) | |
download | CMake-e17e2c6a517cf40b41014cdf3e239c0b21da868e.zip CMake-e17e2c6a517cf40b41014cdf3e239c0b21da868e.tar.gz CMake-e17e2c6a517cf40b41014cdf3e239c0b21da868e.tar.bz2 |
ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPC
Diffstat (limited to 'Tests/RunCMake/CheckCompilerFlag')
-rw-r--r-- | Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake new file mode 100644 index 0000000..662319a --- /dev/null +++ b/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake @@ -0,0 +1,13 @@ + +enable_language (ISPC) +include(CheckCompilerFlag) + +check_compiler_flag(ISPC "-_this_is_not_a_flag_" SHOULD_FAIL) +if(SHOULD_FAIL) + message(SEND_ERROR "invalid ISPC compile flag didn't fail.") +endif() + +check_compiler_flag(ISPC "--woff" SHOULD_WORK) +if(NOT SHOULD_WORK) + message(SEND_ERROR "${CMAKE_ISPC_COMPILER_ID} compiler flag '--woff' check failed") +endif() diff --git a/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake index d56b8a9..e4d65b8 100644 --- a/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake @@ -14,3 +14,7 @@ endif() if (CMAKE_Fortran_COMPILER_ID) run_cmake(CheckFortranCompilerFlag) endif() + +if(CMake_TEST_ISPC) + run_cmake(CheckISPCCompilerFlag) +endif() |