Excluding main code for test build

  • From: "MoritzW" < >
  • To:
  • Subject: Excluding main code for test build
  • Date: Wed, 12 Sep 2012 11:48:33 -0400

Hi,
I'm new to C++ and Netbeans. But for this project i have to use it, because I 
need to include Googles V8 engine. My main project is compiling and running 
without any problems, but my unit test doesn't compile at all. I moved all 
the source files into "./src" to  structure my folders. However, Netbeans 
seems to include even the main.cpp from the main project on compiling the 
unit test. Because of this the build fails with errors like this

Code:
src/v8/libv8.a(platform-linux.o): In function 
`v8::internal::LinuxSemaphore::~LinuxSemaphore()':
platform-linux.cc:(.text._ZN2v88internal14LinuxSemaphoreD2Ev[_ZN2v88internal14LinuxSemaphoreD5Ev]+0x15):
 undefined reference to `sem_destroy'
...


Now I'm searching for a way to prevent Netbeans from compiling the files that 
are unrelated to the unit test on test builds.

Regards
MoritzW






Excluding main code for test build

MoritzW 09/12/2012

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close