Revision 1569

trunk/tests/openmp/test_omp.cpp (revision 1569)
6 6

  
7 7
class test_omp: public ::testing::Test {};
8 8

  
9
TEST_F(test_omp, example)
9
TEST_F(test_omp, hello_world)
10 10
{
11
  #pragma omp parallel
12
  printf("hello_world: thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
11 13
}
trunk/tests/openmp/Makefile (revision 1569)
1 1
GTEST_DIR=googletest-read-only
2 2

  
3
OPENMP_FLAG=-fopenmp
3
OPENMP_FLAG=-pthread -fopenmp
4 4

  
5 5
GTESTS=\
6 6
 test_omp.cpp\
......
13 13
	CXXFLAGS="$(OPENMP_FLAG) -I$(GTEST_DIR)/include" ../../admb -c -r -g $^
14 14

  
15 15
gtest-all: gtest-all.obj $(GTESTS)
16
	CXXFLAGS="$(OPENMP_FLAG) -I$(GTEST_DIR)/include" ../../admb -g -r $^
16
	LDFLAGS="$(OPENMP_FLAG)" CXXFLAGS="$(OPENMP_FLAG) -I$(GTEST_DIR)/include" ../../admb -g -r $^
17 17

  
18 18
gtest-all.obj: googletest-read-only
19 19
	$(CXX) -c -g $(OPENMP_FLAG) -I$(GTEST_DIR)/include -I$(GTEST_DIR) -o $@ $(GTEST_DIR)/src/gtest-all.cc

Also available in: Unified diff