dascandy / hippomocks

GNU Lesser General Public License v2.1
196 stars 67 forks source link

[BUG]: Build error in cygwin #74

Closed rianquinn closed 7 years ago

rianquinn commented 7 years ago

With a fully updated Windows 10 and cygwin, I get the following when build HippoMocks with the cpp11 branch

-- 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/cc
-- Check for working C compiler: /usr/bin/cc -- 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/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/c/projects/bfsdk/build/hippomocks/src/hippomocks-build
[ 15%] Performing build step for 'hippomocks'
Scanning dependencies of target HippoMocksTest64
[  3%] Building CXX object HippoMocksTest/CMakeFiles/HippoMocksTest64.dir/Framework.cpp.o
[  6%] Building CXX object HippoMocksTest/CMakeFiles/HippoMocksTest64.dir/is_virtual.cpp.o
In file included from /cygdrive/c/projects/bfsdk/build/hippomocks/src/hippomocks/HippoMocks/hippomocks.h:100:0,
                 from /cygdrive/c/projects/bfsdk/build/hippomocks/src/hippomocks/HippoMocksTest/is_virtual.cpp:3:
/cygdrive/c/projects/bfsdk/build/hippomocks/src/hippomocks/HippoMocks/detail/replace.h:182:1: error: expected declaration before ‘}’ token
 }
 ^
dascandy commented 7 years ago

Looks like the namespace is opened if cfunc-mocking is enabled, but closed in all cases. That doesn't work of course. Moved the closing brace up by one; can you check if this fixes it for you?

rianquinn commented 7 years ago

Works great. Thanks a ton for the quick fix. Now... just need to fix an issue with UnitTest++ used by the GSL complaining about sigaction. 👍

Thanks again