C ++&& cmake&& Eclipse&& Boost无法编译

时间:2015-10-29 08:57:19

标签: c++ eclipse boost cmake makefile

我目前正在尝试使用Eclipse Mars中的CMakeLists.txt文件编译C ++ boost测试类。 这是我的C ++类:

/*
 * Cartesian2DPositionCatalogTest.cpp
 *
 *  Created on: 23 juin 2015
 *      Author: morin
 */

#include "Cartesian2DPositionCatalogTest.h"

#include <boost/test/minimal.hpp>

namespace athena {

namespace catalog {

Cartesian2DPositionCatalogTest::Cartesian2DPositionCatalogTest() {
    //    std::cout << "Cartesian2DPositionCatalogTest::athenaTest()" << std::endl;
    //    this->_catalog = new athena::catalog::Cartesian2DPositionCatalog();
}

Cartesian2DPositionCatalogTest::~Cartesian2DPositionCatalogTest() {
    //  delete this->_catalog;
}

bool Cartesian2DPositionCatalogTest::defaultConstructorTest() {
    //  try {
    //      athena::catalog::Cartesian2DPositionCatalog catalog;
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.defaultConstructor() test has failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::intConstructorTest() {
    //  try {
    //      int size = 0;
    //      athena::catalog::Cartesian2DPositionCatalog catalog(size);
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.intConstructor() test has failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::createContainerTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //  athena::catalog::Cartesian2DShearData *data2;
    //  this->_catalog->createContainer(SIZE);
    //  if (this->_catalog->getSize() != SIZE) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    //  data = this->_catalog->getData();
    //  data[0].m_x  = data[SIZE-1].m_x  = X;
    //  data[0].m_y  = data[SIZE-1].m_y  = Y;
    //  data[0].m_w  = data[SIZE-1].m_w  = W;
    //  data[0].m_ea = data[SIZE-1].m_ea = EA;
    //  data[0].m_eb = data[SIZE-1].m_eb = EB;
    //  //
    //  data2 = this->_catalog->getData();
    //  if (data[0].m_x != data2[SIZE-1].m_x) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    //  if (data[0].m_y != data2[SIZE-1].m_y) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    //  if (data[0].m_w != data2[SIZE-1].m_w) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    //  if (data[0].m_ea != data2[SIZE-1].m_ea) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    //  if (data[0].m_eb != data2[SIZE-1].m_eb) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.createContainer() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::isCartesian2DPositionCatalogTest() {
    //  if (this->_catalog->isCartesian2DPositionCatalog() == true) return true;
    //  BOOST_ERROR("Cartesian2DPositionCatalog.isCartesian2DPositionCatalog() test has failed");
    return false;
}

bool Cartesian2DPositionCatalogTest::getCartesian2DPositionCatalogTest() {
    //  Cartesian2DPositionCatalog *catalog2 = this->_catalog->getCartesian2DPositionCatalog();
    //  if (this->_catalog == catalog2) return true;
    //  BOOST_ERROR("Cartesian2DPositionCatalog.getCartesian2DPositionCatalog() test has failed");
    return false;
}

bool Cartesian2DPositionCatalogTest::getSizeTest() {
    //  int const SIZE = 10;
    //  this->_catalog->createContainer(SIZE);
    //  if (this->_catalog->getSize() == SIZE) return true;
    //  BOOST_ERROR("Cartesian2DPositionCatalog.getSizeTest() test has failed");
    return false;
}

bool Cartesian2DPositionCatalogTest::isEmptyTest() {
    //  int const SIZE = 0;
    //  this->_catalog->createContainer(SIZE);
    //  if (this->_catalog->isEmptyTest()) return true;
    //  BOOST_ERROR("Cartesian2DPositionCatalog.isEmptyTest() test has failed");
    return false;
}

bool Cartesian2DPositionCatalogTest::getDataTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //  //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_x  = data[SIZE-1].m_x  = X;
    //  data[0].m_y  = data[SIZE-1].m_y  = Y;
    //  data[0].m_w  = data[SIZE-1].m_w  = W;
    //  data[0].m_ea = data[SIZE-1].m_ea = EA;
    //  data[0].m_eb = data[SIZE-1].m_eb = EB;
    return true;
}

bool Cartesian2DPositionCatalogTest::getDataIntTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_x  = data[SIZE-1].m_x  = X;
    //  data[0].m_y  = data[SIZE-1].m_y  = Y;
    //  data[0].m_w  = data[SIZE-1].m_w  = W;
    //  data[0].m_ea = data[SIZE-1].m_ea = EA;
    //  data[0].m_eb = data[SIZE-1].m_eb = EB;
    //  //
    //  athena::catalog::Cartesian2DShearData element = this->_catalog->getData(0);
    //  if (element != data[0].m_x) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getDataTest() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getRaTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_x  = data[SIZE-1].m_x  = X;
    //  //
    //  double value = this->_catalog->getRa(0);
    //  if (value != data[0].m_x) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getRa() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getDecTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_y  = data[SIZE-1].m_y  = Y;
    //  //
    //  double value = this->_catalog->getDec(0);
    //  if (value != data[0].m_y) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getDec() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getWeightTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_w  = data[SIZE-1].m_w  = W;
    //  //
    //  double value = this->_catalog->getRa(0);
    //  if (value != data[0].m_x) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getWeight() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getEaTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_ea  = data[SIZE-1].m_ea  = EA;
    //  //
    //  double value = this->_catalog->getRa(0);
    //  if (value != data[0].m_ea) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getEa() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getEbTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_eb  = data[SIZE-1].m_eb  = EB;
    //  //
    //  double value = this->_catalog->getEb(0);
    //  if (value != data[0].m_eb) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getEb() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getEllipticityTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  data[0].m_ea  = data[SIZE-1].m_ea  = EA;
    //  data[0].m_eb  = data[SIZE-1].m_eb  = EB;
    //  //
    //  std::complex<double> value = this->_catalog->getEllipticity(0);
    //  if (value.real() != EA) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getEllipticity() test has failed");
    //      return false;
    //  }
    //  if (value.imag() != EB) {
    //      BOOST_ERROR("Cartesian2DPositionCatalog.getEllipticity() test has failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::readTest() {
    //  std::string catalogFilename {"catalogFilename"};
    //  athena::io::FitsBindingReader fitsBindingReader;
    //  athena::config::Configuration configuration;
    //  try {
    //      athena::catalog::Cartesian2DPositionCatalog catalog;
    //      catalog.read(catalogFilename, fitsBindingReader, configuration)
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalogTest.readTest failed");
    //      return false;
    //  }
    return true;
}

bool Cartesian2DPositionCatalogTest::getExtremumCoordinatesTest() {
    //  int const SIZE = 10;
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  athena::catalog::Cartesian2DShearData *data;
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  for (int i = START_INDEX; i < END_INDEX; i++) {
    //      data[i].m_x  = data[SIZE-1].m_x  = X;
    //      data[i].m_y  = data[SIZE-1].m_y  = Y;
    //      data[i].m_w  = data[SIZE-1].m_w  = W;
    //      data[i].m_ea = data[SIZE-1].m_ea = EA;
    //      data[i].m_eb = data[SIZE-1].m_eb = EB;
    //  }
    //  data[0].m_x = 1.0e31;
    //  data[0].m_y = 1.0e31;
    //  data[1].m_x = -1.0e31;
    //  data[1].m_y = -1.0e31;
    //  data[2].m_x = 1.0e31;
    //  data[2].m_y = 0;
    //  data[3].m_x = 0;
    //  data[3].m_y = 1.0e31;
    //  data[4].m_x = 0;
    //  data[4].m_y = 1.0e31;
    //  data[5].m_x = 1.0e31;
    //  data[5].m_y = 0;
    //  data[6].m_x = -1.0e31;
    //  data[6].m_y = 0;
    //  data[7].m_x = 0;
    //  data[7].m_y = -1.0e31;
    //  data[8].m_x = 0;
    //  data[8].m_y = -1.0e31;
    //  data[9].m_x = -1.0e31;
    //  data[9].m_y = 0;
    //
    //  const int START_INDEX {0};
    //  const int END_INDEX {10};
    //  double minCoordinates {0};
    //  double maxCoordinates {0};
    //  _catalog.getExtremumCoordinates(START_INDEX, END_INDEX, &minCoordinates, &maxCoordinates);
    //
    //  BOOST_CHECK(minCoordinates == 1.0e-31);
    //  BOOST_CHECK(maxCoordinates == 1.0e31):
    return true;
}

bool Cartesian2DPositionCatalogTest::swapTest() {
    //  int const SIZE = 2;
    //  athena::catalog::Cartesian2DShearData *data;
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //
    //  int const X0 = 3.14;
    //  int const Y0 = -3.14;
    //  int const W0 = 0.5;
    //  int const EA0 = 1.0;
    //  int const EB0 = -1.0;
    //  data[0].m_x  = X0;
    //  data[0].m_y  = Y0;
    //  data[0].m_w  = W0;
    //  data[0].m_ea = EA0;
    //  data[0].m_eb = EB0;
    //
    //  int const X1 = 3.14;
    //  int const Y1 = -3.14;
    //  int const W1 = 0.5;
    //  int const EA1 = 1.0;
    //  int const EB1 = -1.0;
    //  data[1].m_x  = X1;
    //  data[1].m_y  = Y1;
    //  data[1].m_w  = W1;
    //  data[1].m_ea = EA1;
    //  data[1].m_eb = EB1;
    //
    //  const int FIRST_INDEX = 0;
    //  const int SECOND_INDEX = 1;
    //  this->_catalog->swap(FIRST_INDEX, SECOND_INDEX);
    //
    //  BOOST_CHECK(data[0].m_x == X1);
    //  BOOST_CHECK(data[0].m_y == Y1);
    //  BOOST_CHECK(data[0].m_w == W1);
    //  BOOST_CHECK(data[0].m_ea == EA1);
    //  BOOST_CHECK(data[0].m_eb == EB1);
    //
    //  BOOST_CHECK(data[1].m_x == X0);
    //  BOOST_CHECK(data[1].m_y == Y0);
    //  BOOST_CHECK(data[1].m_w == W0);
    //  BOOST_CHECK(data[1].m_ea == EA0);
    //  BOOST_CHECK(data[1].m_eb == EB0);
    //
    return true;
}

bool Cartesian2DPositionCatalogTest::getValueTest() {
    //  athena::catalog::Cartesian2DShearData *data;
    //  int const SIZE = 1;
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  data[0].m_x  = X;
    //  data[0].m_y  = Y;
    //  data[0].m_w  = W;
    //  data[0].m_ea = EA;
    //  data[0].m_eb = EB;
    //
    //  try {
    //      unsigned long index = 0;
    //      double valueIndex = _catalog->getValue(index, axisIndex);
    //      BOOST_CHECK(valueIndex == X);
    //
    //      unsigned long axisIndex = 1;
    //      double valueAxisIndex = _catalog->getValue(index, axisIndex);
    //      BOOST_CHECK(valueAxisIndex == Y);
    //
    return true;
    //  } catch (...) {
    //      BOOST_ERROR ("Cartesian2DPositionCatalogTest::getValueTest() failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::partitionTest() {
    //  athena::catalog::Cartesian2DShearData *data;
    //  int const SIZE = 10;
    //  this->_catalog->createContainer(SIZE);
    //  data = this->_catalog->getData();
    //  int const X = 3.14;
    //  int const Y = -3.14;
    //  int const W = 0.5;
    //  int const EA = 1.0;
    //  int const EB = -1.0;
    //  for (int i = 0; i < SIZE; i++) {
    //      data[i].m_x  = X;
    //      data[i].m_y  = Y;
    //      data[i].m_w  = W;
    //      data[i].m_ea = EA;
    //      data[i].m_eb = EB;
    //  }
    //
    //  unsigned long startIndex = 0;
    //  unsigned long endIndex = 10;
    //  unsigned int axisIndex = 0;
    //  double middleAngle = 0.0;
    //
    //  try {
    //      axisIndex = 0; // ra
    //      endIndex = 1; // only one element
    //      _catalog->partition(startIndex, endIndex, axisIndex, middleAngle);
    //
    //      axisIndex = 0; // ra
    //      endIndex = SIZE; // only one element
    //      _catalog->partition(startIndex, endIndex, axisIndex, middleAngle);
    //
    //      axisIndex = 1; // dec
    //      endIndex = 1; // only one element
    //      _catalog->partition(startIndex, endIndex, axisIndex, middleAngle);
    //
    //      axisIndex = 1; // dec
    //      endIndex = SIZE; // only one element
    //      _catalog->partition(startIndex, endIndex, axisIndex, middleAngle);
    //
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalogTest::partition failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::createKdTreeTest() {
    //  athena::kdtree::KdTreeSplitter splitter;
    //  try {
    //      athena::kdtree::KdTree kdTree = _catalog->createKdTree(splitter);
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalogTest::createKdTreeTest failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::serializeFilenameULongULongUnitTest() {
    //  try {
    //      std::string filename {"filename"};
    //      unsigned long startIndex {0}:
    //      unsigned long endIndex {10};
    //      athena::share::unit::Unit unit;
    //      _catalog->serialize(filename, startIndex, endIndex, unit);
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalogTest::serializeFilenameULongULongUnitTest failed");
    //      return false;
    //  }
}

bool Cartesian2DPositionCatalogTest::serializeTest() {
    //  try {
    //      std::string filename {"filename"};
    //      athena::share::unit::Unit unit;
    //      _catalog->serialize(filename, unit);
    return true;
    //  } catch (...) {
    //      BOOST_ERROR("Cartesian2DPositionCatalogTest::serializeTest failed");
    //      return false;
    //  }
}

} // namespace catalog

} // namespace athena

int test_main( int argc, char* argv[] ) {  // prototype for users test_main()
    const std::string filePath = std::string("/Users/mpiolot/Documents/workspace/Euclid-OULE3/devel/test/data/ref/g/config_fits.txt");
    int  errorCounter = 0;
    int numberOfTests = 0;
    athena::catalog::Cartesian2DPositionCatalogTest test = athena::catalog::Cartesian2DPositionCatalogTest();
    //
    // UNITARY TESTS
    //
    if (test.defaultConstructorTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.intConstructorTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.createContainerTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.isCartesian2DPositionCatalogTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.getCartesian2DPositionCatalogTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.getSizeTest()    == false) errorCounter += 1; numberOfTests += 1;
    if (test.isEmptyTest()    == false) errorCounter += 1; numberOfTests += 1;
    if (test.getDataTest()    == false) errorCounter += 1; numberOfTests += 1;
    if (test.getDataIntTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.getRaTest()      == false) errorCounter += 1; numberOfTests += 1;
    if (test.getDecTest()     == false) errorCounter += 1; numberOfTests += 1;
    if (test.getWeightTest()  == false) errorCounter += 1; numberOfTests += 1;
    if (test.getEaTest()      == false) errorCounter += 1; numberOfTests += 1;
    if (test.getEbTest()      == false) errorCounter += 1; numberOfTests += 1;
    if (test.getEllipticityTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.readTest() == false)     errorCounter += 1; numberOfTests += 1;
    if (test.getExtremumCoordinatesTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.swapTest()       == false) errorCounter += 1; numberOfTests += 1;
    if (test.getValueTest()   == false) errorCounter += 1; numberOfTests += 1;
    if (test.partitionTest()  == false) errorCounter += 1; numberOfTests += 1;
    if (test.createKdTreeTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.serializeFilenameULongULongUnitTest() == false) errorCounter += 1; numberOfTests += 1;
    if (test.serializeTest()  == false) errorCounter += 1; numberOfTests += 1;

    if (errorCounter == 0) {
        std::cout << "ALL Cartesian2DPositionCatalog TESTS SUCCESSFULLY PASSED (" <<  numberOfTests << "/" << numberOfTests  << ")" << std::endl;
        return 0;
    }
    else {
        std::cout << "Cartesian2DPositionCatalog TEST FAILED " << errorCounter << "/" << numberOfTests << std::endl;
        return 1;
    }
}

除了返回true或false之外,这些方法不会执行任何操作。

这是我的CMakeLists.txt文件:

#
# add a list of subdirectories with their CMakeLists.txt file to explore
#
#add_subdirectory( share            )

#
# create a binary files
#
add_executable( Cartesian2DPositionCatalogTest Cartesian2DPositionCatalogTest.cpp )

#
# add libraries used
#
target_link_libraries( Cartesian2DPositionCatalogTest ${2PCF_LIBRARIES} )
target_link_libraries( Cartesian2DPositionCatalogTest ${Boost_LIBRARIES} )
target_link_libraries( Cartesian2DPositionCatalogTest ${CFITSIO_LIBRARIES} )

#
# add test
#
enable_testing()
add_test(cartesian2DPositionCatalogTest_1 Cartesian2DPositionCatalogTest)

我输入

$ cmake .

在当前目录中。这是我得到的信息:

sapmcw22:catalog mpiolot$ cmake .
-- The C compiler identification is AppleClang 7.0.0.7000176
-- The CXX compiler identification is AppleClang 7.0.0.7000176
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.3)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mpiolot/Documents/workspace/Euclid-OULE3/WL-2PCF_0_1/Implementation/devel/test/unitary/athena/catalog
sapmcw22:catalog mpiolot$ cmake .
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.3)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mpiolot/Documents/workspace/Euclid-OULE3/WL-2PCF_0_1/Implementation/devel/test/unitary/athena/catalog
sapmcw22:catalog mpiolot$ 

然后,我尝试在Eclipse中构建项目。这是我收到的错误消息:

gmake[2]: Leaving directory '/Users/mpiolot/Documents/workspace/Euclid-OULE3/WL-2PCF_0_1/Implementation/devel/test/unitary'
CMakeFiles/Makefile2:405: recipe for target      'athena/catalog/CMakeFiles/Cartesian2DPositionCatalogTest.dir/all' failed
gmake[1]: Leaving directory '/Users/mpiolot/Documents/workspace/Euclid-OULE3/WL-2PCF_0_1/Implementation/devel/test/unitary'
Makefile:97: recipe for target 'all' failed
gmake[2]: *** No rule to make target 'CMakeFiles/Cartesian2DPositionCatalogTest.dir/flags.make'.  Stop.
gmake[1]: *** [athena/catalog/CMakeFiles/Cartesian2DPositionCatalogTest.dir/all] Error 2
gmake: *** [all] Error 2

这对我来说毫无意义。有任何想法吗 ?提前谢谢。

0 个答案:

没有答案