mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
fix macos builds by avoiding double compilation of function_list.cpp for test_spir (#1866)
* modernize CMakeLists for test_spir * add the operating system release to the sccache key * include the math brute force function list vs. building it twice
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user