Skip to content

Latest commit

 

History

History

cpp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

C/C++ Playground

Subdirectories

Makefile

The Makefile is required for seamless Eclipse integration. Because the Makefile can be called from mixed cygwin/MSYS2 environments, every line and the order of lines in the Makefile are counting. Essential part is the correct setup of the PATH environment variable. This assures that the MSYS2 toolchain is really used before anything else in the $PATH.

Tip
c:/msys64/usr/bin/make.exe should be used as the "Build command" in "Project Settings/C++ Build" in Eclipse.
Note
fun fact: internally we will let cmake use Ninja because it is faster and shows less compatibility problems compared to make.
Note
this setup is working under Linux as well.

CMakeLists.txt

This is the root CMakeLists.txt file. All other CMakeLists.txt are included with an invocation of add_subdirectory(). Unittests are included through the cmake macro add_unittest().

Tip
add_unittest() is not limited to unittesting. It allows quick and dirty inclusion of small test projects as well.