Using lwip-2.1.2 version, below steps doesn't get compiled with these steps.
rajgad:~/Downloads/lwip-2.1.2$ ls
CHANGELOG CMakeLists.txt COPYING doc FEATURES FILES README src test UPGRADING
rajgad:~/Downloads/lwip-2.1.2$ mkdir build
rajgad:~/Downloads/lwip-2.1.2$ cd build/
rajgad:~/Downloads/lwip-2.1.2/build$ cmake ../CMakeLists.txt -DCMAKE_C_COMPILER="/usr/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/bin/g++"
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") found components: doxygen missing components: dot
Doxygen build started
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sachin/Downloads/lwip-2.1.2
rajgad:~/Downloads/lwip-2.1.2/build$
rajgad:~/Downloads/lwip-2.1.2/build$ ls
rajgad:~/Downloads/lwip-2.1.2/build$ cd ..
rajgad:~/Downloads/lwip-2.1.2$ ls
build CMakeCache.txt CMakeDoxygenDefaults.cmake cmake_install.cmake COPYING CPackSourceConfig.cmake FEATURES Makefile src UPGRADING
CHANGELOG CMakeDoxyfile.in CMakeFiles CMakeLists.txt CPackConfig.cmake doc FILES README test
rajgad:~/Downloads/lwip-2.1.2$ cmake --build .
rajgad:~/Downloads/lwip-2.1.2$
New to lwip unix version, not getting unit test executable.