C++ BOOST_AUTO_TEST_用例在使用icc编译时不注册测试用例

C++ BOOST_AUTO_TEST_用例在使用icc编译时不注册测试用例,c++,icc,boost-unit-test-framework,C++,Icc,Boost Unit Test Framework,有人能解释一下为什么在我使用icc/icpc编译时,没有注册使用BOOST\u AUTO\u TEST\u CASE?当我用g++编译时,它会注册并运行 #define BOOST_TEST_MODULE boosttestunitfailure #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE( helloworld ) { BOOST_CHECK( true ); } 这里是g++——请注意,当使用g++编译

有人能解释一下为什么在我使用icc/icpc编译时,没有注册使用
BOOST\u AUTO\u TEST\u CASE
?当我用g++编译时,它会注册并运行

#define BOOST_TEST_MODULE boosttestunitfailure
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE( helloworld )
{
  BOOST_CHECK( true );
}
这里是g++——请注意,当使用g++编译时,测试将在框架中注册并运行:

plxv1142: atevet/BoostTestUnitFailure (master)> g++ --version
g++ (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
plxv1142: atevet/BoostTestUnitFailure (master)> g++ -std=c++11 -Wall -fPIC -DBOOST_TEST_DYN_LINK -I/usr/pkgs/boost/1.53.0/include -O0 -o boostunittestcasefailure test.cpp -Wl,-rpath=/usr/pkgs/boost/1.53.0/lib64 /usr/pkgs/boost/1.53.0/lib64/libboost_unit_test_framework.so
plxv1142: atevet/BoostTestUnitFailure (master)> ./boostunittestcasefailure                                                                                                    Running 1 test case...

*** No errors detected

如果有人好奇的话,这是因为我的环境决定使用哪个g++的方式(公司环境中有不同版本工具的包装器)。当我删除了企业环境添加项后,问题就消失了

plxv1142: atevet/BoostTestUnitFailure (master)> g++ --version
g++ (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
plxv1142: atevet/BoostTestUnitFailure (master)> g++ -std=c++11 -Wall -fPIC -DBOOST_TEST_DYN_LINK -I/usr/pkgs/boost/1.53.0/include -O0 -o boostunittestcasefailure test.cpp -Wl,-rpath=/usr/pkgs/boost/1.53.0/lib64 /usr/pkgs/boost/1.53.0/lib64/libboost_unit_test_framework.so
plxv1142: atevet/BoostTestUnitFailure (master)> ./boostunittestcasefailure                                                                                                    Running 1 test case...

*** No errors detected