Coder Social home page Coder Social logo

cmakeexamples's Introduction

[CMakeExamples]

CMake

用途

  • CMake の用途別検証リポジトリ

検証環境

  • CMake 3.5 以上(用途によっては必須ではない)
  • Windows 10 x86_64 / VC14
  • msbuild
  • Linux Mint 18 x86_64 / g++5.4.0 / Code::Blocks IDE 13.12
  • make

TODO

NOTE

  • source_group によるグループ化

  • Code::Blocks IDE では機能自体が無視されているようである
    デフォルトとして CMAKE_CURRENT_SOURCE_DIR からの相対パスとしてグループ化される

  • find_package と config ファイル名
    find_package には、 ハイフン記述の場合は小文字指定となっている。

    Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called <package>_DIR is created to hold the directory containing the file. By default the command searches for a package with the name . If the NAMES option is given the names following it are used instead of <package>. The command searches for a file called <name>Config.cmake or <lower-case-name>-config.cmake for each name specified.

    Windows 環境の場合はルールが無視されていることを確認した。
    <PascalCaseName>-config.cmake としてもエラーとならない。
    一方 Lunux 環境の場合は仕様に準拠しているため <lower-case-name>-config.cmake 以外はエラーとなる。
    ${PROJECT_NAME}を利用する場合は明示的に <lower-case-name> としておかなければ、
    クロスプラットフォームでは原因不明の理由で悩まされる。

    # To lower.
    string(TOLOWER ${PROJECT_NAME} LOWER_PROJECT_NAME)
    set(EXPORT_NAME ${LOWER_PROJECT_NAME}-export)

cmakeexamples's People

Contributors

hasenpfote avatar

Watchers

 avatar

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.