jp-embedded / scxmlcc

The SCXML state machine to C++ compiler
GNU General Public License v3.0
140 stars 34 forks source link

Build breaks if gtest is found #76

Closed purplefishies closed 5 years ago

purplefishies commented 6 years ago

I get the following error when building

 cmake ..
-- 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++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
ma-- Detecting CXX compile features - done
k-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
--   program_options
eCMake Error at src/test/CMakeLists.txt:6 (add_subdirectory):
  The source directory

    /home/jdamon/Downloads/scxmlcc/src/test/gtest

  does not contain a CMakeLists.txt file.

-- Configuring incomplete, errors occurred!

If I run

touch  ../src/test/gtest/CMakeLists.txt
nice build (master)% cmake ..
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jdamon/Downloads/scxmlcc/build
nice build (master)% make
[  1%] Generating ../version_auto.h
...

Then it works

aboseley commented 6 years ago

@purplefishies , this folder get populated when you run git submodule update --init, see here getting-started with cmake

Perhaps we should default to "disabling" unit tests so this isn't ordinarily required.

jp-embedded commented 6 years ago

@aboseley yes, I think that is a good idea. The unit tests is primarily of interest for developers and not so much people who just use scxmlcc

jp-embedded commented 5 years ago

fixed in pull request #80