Giter Site home page Giter Site logo

thelartians / ccache.cmake Goto Github PK

View Code? Open in Web Editor NEW
53.0 7.0 9.0 16 KB

๐Ÿš… Compile faster with Ccache! A Ccache integration for CMake with Xcode support.

License: MIT License

CMake 73.19% Shell 17.11% C++ 9.70%
cmake cache ccache cpp c caching compiler fast compilation xcode

ccache.cmake's People

Contributors

friendlyanon avatar jiverson002 avatar thelartians 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccache.cmake's Issues

License

Hi,

would it be possible to put this repository under a specific license? I would like to include the cmake file in my repository, but without a license, that doesn't seem to be allowed.

Thanks

Windows: unable to find launch-cxx

MSVC:

'E:\Projects\rpgmpacker\cmake-build-debug-x64\_deps\ccache.cmake-build\launch-cxx' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'E:\Projects\rpgmpacker\cmake-build-debug-x64\_deps\ccache.cmake-build\launch-cxx' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

MinGW:

process_begin: CreateProcess(NULL, sh E:\Projects\rpgmpacker\cmake-build-debug-mingw\_deps\ccache.cmake-build\launch-cxx C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\G__~1.EXE -DSIMDJSON_THREADS_ENABLED=1 -DSIMDJSON_USING_LIBRARY=1 -DSPDLOG_COMPILED_LIB @CMakeFiles/RPGMPacker.dir/includes_CXX.rsp -g -std=gnu++17 -o CMakeFiles\RPGMPacker.dir\src\main.cpp.obj -c E:\Projects\rpgmpacker\src\main.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe[3]: *** [CMakeFiles\RPGMPacker.dir\build.make:83: CMakeFiles/RPGMPacker.dir/src/main.cpp.obj] Error 2
mingw32-make.exe[3]: *** Waiting for unfinished jobs....
process_begin: CreateProcess(NULL, sh E:\Projects\rpgmpacker\cmake-build-debug-mingw\_deps\ccache.cmake-build\launch-cxx C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\G__~1.EXE -DSIMDJSON_THREADS_ENABLED=1 -DSIMDJSON_USING_LIBRARY=1 -DSPDLOG_COMPILED_LIB @CMakeFiles/RPGMPacker.dir/includes_CXX.rsp -g -std=gnu++17 -o CMakeFiles\RPGMPacker.dir\src\md5.cpp.obj -c E:\Projects\rpgmpacker\src\md5.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe[3]: *** [CMakeFiles\RPGMPacker.dir\build.make:97: CMakeFiles/RPGMPacker.dir/src/md5.cpp.obj] Error 2
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:348: CMakeFiles/RPGMPacker.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:355: CMakeFiles/RPGMPacker.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:206: RPGMPacker] Error 2

CMakeLists.txt:

if (USE_CCACHE)
    CPMAddPackage (
        NAME Ccache.cmake
        GITHUB_REPOSITORY TheLartians/Ccache.cmake
        VERSION 1.2
    )
endif()

`launch-c` and `launch-cxx` must be in project directory.

configure_file(launch-c.in launch-c)
configure_file(launch-cxx.in launch-cxx)

In the current version, the launch-c and launch-cxx files need to be present in the project directory (the project which is using Ccache.cmake). A use case that disallows this is to clone this project (Ccache.cmake) and then just include its main CMakeLists.txt file in place from the project using it. For example, when compiling a project I might say:

$ cmake -DCMAKE_PROJECT_a_project_INCLUDE=/path/to/Ccache.cmake ..

This statement works if I include launch-c and launch-cxx in the project directory, but not otherwise, due to the bare references to them in the main CMakeLists.txt file.

I suggest adding ${CMAKE_CURRENT_LIST_DIR}/ prefix to them to allow the project to be included from anywhere.

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.