Code Monkey home page Code Monkey logo

cmake-demo's Introduction

Hi there

  • 🔭 I’m currently working at Tencent.
  • 🌱 I’m currently learning LLM.
  • 📫 How to reach me: @潘伟洲wzpan
  • ⭐️ Want to recommend me to others? Nominate me as a Github Star.

Star History Chart

cmake-demo's People

Contributors

hfcrwx avatar lylelee avatar wzpan avatar xduqinian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmake-demo's Issues

为什么demo4中, USE_MYMATH默认是ON,编译出来pow使用的标准库的函数

[me@centos Demo4]$ cmake .
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/tmp/cmake-demo/Demo4
[me@centos Demo4]$ make
Scanning dependencies of target MathFunctions
[ 25%] Building CXX object math/CMakeFiles/MathFunctions.dir/MathFunctions.cc.o
[ 50%] Linking CXX static library libMathFunctions.a
[ 50%] Built target MathFunctions
Scanning dependencies of target Demo
[ 75%] Building CXX object CMakeFiles/Demo.dir/main.cc.o
[100%] Linking CXX executable Demo
[100%] Built target Demo
[me@centos Demo4]$ ./Demo 3 4
Now we use the standard library.
3 ^ 4 is 81
[me@centos Demo4]$

事实上,加了message("${USE_MYMATH}")能看到是ON, 但是最后的链接结果使用的标准库。只有用ccmake跑一次,设置为ON或者OFF, 才会真正链接或者不链接own libarary。 直接cmake不知道为什么没有得到预期结果。

Demo2没法生成可执行文件

你好,我在CentOS7上克隆了你的项目,在Demo2目录里执行cmake和make后,没法生成可执行文件,不知道哪里出问题了,您那边可以吗?

blog网站404了

昨天下午还能打开,现在打不开了。作者能处理一下吗?正在学习中

bug fix

Demo 4中的main.cc中的:
include
要改成
include "config"

Demo4中set(EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)看不懂

if(USE_MYMATH)
    include_directories("${PROJECT_SOURCE_DIR}/math")
    add_subdirectory(math)
    set(EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)
endif(USE_MYMATH)

这里面的set(EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)看不懂
set(参数1 [参数2] [参数3] ...)
按理所应该是参数2是值,参数1是变量名
当set设置列表时,后面可以设置多个参数没错,参数1时变量名,参数2~n是值
这里的EXTRA_LIBS${EXTRA_LIBS}看不懂,${EXTRA_LIBS}没声明过,不应该是空吗?这里写有什么意义?

the 'option' does not work in Demo4

under cmake version 2.8.12.2 the 'option' in CMakeList.txt does not work in its current order, actually the 'option' should be declared before 'configure_file'?

#cmakedefine未识别

image
您好。请教一个问题,我的vscode提示config.h.in文件中的#cmakedefine指令无法识别,请问这是什么原因!

运行错误

我是用VScode打开运行,编译器是arm-none-eabi-gcc,但是运行错误

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.