Coder Social home page Coder Social logo

pr0g / cmake-examples Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 68.0 167 KB

A collection of as simple as possible, modern CMake projects

License: MIT License

CMake 56.32% C++ 22.01% C 2.58% Batchfile 9.68% Shell 9.42%
cmake cmake-examples cmake-scripts cmakelists

cmake-examples's Introduction

Hello, world! ๐Ÿ‘‹

Hey there, I'm Tom, a software developer working at Amutri.

This is my personal GitHub account (pr0g) where I'm usually noodling around on some C or C++ hobby project or other...

You can find my blog on tomhultonharrop.com.

My previous contributions to the Open 3D Engine (O3DE) project as part of Game Engine and Developer Services (AWS) can be found here: hultonha

How to reach me:

  • Twitter URL
  • Mastodon URL

Pronouns: He/Him

pr0g's GitHub statsย Top Langs

cmake-examples's People

Contributors

0xflotus avatar pr0g 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

cmake-examples's Issues

Update CMakeLists.txt files to use target_sources

After watching a new CMake video (https://youtu.be/y9kSr5enrSk) the speaker made mention of the new(ish) command target_sources which is now preferable to listing source files in the add_library/add_executable commands (it's possible to get more fine grained control of visibility with PRIVATE/INTERFACE/PUBLIC too). Should really update the examples to use this! (Soon...)

Also should add the new video to the README!

Installing is bad

Generally, installing means you've made the local system and specific compiler for a project some sort of default.

This is bad. Modern developers need to compile for multiple targets using multiple compilers and multiple versions of dependencies. For example, what does it mean to "install" something like openssl when you want to use it for multiple versions of Android, iOS, your local machine, a Windows 7 desktop app, and some embedded system? Even if you think you're just running on your local machine, you probably have several different versions of compilers you use - clang, gcc, some Microsoft thing, some other version of some Microsoft thing, etc.

Installing isn't a useful concept in 2019. Build dependencies, always and everywhere.

Add a license

A license should be added to this repository, so that users know their rights. See Choose a License for more information ๐Ÿ™‚

shared library example met build error

I try a few times to build core/shared/application. The following error occurs. The detailed log as follows

user@user-AIOT-AIVD:~/cmake-examples/examples/core/shared/application$ cmake --build build
Checking file [/home/user/cmake-examples/examples/core/shared/library/install/lib/cmake/calculator-shared/calculator-sharedConfig.cmake]
Checking file [/home/user/cmake-examples/examples/core/shared/library/install/lib/cmake/calculator-shared/calculator-shared-config.cmake]
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/cmake-examples/examples/core/shared/application/build
Scanning dependencies of target calculator-app
[ 50%] Building CXX object CMakeFiles/calculator-app.dir/main.cpp.o
[100%] Linking CXX executable calculator-app
/usr/bin/ld: CMakeFiles/calculator-app.dir/main.cpp.o: in function `main':
main.cpp:(.text+0x1e): undefined reference to `calc_pow'
/usr/bin/ld: calculator-app: hidden symbol `calc_pow' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/calculator-app.dir/build.make:85: calculator-app] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/calculator-app.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

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.