Giter VIP home page Giter VIP logo

Comments (5)

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

Bot detected the issue body's language is not English, translate it automatically.


Title: Create cmakelist exception

Xmake version

v2.8.8+HEAD.d8e248255

Operating system version and architecture

Window10

Describe the problem

Using xmake project -k cmakelists
Error: @programdir\core\main.lua:306: @programdir\plugins\project\cmake\cmakelists.lua:200: bad argument #1 to 'is_absolute' (string expected, got table)

Debugging found that it was caused by set_policy("windows.manifest.uac", "admin")
After adding set_policy("windows.manifest.uac", "admin") to the project, the flag will be a table {
"/manifestuac:level='requireAdministrator' uiAccess='false'",
wrap_locked = true
} causing problems

Expected results

normal build

Project configuration

add_rules("mode.debug", "mode.release")
add_rules("plugin.compile_commands.autoupdate")
add_rules("plugin.vsxmake.autoupdate")

set_encodings("source:utf-8", "target:utf-8")

add_defines("_UNICODE", "UNICODE")

set_policy("windows.manifest.uac", "admin")

Others are normal project configurations

Additional information and error logs

error: @programdir\core\main.lua:306: @programdir\plugins\project\cmake\cmakelists.lua:200: bad argument #1 to 'is_absolute' (string expected, got table)
[C]: in function 'is_absolute'
[@programdir\plugins\project\cmake\cmakelists.lua:200]: in function '_translate_flag'
[@programdir\plugins\project\cmake\cmakelists.lua:930]: in function '_add_target_link_options'
[@programdir\plugins\project\cmake\cmakelists.lua:1136]: in function '_add_target'
[@programdir\plugins\project\cmake\cmakelists.lua:1156]: in function '_generate_cmakelists'
[@programdir\plugins\project\cmake\cmakelists.lua:1170]: in function '?'
[@programdir\plugins\project\main.lua:75]: in function '_make'
[@programdir\plugins\project\main.lua:95]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:280]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\main.lua:304]: in function 'cotask'
[@programdir\core\base\scheduler.lua:404]:

stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:957: in function 'os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:306: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:404: in function <@programdir\core\base\scheduler.lua:397>

from xmake.

waruqi avatar waruqi commented on August 28, 2024

再试试 xmake update -s dev

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

Bot detected the issue body's language is not English, translate it automatically.


Try xmake update -s dev again

from xmake.

zhuizhubf avatar zhuizhubf commented on August 28, 2024

ok 了

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

Bot detected the issue body's language is not English, translate it automatically.


ok

from xmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.