@@ -33,58 +33,37 @@ endforeach()
33
33
34
34
# Validate all the targets now have the proper values
35
35
foreach (suffix mode option IN ZIP_LISTS name_suffix modes compile_options )
36
- get_target_property (compile_opts not_yet_${suffix} INTERFACE_COMPILE_OPTIONS )
37
- if (NOT compile_opts MATCHES "-Xfatbin=-compress-all" )
38
- message (FATAL_ERROR "not_yet_${suffix} missing the compress-all compile flag" )
39
- endif ()
40
- if (NOT compile_opts MATCHES "--compress-mode=${option} " )
41
- message (FATAL_ERROR "not_yet_${suffix} missing the proper compress-mode flag of ${option} instead has ${compile_opts} "
42
- )
43
- endif ()
44
-
45
- get_target_property (compile_opts exists_${suffix} COMPILE_OPTIONS )
46
- if (NOT compile_opts MATCHES "-Xfatbin=-compress-all" )
47
- message (FATAL_ERROR "exists_${suffix} missing the compress-all compile flag" )
48
- endif ()
49
- if (NOT compile_opts MATCHES "--compress-mode=${option} " )
50
- message (FATAL_ERROR "exists_${suffix} missing the proper compress-mode flag of ${option} instead has ${compile_opts} "
51
- )
52
- endif ()
36
+ foreach (target IN ITEMS not_yet_${suffix} exists_${suffix} )
37
+ get_target_property (compile_opts ${target} INTERFACE_COMPILE_OPTIONS )
38
+ if (NOT compile_opts MATCHES "-Xfatbin=-compress-all" )
39
+ message (FATAL_ERROR "${target} missing the compress-all compile flag" )
40
+ endif ()
41
+ if (NOT compile_opts MATCHES "--compress-mode=${option} " )
42
+ message (FATAL_ERROR "${target} missing the proper compress-mode flag of ${option} instead has ${compile_opts} "
43
+ )
44
+ endif ()
45
+ endforeach ()
53
46
endforeach ()
54
47
55
48
# Handle checking all the tune types that map to `rapids`
56
- rapids_cuda_enable_fatbin_compression (TARGET not_yet )
57
- rapids_cuda_enable_fatbin_compression (TARGET not_yet_rapids TUNE_FOR rapids )
58
-
59
- get_target_property (compile_opts_a not_yet INTERFACE_COMPILE_OPTIONS )
60
- get_target_property (compile_opts_b not_yet_rapids INTERFACE_COMPILE_OPTIONS )
61
- if (NOT compile_opts_a STREQUAL compile_opts_b )
62
- message (FATAL_ERROR "rapids_cuda_enable_fatbin_compression without any TUNE_FOR should match 'rapids'"
63
- )
64
- endif ()
65
- if (NOT compile_opts_a MATCHES "-Xfatbin=-compress-all" )
66
- message (FATAL_ERROR "not_yet missing the compress-all compile flag" )
67
- endif ()
68
- if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0 AND NOT compile_opts_a MATCHES
69
- "--compress-mode" )
70
- message (FATAL_ERROR "not_yet missing the compress-mode compile flag" )
71
- endif ()
72
-
73
49
add_library (exists SHARED ${stub_file} )
74
50
add_library (exists_rapids SHARED ${stub_file} )
75
- rapids_cuda_enable_fatbin_compression (TARGET exists )
76
- rapids_cuda_enable_fatbin_compression (TARGET exists_rapids TUNE_FOR rapids )
77
51
78
- get_target_property (compile_opts_a exists COMPILE_OPTIONS )
79
- get_target_property (compile_opts_b exists_rapids COMPILE_OPTIONS )
80
- if (NOT compile_opts_a STREQUAL compile_opts_b )
81
- message (FATAL_ERROR "rapids_cuda_enable_fatbin_compression without any TUNE_FOR should match 'rapids'"
82
- )
83
- endif ()
84
- if (NOT compile_opts_a MATCHES "-Xfatbin=-compress-all" )
85
- message (FATAL_ERROR "not_yet missing the compress-all compile flag" )
86
- endif ()
87
- if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0 AND NOT compile_opts_a MATCHES
88
- "--compress-mode" )
89
- message (FATAL_ERROR "not_yet missing the compress-mode compile flag" )
90
- endif ()
52
+ foreach (target IN ITEMS not_yet exists )
53
+ rapids_cuda_enable_fatbin_compression (TARGET ${target} )
54
+ rapids_cuda_enable_fatbin_compression (TARGET ${target} _rapids TUNE_FOR rapids )
55
+
56
+ get_target_property (compile_opts_a ${target} INTERFACE_COMPILE_OPTIONS )
57
+ get_target_property (compile_opts_b ${target} _rapids INTERFACE_COMPILE_OPTIONS )
58
+ if (NOT compile_opts_a STREQUAL compile_opts_b )
59
+ message (FATAL_ERROR "rapids_cuda_enable_fatbin_compression without any TUNE_FOR should match 'rapids'"
60
+ )
61
+ endif ()
62
+ if (NOT compile_opts_a MATCHES "-Xfatbin=-compress-all" )
63
+ message (FATAL_ERROR "${target} missing the compress-all compile flag" )
64
+ endif ()
65
+ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0 AND NOT compile_opts_a MATCHES
66
+ "--compress-mode" )
67
+ message (FATAL_ERROR "${target} missing the compress-mode compile flag" )
68
+ endif ()
69
+ endforeach ()
0 commit comments