diff --git a/test_conformance/spir/CMakeLists.txt b/test_conformance/spir/CMakeLists.txt index f65c03139f..1ac49ac36d 100644 --- a/test_conformance/spir/CMakeLists.txt +++ b/test_conformance/spir/CMakeLists.txt @@ -1,6 +1,3 @@ -# Import function list from math_brute_force -add_definitions(-DFUNCTION_LIST_ULPS_ONLY) - set(SPIR_OUT ${CONFORMANCE_PREFIX}spir${CONFORMANCE_SUFFIX}) set (SPIR_SOURCES @@ -9,25 +6,18 @@ set (SPIR_SOURCES run_build_test.cpp run_services.cpp kernelargs.cpp - ../math_brute_force/function_list.cpp ) add_executable(${SPIR_OUT} ${SPIR_SOURCES}) if(UNIX) - set_target_properties(${SPIR_OUT} PROPERTIES - COMPILE_FLAGS "-fexceptions -frtti") + target_compile_options(${SPIR_OUT} PRIVATE -fexceptions -frtti) elseif(MSVC) - set_target_properties(${SPIR_OUT} PROPERTIES - COMPILE_FLAGS "/GR /EHs /EHc") + target_compile_options(${SPIR_OUT} PRIVATE /GR /EHs /EHc) endif() -TARGET_LINK_LIBRARIES(${SPIR_OUT} harness - ${CLConform_LIBRARIES}) - - -set_source_files_properties(${SPIR_SOURCES} PROPERTIES LANGUAGE CXX) +target_link_libraries(${SPIR_OUT} harness ${CLConform_LIBRARIES}) # Need to copy the spir zips to sit beside the executable diff --git a/test_conformance/spir/main.cpp b/test_conformance/spir/main.cpp index b02da734ac..ca02e5c21b 100644 --- a/test_conformance/spir/main.cpp +++ b/test_conformance/spir/main.cpp @@ -13,6 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. // + +// Import function list from math_brute_force +#define FUNCTION_LIST_ULPS_ONLY +#include "../math_brute_force/function_list.cpp" + #include "harness/compat.h" #include