Be aware of using gmake or make on BSD systems

When working on BSD systems, you should be aware of using gmake or make. E.g., I met a weird error using make on NetBSD today:

# make
.....
/usr/lib/crt0.o: In function `___start':
(.text+0xf7): undefined reference to `main'
collect2: error: ld returned 1 exit status
*** Error code 1
......

But using gmake, the compilation is OK.

Install make before using cmake

Today I tried to build a project, but running “cmake” gave me a strange output:

# cmake ..
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

After referring this discussion: CMAKE_MAKE_PROGRAM not found, I suddenly realized that this a new setup server, so make program may not be installed. As expected:

# make
-bash: make: command not found

After installing make, the cmake flow works normally.