fix cxz error macro (clang)
This commit is contained in:
parent
9ef055d9c9
commit
13467b800a
3 changed files with 4 additions and 5 deletions
|
@ -12,6 +12,6 @@ build-centos:
|
||||||
- source /opt/rh/devtoolset-7/enable
|
- source /opt/rh/devtoolset-7/enable
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake3 ..
|
- CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake3 ..
|
||||||
- make -j2
|
- make -j2
|
||||||
- make test
|
- make test
|
|
@ -10,7 +10,7 @@ else()
|
||||||
message(WARNING "compiler ${CMAKE_CXX_COMPILER_ID} officially not supported")
|
message(WARNING "compiler ${CMAKE_CXX_COMPILER_ID} officially not supported")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++17 -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++17 -Wpedantic -O2 -march=native -faligned-new -funroll-loops -fopenmp")
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp -ftemplate-backtrace-limit=0")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp -ftemplate-backtrace-limit=0")
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -O0 -march=native -faligned-new -funroll-loops -fopenmp")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -O0 -march=native -faligned-new -funroll-loops -fopenmp")
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
#define CXZ_ERRTAG __FILE__ << '@' << __LINE__ << '(' << __func__ << "): error"
|
#define CXZ_ERRTAG __FILE__ << '@' << __LINE__ << '(' << __func__ << "): error"
|
||||||
#define CXZ_WARNTAG __FILE__ << '@' << __LINE__ << ": warning"
|
#define CXZ_WARNTAG __FILE__ << '@' << __LINE__ << ": warning"
|
||||||
#define CXZ_ERROR(errmsg) {\
|
#define CXZ_ERROR(errmsg) {\
|
||||||
std::stringstream ss;\
|
auto mkerr = [&](){ std::stringstream ss; ss << CXZ_ERRTAG << ": " << errmsg << std::flush; return ss.str(); }; \
|
||||||
ss << CXZ_ERRTAG << ": " << errmsg << std::flush;\
|
throw std::runtime_error(mkerr()); }
|
||||||
throw std::runtime_error(ss.str()); }
|
|
||||||
|
|
||||||
#define CXZ_WARNING(errmsg) {\
|
#define CXZ_WARNING(errmsg) {\
|
||||||
std::cerr << CXZ_WARNTAG << ": " << errmsg << std::endl; }
|
std::cerr << CXZ_WARNTAG << ": " << errmsg << std::endl; }
|
||||||
|
|
Loading…
Reference in a new issue