MKC_CHECK_COMPILER(1)

✨ MKC_CHECK_COMPILER ✨

Okay bestie, so this is the mkc_check_compiler page from section 1 of the manual. It's a little script that figures out which C or C++ compiler you've got and what version it is. Let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

mkc_check_compiler β€” checks for C and C++ compiler type. That's literally the whole vibe. It's the compiler detective bestie you never knew you needed πŸ•΅οΈβ€β™€οΈ


🌸 SYNOPSIS 🌸

mkc_check_compiler [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: mkc_check_compiler recognizes the compiler type and its version, and prints them to stdout. Iconic behavior, no cap.

By default, it creates temporary and cache files named _mkc_compiler_type.{err,res} (for the C compiler) and _mkc_cxx_type.{err,res} (for the C++ compiler). These little cuties live under the MKC_CACHEDIR directory. It's giving organized ✨


πŸ’– OPTIONS πŸ’–

  • -x β€” Check the C++ compiler type. By default, the C compiler type and version are checked. So if you're a C++ girlie, this is your flag πŸŽ€
  • -D β€” Delete cache files. It's the "clean up your room" option, lowkey necessary sometimes 🧹

🌈 ENVIRONMENT 🌈

  • CC β€” The C compiler. The default is cc. Your main character C compiler, periodt.
  • CXX β€” The C++ compiler. The default is c++. For when you're feeling fancy and object-oriented πŸ’…
  • MKC_VERBOSE β€” If set to 1, verbose messages are output to stderr. It's like the compiler is narrating its own life story to you πŸ—£οΈ
  • MKC_SHOW_CACHED β€” If set to 1 and MKC_VERBOSE is set to 1, cached results are output to stderr. The ultimate "show me what you remember" combo πŸ”₯
  • MKC_CACHEDIR β€” Directory where temporary and cache files are created. If unset, they're created in the current directory. Like, right here, right now, no big deal πŸ“
  • MKC_NOCACHE β€” All results are cached unless the MKC_NOCACHE variable is set to 1. So if you're a "no cache, fresh start" kind of bestie, set it to 1 and slay πŸ’€
  • MKC_DELETE_TMPFILES β€” If set to 1, temporary files are removed. Clean girl aesthetic, we love to see it 🧚

⭐ EXAMPLES ⭐

export CC=icc; mkc_check_compiler
export CXX=clang++; mkc_check_compiler -x

Like, literally just export your compiler and run it. That's the whole thing. So simple it's almost iconic 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Aleksey Cheusov <vle@gmx.net>


Hey bestie, quick reminder: this page is from Feb 4, 2020, and it's part of the manual for MKC_CHECK_COMPILER(1). If you ever forget the details, just come back and reread. You got this πŸ’œ

Stay slay, stay compiled βœ¨πŸ’…

πŸ“¦ where this page comes from