Comments (2)
Not to mention, you left out Cygwin, too.
from cake.
Yes. I am using only gcc on linux and msvc on windows.
I will check clang and write instructions how to add new platforms.
Basically, we use the same compiler used to compile build.c to generate cake. (except emscripten)
The compiler/platform is detected at build.h using ifdefs and then at build.c the command line
is selected. You can try adding a new platform.
#if defined(_WIN32) && defined(_MSC_VER) && !defined(__clang__)
#define BUILD_WINDOWS
#define BUILD_WINDOWS_MSC
#define COMPILER_NAME "cl"
#define RUN ""
#elif defined(_WIN32) && defined(__clang__)
#define BUILD_WINDOWS
#define BUILD_WINDOWS_CLANG
#define RUN ""
#define COMPILER_NAME "clang"
#elif defined(__linux__) && defined(__clang__)
#define BUILD_LINUX
#define BUILD_LINUX_CLANG
#define COMPILER_NAME "clang"
#define RUN "./"
#elif defined(__linux__) && defined(__GNUC__)
#define BUILD_LINUX
#define BUILD_LINUX_GCC
#define COMPILER_NAME "gcc"
#define RUN "./"
#else
#error Unknown Platform/Compiler
#endif
Then at build.c we call the appropriated command line. For instance:
#ifdef BUILD_LINUX_CLANG
system("clang "
SOURCE_FILES " main.c "
#ifdef TEST
"-DTEST"
#endif
" -std=c17 "
" -Wall "
" -o " OUTPUT);
#endif
from cake.
Related Issues (20)
- missing warning - unreferenced label
- missing warning using reserved macro
- missing warning - unrecognized character escape sequence
- missing warning - logical operation on address of string constant
- missing warning - const object should be initialized
- missing warning - bool like used in switch
- missing warning - case constant 'constant' too big for the type of the switch expression
- missing warning if (unsigned < 0)
- missing warning constant expression overflow (use safe int in constant expressions)
- missing warning negative used with unsigned int
- missing warning with enumerator to big for its size
- missing warning - empty controlled statement found; is this the intent?
- missing warning comparing null with int
- missing warning - operator 'operator-name': deprecated between enumerations of different types
- missing warning enum item not handled at switch
- fatal errors inside headers (level >0 ) are being ignored
- pragma failing on windows headers.. after pragma refactoring
- if with initializer not working HOT 1
- Feature: Tag compatibility HOT 3
- auto with pointer must show an error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cake.