Commit: a9f2641cb64c6e3bfd2d9b162f4ede4efc988244 Author: Brecht Van Lommel Date: Mon Oct 19 17:42:17 2020 +0200 Branches: master https://developer.blender.org/rBa9f2641cb64c6e3bfd2d9b162f4ede4efc988244
Fix build error with WITH_CYCLES_NATIVE_ONLY and AVX tests on macOS Only build avx/avx2 unit tests if supported by the compiler and WITH_CYCLES_NATIVE_ONLY is off, otherwise the appropriate compiler flags are not available. =================================================================== M intern/cycles/test/CMakeLists.txt =================================================================== diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt index 7d8f5916fef..cf8ebc2a1d9 100644 --- a/intern/cycles/test/CMakeLists.txt +++ b/intern/cycles/test/CMakeLists.txt @@ -51,13 +51,17 @@ set(SRC util_string_test.cpp util_task_test.cpp util_time_test.cpp - util_avxf_avx_test.cpp - util_avxf_avx2_test.cpp util_transform_test.cpp ) -set_source_files_properties(util_avxf_avx_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}") -set_source_files_properties(util_avxf_avx2_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}") +if(CXX_HAS_AVX) + list(APPEND SRC util_avxf_avx_test.cpp) + set_source_files_properties(util_avxf_avx_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}") +endif() +if(CXX_HAS_AVX2) + list(APPEND SRC util_avxf_avx2_test.cpp) + set_source_files_properties(util_avxf_avx2_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}") +endif() if(WITH_GTESTS) BLENDER_SRC_GTEST(cycles "${SRC}" "${ALL_CYCLES_LIBRARIES}") _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs