title: CMock - Multiple definitions
body: <p>I am starting to work in test driven C development.</p>
  
  <p>I used CMock to generate my mock classes by running commands like:</p>
  
  <pre><code>ruby cmock.rb ../../../src/util.h
  </code></pre>
  
  <p>My current package structure is:</p>
  
  <pre><code>app/root
    | bin
        | *.*
    | build
        | *.*
    |- cmake
       |- modules
          |- CodeCoverage.cmake
    |- coverage
        |- *.*
    |- external
        |- Unity
        |- CMock
        |- CMakeLists.txt
    |- src
        |- *.c
        |- *.h
        |- CMakeLists.txt
    |- mocks
        |- *.c
        |- *.h
        |- CMakeLists.txt
    |- tests
        |- *.c
        |- *.h
        |- CMakeLists.txt
    |- CMakeLists.txt
  </code></pre>
  
  <p>I have the CMakeLists.txt setup to compile src as a library:</p>
  
  <pre><code>add_library(app SHARED ${SOURCE_FILES})
  </code></pre>
  
  <p>Tests is setup to compile as an executable: </p>
  
  <pre><code>add_executable(tests ${TEST_SOURCES})
  
  target_link_libraries(tests app Unity mocks)
  </code></pre>
  
  <p>And mocks is setup to compile as a library:</p>
  
  <pre><code>add_library(mocks ${MOCK_SOURCES})
  
  target_link_libraries(mocks app Unity CMock)
  </code></pre>
  
  <p>I've tried multiple locations for the mock headers and have been playing around, but I'm missing a fundamental of how to not get a <strong>multiple definitions</strong> error.  </p>
  
  <p>Can anyone lend some guidance on what is incorrect about my file structure or strategy?</p>