Cygwin startup configuration is controlled by Windows environment variable
Not populating Cygwin PATH from Windows PATH avoids confusion from Windows programs being used instead of Cygwin programs.
Set Windows environment variable:
will result in a basic Cygwin PATH like:
Look inside Cygwin “/etc/profile” for more environment variables that may be of interest.
NOTE: all Windows environment variables are imported by Cygwin.
Override these variables in ~/.bashrc or scripts if desired.
is an open-source C/C++ compiler that can compile for a variety of systems, particularly legacy 16/32-bit Windows and DOS systems.
This can be of interest for retro gamers and those using old devices that have DOS-based software, including industrial controllers and two-way radio programming.
CMake supports OpenWatcom, and is conveniently used with a toolchain file.
GitHub Actions has easy scripting for OpenWatcom to test building of DOS programs from Linux.
The easiest way to show this is by example: see the Ascii Patrol game for how to build with OpenWatcom for DOS from Windows/Linux and GitHub Actions build CI.
sets a transitive MINIMUM language standard necessary.
If the compiler defaults to a newer language standard, target_compile_features allows that default.
This can make issues for legacy code that requires an older language standard.
For example, an old C++98 code may need to have the compiler in C++98 mode.
This is accomplished with the target property
Other languages may have a similar property.
CMake can add interface linking to imported libraries.
For example, a imported library obtained by find_package() or otherwise.
Normally, this would work like the following example to say link “stdc++fs” to example imported library “imported::lib” for GCC older than 9.1.
but does not always work for some projects with a configure time error.
To workaround this issue if it arises, set target property
Nvidia HPC SDK
is indicated to build systems by environment variables:
Ensure the HPC SDK bin/ directory is in environment variable PATH.
Nvidia HPC binaries can offer speed improvements over GNU GCC / GFortran, but Intel oneAPI binaries can be significantly faster than Nvidia-compiled binaries for CPU-only workloads.
Unless one specifically needs the GPU features of Nvidia HPC SDK consider GNU or Intel oneAPI that have more modern Fortran features.
Nvidia HPC compilers current language standard support: C11, C++17.
Fortran 2003 standard with some Fortran 2008 including submodule and error stop.
Download and install Nvidia HPC SDK.
Sudo is not required, but the install must be on symbolic-link-aware drive (not ExFAT)
Add the Nvidia “bin” directory to your “~/.bashrc” PATH environment variable.
Open a new terminal to use Nvidia compilers.
Cmake: set compiler-specific options in CMakeLists.txt like: