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_OUT ${CONFORMANCE_PREFIX}spir${CONFORMANCE_SUFFIX})
|
||||||
|
|
||||||
set (SPIR_SOURCES
|
set (SPIR_SOURCES
|
||||||
@@ -9,25 +6,18 @@ set (SPIR_SOURCES
|
|||||||
run_build_test.cpp
|
run_build_test.cpp
|
||||||
run_services.cpp
|
run_services.cpp
|
||||||
kernelargs.cpp
|
kernelargs.cpp
|
||||||
../math_brute_force/function_list.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(${SPIR_OUT}
|
add_executable(${SPIR_OUT}
|
||||||
${SPIR_SOURCES})
|
${SPIR_SOURCES})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set_target_properties(${SPIR_OUT} PROPERTIES
|
target_compile_options(${SPIR_OUT} PRIVATE -fexceptions -frtti)
|
||||||
COMPILE_FLAGS "-fexceptions -frtti")
|
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
set_target_properties(${SPIR_OUT} PROPERTIES
|
target_compile_options(${SPIR_OUT} PRIVATE /GR /EHs /EHc)
|
||||||
COMPILE_FLAGS "/GR /EHs /EHc")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(${SPIR_OUT} harness
|
target_link_libraries(${SPIR_OUT} harness ${CLConform_LIBRARIES})
|
||||||
${CLConform_LIBRARIES})
|
|
||||||
|
|
||||||
|
|
||||||
set_source_files_properties(${SPIR_SOURCES} PROPERTIES LANGUAGE CXX)
|
|
||||||
|
|
||||||
# Need to copy the spir zips to sit beside the executable
|
# 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
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// 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 "harness/compat.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user