| | |
| | |
| | function(exclude OUTPUT INPUT) |
| | set(EXCLUDES ${ARGN}) |
| | foreach(EXCLUDE ${EXCLUDES}) |
| | list(REMOVE_ITEM INPUT "${EXCLUDE}") |
| | endforeach() |
| | set(${OUTPUT} ${INPUT} PARENT_SCOPE) |
| | endfunction(exclude) |
| |
|
| | function(prepend OUTPUT PREPEND) |
| | set(OUT "") |
| | foreach(ITEM ${ARGN}) |
| | list(APPEND OUT "${PREPEND}${ITEM}") |
| | endforeach() |
| | set(${OUTPUT} ${OUT} PARENT_SCOPE) |
| | endfunction(prepend) |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | macro(caffe_clear_vars) |
| | foreach(_var ${ARGN}) |
| | unset(${_var}) |
| | endforeach() |
| | endmacro() |
| |
|
| | |
| | |
| | |
| | |
| | function(caffe_print_list) |
| | foreach(e ${ARGN}) |
| | message(STATUS ${e}) |
| | endforeach() |
| | endfunction() |
| |
|
| | |
| | |
| | |
| | |
| | macro(caffe_parse_header FILENAME FILE_VAR) |
| | set(vars_regex "") |
| | set(__parnet_scope OFF) |
| | set(__add_cache OFF) |
| | foreach(name ${ARGN}) |
| | if("${name}" STREQUAL "PARENT_SCOPE") |
| | set(__parnet_scope ON) |
| | elseif("${name}" STREQUAL "CACHE") |
| | set(__add_cache ON) |
| | elseif(vars_regex) |
| | set(vars_regex "${vars_regex}|${name}") |
| | else() |
| | set(vars_regex "${name}") |
| | endif() |
| | endforeach() |
| | if(EXISTS "${FILENAME}") |
| | file(STRINGS "${FILENAME}" ${FILE_VAR} REGEX "#define[ \t]+(${vars_regex})[ \t]+[0-9]+" ) |
| | else() |
| | unset(${FILE_VAR}) |
| | endif() |
| | foreach(name ${ARGN}) |
| | if(NOT "${name}" STREQUAL "PARENT_SCOPE" AND NOT "${name}" STREQUAL "CACHE") |
| | if(${FILE_VAR}) |
| | if(${FILE_VAR} MATCHES ".+[ \t]${name}[ \t]+([0-9]+).*") |
| | string(REGEX REPLACE ".+[ \t]${name}[ \t]+([0-9]+).*" "\\1" ${name} "${${FILE_VAR}}") |
| | else() |
| | set(${name} "") |
| | endif() |
| | if(__add_cache) |
| | set(${name} ${${name}} CACHE INTERNAL "${name} parsed from ${FILENAME}" FORCE) |
| | elseif(__parnet_scope) |
| | set(${name} "${${name}}" PARENT_SCOPE) |
| | endif() |
| | else() |
| | unset(${name} CACHE) |
| | endif() |
| | endif() |
| | endforeach() |
| | endmacro() |
| |
|
| | |
| | |
| | |
| | |
| | |
| | function(caffe2_parse_version_str LIBNAME VERSIONSTR) |
| | string(REGEX REPLACE "^([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_MAJOR "${VERSIONSTR}") |
| | string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_MINOR "${VERSIONSTR}") |
| | string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_PATCH "${VERSIONSTR}") |
| | set(${LIBNAME}_VERSION_MAJOR ${${LIBNAME}_VERSION_MAJOR} ${ARGN} PARENT_SCOPE) |
| | set(${LIBNAME}_VERSION_MINOR ${${LIBNAME}_VERSION_MINOR} ${ARGN} PARENT_SCOPE) |
| | set(${LIBNAME}_VERSION_PATCH ${${LIBNAME}_VERSION_PATCH} ${ARGN} PARENT_SCOPE) |
| | set(${LIBNAME}_VERSION "${${LIBNAME}_VERSION_MAJOR}.${${LIBNAME}_VERSION_MINOR}.${${LIBNAME}_VERSION_PATCH}" PARENT_SCOPE) |
| | endfunction() |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | function(dedent outvar text) |
| | |
| | if("${PYTHON_EXECUTABLE}" STREQUAL "") |
| | set(_python_exe "python") |
| | else() |
| | set(_python_exe "${PYTHON_EXECUTABLE}") |
| | endif() |
| | set(_fixup_cmd "import sys; from textwrap import dedent; print(dedent(sys.stdin.read()))") |
| | file(WRITE "${CMAKE_BINARY_DIR}/indented.txt" "${text}") |
| | execute_process( |
| | COMMAND "${_python_exe}" -c "${_fixup_cmd}" |
| | INPUT_FILE "${CMAKE_BINARY_DIR}/indented.txt" |
| | RESULT_VARIABLE _dedent_exitcode |
| | OUTPUT_VARIABLE _dedent_text) |
| | if(NOT _dedent_exitcode EQUAL 0) |
| | message(ERROR " Failed to remove indentation from: \n\"\"\"\n${text}\n\"\"\" |
| | Python dedent failed with error code: ${_dedent_exitcode}") |
| | message(FATAL_ERROR " Python dedent failed with error code: ${_dedent_exitcode}") |
| | endif() |
| | |
| | string(STRIP "${_dedent_text}" _dedent_text) |
| | set(${outvar} "${_dedent_text}" PARENT_SCOPE) |
| | endfunction() |
| |
|
| |
|
| | function(pycmd_no_exit outvar exitcode cmd) |
| | |
| | if("${PYTHON_EXECUTABLE}" STREQUAL "") |
| | set(_python_exe "python") |
| | else() |
| | set(_python_exe "${PYTHON_EXECUTABLE}") |
| | endif() |
| | |
| | execute_process( |
| | COMMAND "${_python_exe}" -c "${cmd}" |
| | RESULT_VARIABLE _exitcode |
| | OUTPUT_VARIABLE _output) |
| | |
| | string(STRIP "${_output}" _output) |
| | set(${outvar} "${_output}" PARENT_SCOPE) |
| | set(${exitcode} "${_exitcode}" PARENT_SCOPE) |
| | endfunction() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | function(pycmd outvar cmd) |
| | dedent(_dedent_cmd "${cmd}") |
| | pycmd_no_exit(_output _exitcode "${_dedent_cmd}") |
| |
|
| | if(NOT _exitcode EQUAL 0) |
| | message(ERROR " Failed when running python code: \"\"\"\n${_dedent_cmd}\n\"\"\"") |
| | message(FATAL_ERROR " Python command failed with error code: ${_exitcode}") |
| | endif() |
| | |
| | string(STRIP "${_output}" _output) |
| | set(${outvar} "${_output}" PARENT_SCOPE) |
| | endfunction() |
| |
|
| |
|
| | |
| | |
| | macro(caffe2_update_option variable value) |
| | if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO) |
| | get_property(__help_string CACHE ${variable} PROPERTY HELPSTRING) |
| | set(${variable} ${value} CACHE BOOL ${__help_string} FORCE) |
| | else() |
| | set(${variable} ${value}) |
| | endif() |
| | endmacro() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | macro(caffe2_interface_library SRC DST) |
| | add_library(${DST} INTERFACE) |
| | add_dependencies(${DST} ${SRC}) |
| | |
| | |
| | get_target_property(__src_target_type ${SRC} TYPE) |
| | |
| | |
| | if(${__src_target_type} STREQUAL "STATIC_LIBRARY") |
| | |
| | if(APPLE) |
| | target_link_libraries( |
| | ${DST} INTERFACE -Wl,-force_load,\"$<TARGET_FILE:${SRC}>\") |
| | elseif(MSVC) |
| | # In MSVC, we will add whole archive in default. |
| | target_link_libraries( |
| | ${DST} INTERFACE "$<TARGET_FILE:${SRC}>") |
| | target_link_options( |
| | ${DST} INTERFACE "-WHOLEARCHIVE:$<TARGET_FILE:${SRC}>") |
| | else() |
| | # Assume everything else is like gcc |
| | target_link_libraries(${DST} INTERFACE |
| | "-Wl,--whole-archive,\"$<TARGET_FILE:${SRC}>\" -Wl,--no-whole-archive") |
| | endif() |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | target_link_libraries(${DST} INTERFACE |
| | $<TARGET_PROPERTY:${SRC},LINK_LIBRARIES>) |
| | elseif(${__src_target_type} STREQUAL "SHARED_LIBRARY") |
| | if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") |
| | target_link_libraries(${DST} INTERFACE |
| | "-Wl,--no-as-needed,\"$<TARGET_FILE:${SRC}>\" -Wl,--as-needed") |
| | else() |
| | target_link_libraries(${DST} INTERFACE ${SRC}) |
| | endif() |
| | |
| | |
| | |
| | target_link_libraries(${DST} INTERFACE |
| | $<TARGET_PROPERTY:${SRC},INTERFACE_LINK_LIBRARIES>) |
| | else() |
| | message(FATAL_ERROR |
| | "You made a CMake build file error: target " ${SRC} |
| | " must be of type either STATIC_LIBRARY or SHARED_LIBRARY. However, " |
| | "I got " ${__src_target_type} ".") |
| | endif() |
| | |
| | set_target_properties(${DST} PROPERTIES |
| | INTERFACE_COMPILE_DEFINITIONS |
| | $<TARGET_PROPERTY:${SRC},INTERFACE_COMPILE_DEFINITIONS> |
| | INTERFACE_COMPILE_OPTIONS |
| | $<TARGET_PROPERTY:${SRC},INTERFACE_COMPILE_OPTIONS> |
| | INTERFACE_INCLUDE_DIRECTORIES |
| | $<TARGET_PROPERTY:${SRC},INTERFACE_INCLUDE_DIRECTORIES> |
| | INTERFACE_SYSTEM_INCLUDE_DIRECTORIES |
| | $<TARGET_PROPERTY:${SRC},INTERFACE_SYSTEM_INCLUDE_DIRECTORIES>) |
| | endmacro() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | function(caffe2_binary_target target_name_or_src) |
| | |
| | |
| | |
| | if(ARGC GREATER 1) |
| | set(__target ${target_name_or_src}) |
| | prepend(__srcs "${CMAKE_CURRENT_SOURCE_DIR}/" "${ARGN}") |
| | else() |
| | get_filename_component(__target ${target_name_or_src} NAME_WE) |
| | prepend(__srcs "${CMAKE_CURRENT_SOURCE_DIR}/" "${target_name_or_src}") |
| | endif() |
| | add_executable(${__target} ${__srcs}) |
| | target_link_libraries(${__target} torch_library) |
| | |
| | if(DEFINED Caffe2_MODULES) |
| | target_link_libraries(${__target} ${Caffe2_MODULES}) |
| | endif() |
| | if(USE_TBB AND NOT USE_SYSTEM_TBB) |
| | target_include_directories(${__target} PUBLIC ${TBB_INCLUDE_DIR}) |
| | endif() |
| | install(TARGETS ${__target} DESTINATION bin) |
| | endfunction() |
| |
|
| | function(caffe2_hip_binary_target target_name_or_src) |
| | if(ARGC GREATER 1) |
| | set(__target ${target_name_or_src}) |
| | prepend(__srcs "${CMAKE_CURRENT_SOURCE_DIR}/" "${ARGN}") |
| | else() |
| | get_filename_component(__target ${target_name_or_src} NAME_WE) |
| | prepend(__srcs "${CMAKE_CURRENT_SOURCE_DIR}/" "${target_name_or_src}") |
| | endif() |
| |
|
| | caffe2_binary_target(${target_name_or_src}) |
| |
|
| | target_compile_options(${__target} PRIVATE ${HIP_CXX_FLAGS}) |
| | target_include_directories(${__target} PRIVATE ${Caffe2_HIP_INCLUDE}) |
| | endfunction() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | macro(torch_cuda_based_add_library cuda_target) |
| | if(USE_ROCM) |
| | hip_add_library(${cuda_target} ${ARGN}) |
| | elseif(USE_CUDA) |
| | add_library(${cuda_target} ${ARGN}) |
| | else() |
| | endif() |
| | endmacro() |
| |
|
| | |
| | |
| | |
| | |
| | |
| | macro(torch_hip_get_arch_list store_var) |
| | if(DEFINED ENV{PYTORCH_ROCM_ARCH}) |
| | set(_TMP $ENV{PYTORCH_ROCM_ARCH}) |
| | else() |
| | |
| | execute_process(COMMAND "rocm_agent_enumerator" COMMAND bash "-c" "grep -v gfx000 | sort -u | xargs | tr -d '\n'" |
| | RESULT_VARIABLE ROCM_AGENT_ENUMERATOR_RESULT |
| | OUTPUT_VARIABLE ROCM_ARCH_INSTALLED) |
| | if(NOT ROCM_AGENT_ENUMERATOR_RESULT EQUAL 0) |
| | message(FATAL_ERROR " Could not detect ROCm arch for GPUs on machine. Result: '${ROCM_AGENT_ENUMERATOR_RESULT}'") |
| | endif() |
| | set(_TMP ${ROCM_ARCH_INSTALLED}) |
| | endif() |
| | string(REPLACE " " ";" ${store_var} "${_TMP}") |
| | endmacro() |
| |
|
| | |
| | |
| | |
| | |
| | |
| | macro(torch_cuda_get_nvcc_gencode_flag store_var) |
| | |
| | if((NOT EXISTS ${TORCH_CUDA_ARCH_LIST}) AND (DEFINED ENV{TORCH_CUDA_ARCH_LIST})) |
| | message(WARNING |
| | "In the future we will require one to explicitly pass " |
| | "TORCH_CUDA_ARCH_LIST to cmake instead of implicitly setting it as an " |
| | "env variable. This will become a FATAL_ERROR in future version of " |
| | "pytorch.") |
| | set(TORCH_CUDA_ARCH_LIST $ENV{TORCH_CUDA_ARCH_LIST}) |
| | endif() |
| | if(EXISTS ${CUDA_ARCH_NAME}) |
| | message(WARNING |
| | "CUDA_ARCH_NAME is no longer used. Use TORCH_CUDA_ARCH_LIST instead. " |
| | "Right now, CUDA_ARCH_NAME is ${CUDA_ARCH_NAME} and " |
| | "TORCH_CUDA_ARCH_LIST is ${TORCH_CUDA_ARCH_LIST}.") |
| | set(TORCH_CUDA_ARCH_LIST TORCH_CUDA_ARCH_LIST ${CUDA_ARCH_NAME}) |
| | endif() |
| |
|
| | |
| | cuda_select_nvcc_arch_flags(${store_var} ${TORCH_CUDA_ARCH_LIST}) |
| | endmacro() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | function(torch_compile_options libname) |
| | set_property(TARGET ${libname} PROPERTY CXX_STANDARD 14) |
| | set(private_compile_options "") |
| |
|
| | |
| | if(WERROR) |
| | list(APPEND private_compile_options -Werror) |
| | endif() |
| |
|
| | |
| | if(MSVC) |
| |
|
| | if(MSVC_Z7_OVERRIDE) |
| | set(MSVC_DEBINFO_OPTION "/Z7") |
| | else() |
| | set(MSVC_DEBINFO_OPTION "/Zi") |
| | endif() |
| |
|
| | target_compile_options(${libname} PUBLIC |
| | $<$<COMPILE_LANGUAGE:CXX>: |
| | ${MSVC_RUNTIME_LIBRARY_OPTION} |
| | $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:${MSVC_DEBINFO_OPTION}> |
| | /EHsc |
| | /DNOMINMAX |
| | /wd4267 |
| | /wd4251 |
| | /wd4522 |
| | /wd4522 |
| | /wd4838 |
| | /wd4305 |
| | /wd4244 |
| | /wd4190 |
| | /wd4101 |
| | /wd4996 |
| | /wd4275 |
| | /bigobj> |
| | ) |
| | else() |
| | list(APPEND private_compile_options |
| | -Wall |
| | -Wextra |
| | -Wno-unused-parameter |
| | -Wno-unused-function |
| | -Wno-unused-result |
| | -Wno-missing-field-initializers |
| | -Wno-write-strings |
| | -Wno-unknown-pragmas |
| | -Wno-type-limits |
| | -Wno-array-bounds |
| | -Wno-unknown-pragmas |
| | -Wno-sign-compare |
| | -Wno-strict-overflow |
| | -Wno-strict-aliasing |
| | -Wno-error=deprecated-declarations |
| | |
| | |
| | -Wno-missing-braces |
| | ) |
| | if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") |
| | list(APPEND private_compile_options |
| | -Wno-range-loop-analysis) |
| | else() |
| | list(APPEND private_compile_options |
| | |
| | |
| | -Wno-maybe-uninitialized) |
| | endif() |
| |
|
| | endif() |
| |
|
| | if(MSVC) |
| | elseif(WERROR) |
| | list(APPEND private_compile_options -Wno-strict-overflow) |
| | endif() |
| |
|
| | target_compile_options(${libname} PRIVATE |
| | $<$<COMPILE_LANGUAGE:CXX>:${private_compile_options}>) |
| | if(USE_CUDA) |
| | string(FIND "${private_compile_options}" " " space_position) |
| | if(NOT space_position EQUAL -1) |
| | message(FATAL_ERROR "Found spaces in private_compile_options='${private_compile_options}'") |
| | endif() |
| | |
| | string(REPLACE ";" "," private_compile_options "${private_compile_options}") |
| | target_compile_options(${libname} PRIVATE |
| | $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${private_compile_options}>) |
| | endif() |
| |
|
| | if(NOT WIN32 AND NOT USE_ASAN) |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | target_compile_options(${libname} PRIVATE |
| | $<$<COMPILE_LANGUAGE:CXX>: -fvisibility=hidden>) |
| | endif() |
| |
|
| | |
| | target_compile_options(${libname} PRIVATE |
| | $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>>:-O2>) |
| |
|
| | endfunction() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | function(torch_set_target_props libname) |
| | if(MSVC AND AT_MKL_MT) |
| | set(VCOMP_LIB "vcomp") |
| | set_target_properties(${libname} PROPERTIES LINK_FLAGS_MINSIZEREL "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:${VCOMP_LIB}d") |
| | set_target_properties(${libname} PROPERTIES STATIC_LIBRARY_FLAGS_MINSIZEREL "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES STATIC_LIBRARY_FLAGS_RELWITHDEBINFO "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES STATIC_LIBRARY_FLAGS_RELEASE "/NODEFAULTLIB:${VCOMP_LIB}") |
| | set_target_properties(${libname} PROPERTIES STATIC_LIBRARY_FLAGS_DEBUG "/NODEFAULTLIB:${VCOMP_LIB}d") |
| | endif() |
| | endfunction() |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | function(torch_update_find_cuda_flags) |
| | |
| | if(USE_CUDA) |
| | separate_arguments(FLAGS UNIX_COMMAND "${CMAKE_CUDA_FLAGS}") |
| | string(REPLACE " " "," FLAGS "${FLAGS}") |
| | set(CUDA_NVCC_FLAGS ${FLAGS} PARENT_SCOPE) |
| |
|
| | separate_arguments(FLAGS_DEBUG UNIX_COMMAND "${CMAKE_CUDA_FLAGS_DEBUG}") |
| | string(REPLACE " " "," FLAGS_DEBUG "${FLAGS_DEBUG}") |
| | set(CUDA_NVCC_FLAGS_DEBUG "${FLAGS_DEBUG}" PARENT_SCOPE) |
| |
|
| | separate_arguments(FLAGS_RELEASE UNIX_COMMAND "${CMAKE_CUDA_FLAGS_RELEASE}") |
| | string(REPLACE " " "," FLAGS_RELEASE "${FLAGS_RELEASE}") |
| | set(CUDA_NVCC_FLAGS_RELEASE "${FLAGS_RELEASE}" PARENT_SCOPE) |
| |
|
| | separate_arguments(FLAGS_MINSIZEREL UNIX_COMMAND "${CMAKE_CUDA_FLAGS_MINSIZEREL}") |
| | string(REPLACE " " "," FLAGS_MINSIZEREL "${FLAGS_MINSIZEREL}") |
| | set(CUDA_NVCC_FLAGS_MINSIZEREL "${FLAGS_MINSIZEREL}" PARENT_SCOPE) |
| |
|
| | separate_arguments(FLAGS_RELWITHDEBINFO UNIX_COMMAND "${CMAKE_CUDA_FLAGS_RELWITHDEBINFO}") |
| | string(REPLACE " " "," FLAGS_RELWITHDEBINFO "${FLAGS_RELWITHDEBINFO}") |
| | set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${FLAGS_RELWITHDEBINFO}" PARENT_SCOPE) |
| |
|
| | message(STATUS "Converting CMAKE_CUDA_FLAGS to CUDA_NVCC_FLAGS:\n" |
| | " CUDA_NVCC_FLAGS = ${FLAGS}\n" |
| | " CUDA_NVCC_FLAGS_DEBUG = ${FLAGS_DEBUG}\n" |
| | " CUDA_NVCC_FLAGS_RELEASE = ${FLAGS_RELEASE}\n" |
| | " CUDA_NVCC_FLAGS_RELWITHDEBINFO = ${FLAGS_RELWITHDEBINFO}\n" |
| | " CUDA_NVCC_FLAGS_MINSIZEREL = ${FLAGS_MINSIZEREL}") |
| | endif() |
| | endfunction() |
| |
|
| | |
| | |
| | |
| | |
| | |
| | function(append_cxx_flag_if_supported flag outputvar) |
| | string(TOUPPER "HAS${flag}" _FLAG_NAME) |
| | string(REGEX REPLACE "[=-]" "_" _FLAG_NAME "${_FLAG_NAME}") |
| | check_cxx_compiler_flag("${flag}" ${_FLAG_NAME}) |
| | if(${_FLAG_NAME}) |
| | string(APPEND ${outputvar} " ${flag}") |
| | set(${outputvar} "${${outputvar}}" PARENT_SCOPE) |
| | endif() |
| | endfunction() |
| |
|
| | function(target_compile_options_if_supported target flag) |
| | set(_compile_options "") |
| | append_cxx_flag_if_supported("${flag}" _compile_options) |
| | if(NOT "${_compile_options}" STREQUAL "") |
| | target_compile_options(${target} PRIVATE ${flag}) |
| | endif() |
| | endfunction() |
| |
|