diff options
| author | ruki <[email protected]> | 2022-08-14 23:22:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-14 23:22:22 +0800 |
| commit | d036076ec6ae0b3d374f011db7fb201815f4a386 (patch) | |
| tree | 1d3f2b457b0037956a47a095aa49239d0605114e | |
| parent | a94e0acf150b96d494c858e07f3ff7d581e3a95e (diff) | |
improve cmakelsits
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 7e5434cc7..5f6644915 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -497,28 +497,28 @@ function _add_target_compile_options(cmakelists, target, outputdir) if cxxflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:\"" .. cxxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$<COMPILE_LANGUAGE:CXX>:" .. cxxflags .. ">\")") end local cflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cflags") if cflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:C>:\"" .. cflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$<COMPILE_LANGUAGE:C>:" .. cflags .. ">\")") end local cxflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cxflags") if cxflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:C>:\"" .. cxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$<COMPILE_LANGUAGE:C>:" .. cxflags .. ">\")") cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:\"" .. cxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$<COMPILE_LANGUAGE:CXX>:" .. cxflags .. ">\")") end local cuflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cuflags") if cuflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:\"" .. cuflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$<COMPILE_LANGUAGE:CUDA>:" .. cuflags .. ">\")") end end end |
