3 include(CheckCompilerFlag)
5 set(CUDA 1) # test that this is tolerated
7 check_compiler_flag(CUDA "-_this_is_not_a_flag_" SHOULD_FAIL)
9 message(SEND_ERROR "invalid CUDA compile flag didn't fail.")
12 check_compiler_flag(CUDA "-DFOO" SHOULD_WORK)
14 message(SEND_ERROR "${CMAKE_CUDA_COMPILER_ID} compiler flag '-DFOO' check failed")