Compare commits
15 commits
master
...
enable-add
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5a534d5e5 | ||
|
|
6fe8648657 | ||
|
|
8a82142e1b | ||
|
|
20d72fb6d5 | ||
|
|
ab9bd3ae8d | ||
|
|
81a0362c30 | ||
|
|
84472921c1 | ||
|
|
1d01b831aa | ||
|
|
0d2e791e82 | ||
|
|
d39fbaf4d7 | ||
|
|
e422262877 | ||
|
|
71fe947ff5 | ||
|
|
beb2a595f1 | ||
|
|
3fd71cf457 | ||
|
|
0fbc3c0c84 |
7 changed files with 52 additions and 25 deletions
|
|
@ -58,7 +58,7 @@ test_script:
|
|||
- cmd: echo Running CTest...
|
||||
- cmd: cd c:\projects\STEPcode\build
|
||||
- cmd: echo excluding test_inverse_attr3, which hangs
|
||||
- cmd: ctest -j2 . -C Debug -E test_inverse_attr3 --output-on-failure
|
||||
- cmd: ctest -j1 . -C Debug --output-on-failure
|
||||
|
||||
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,3 @@ notifications:
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
matrix:
|
||||
allow_failures:
|
||||
- os: osx
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ std::cout << \"1s is \"<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
|||
set( TEST_NULLPTR "
|
||||
#include <cstddef>
|
||||
std::nullptr_t f() {return nullptr;}
|
||||
int main() {return !!f();}
|
||||
int main() {return !(f() == f());}
|
||||
" )
|
||||
cmake_push_check_state()
|
||||
if( UNIX )
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
# http://www.cmake.org/pipermail/cmake/2009-February/027014.html
|
||||
|
||||
set(SC_IS_SUBBUILD "@SC_IS_SUBBUILD@")
|
||||
set(SC_ENABLE_TESTING "@SC_ENABLE_TESTING@")
|
||||
|
||||
set(SC_VERSION_HEADER "${BINARY_DIR}/include/sc_version_string.h")
|
||||
|
||||
|
|
@ -47,7 +48,9 @@ string(REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID})
|
|||
#once cmake_minimum_required is >= 2.8.11, we can use TIMESTAMP:
|
||||
#string(TIMESTAMP date_time_string)
|
||||
|
||||
if(UNIX)
|
||||
if(SC_ENABLE_TESTING)
|
||||
set (date_time_string "NA - disabled for testing")
|
||||
elseif(UNIX)
|
||||
execute_process(COMMAND date "+%d %b %Y %H:%M" OUTPUT_VARIABLE date_time_string OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
elseif(WIN32)
|
||||
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE currentDate OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
|
@ -75,9 +78,10 @@ set(header_string "/* sc_version_string.h - written by cmake. Changes will be lo
|
|||
)
|
||||
|
||||
#don't update the file unless somethig changed
|
||||
file(WRITE ${SC_VERSION_HEADER}.tmp ${header_string})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SC_VERSION_HEADER}.tmp ${SC_VERSION_HEADER})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${SC_VERSION_HEADER}.tmp)
|
||||
string(RANDOM tmpsuffix)
|
||||
file(WRITE ${SC_VERSION_HEADER}.${tmpsuffix} ${header_string})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SC_VERSION_HEADER}.${tmpsuffix} ${SC_VERSION_HEADER})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${SC_VERSION_HEADER}.${tmpsuffix})
|
||||
|
||||
if(NOT SC_IS_SUBBUILD)
|
||||
message("-- sc_version_string.h is up-to-date.")
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ instancesLoaded_t * lazyFileReader::getHeaderInstances() {
|
|||
}
|
||||
|
||||
lazyFileReader::lazyFileReader( std::string fname, lazyInstMgr * i, fileID fid ): _fileName( fname ), _parent( i ), _fileID( fid ) {
|
||||
_file.open( _fileName.c_str() );
|
||||
_file.open( _fileName.c_str(), std::ios::binary );
|
||||
_file.imbue( std::locale::classic() );
|
||||
_file.unsetf( std::ios_base::skipws );
|
||||
assert( _file.is_open() && _file.good() );
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void ErrorDescriptor::PrependToUserMsg( const char * msg ) {
|
|||
}
|
||||
|
||||
void ErrorDescriptor::AppendToUserMsg( const char c ) {
|
||||
_userMsg.append( &c );
|
||||
_userMsg.push_back( c );
|
||||
}
|
||||
|
||||
void ErrorDescriptor::AppendToUserMsg( const char * msg ) {
|
||||
|
|
@ -147,7 +147,7 @@ void ErrorDescriptor::PrependToDetailMsg( const char * msg ) {
|
|||
}
|
||||
|
||||
void ErrorDescriptor::AppendToDetailMsg( const char c ) {
|
||||
_detailMsg.append( &c );
|
||||
_detailMsg.push_back( c );
|
||||
}
|
||||
|
||||
void ErrorDescriptor::AppendToDetailMsg( const char * msg ) {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@
|
|||
#include "express/info.h"
|
||||
#include "express/linklist.h"
|
||||
|
||||
#if defined( _WIN32 ) || defined ( __WIN32__ )
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
bool __ERROR_buffer_errors = false;
|
||||
const char * current_filename = "stdin";
|
||||
|
|
@ -112,6 +115,7 @@ static struct heap_element {
|
|||
static int ERROR_with_lines = 0; /**< number of warnings & errors that have occurred with a line number */
|
||||
static char * ERROR_string;
|
||||
static char * ERROR_string_base;
|
||||
static char * ERROR_string_end;
|
||||
|
||||
static bool ERROR_unsafe = false;
|
||||
static jmp_buf ERROR_safe_env;
|
||||
|
|
@ -119,6 +123,34 @@ static jmp_buf ERROR_safe_env;
|
|||
|
||||
#define error_file stderr /**< message buffer file */
|
||||
|
||||
static int ERROR_vprintf( const char *format, va_list ap ) {
|
||||
int result = snprintf( ERROR_string, ERROR_string_end - ERROR_string, format, ap );
|
||||
if(result < 0) {
|
||||
ERROR_string = ERROR_string_end;
|
||||
} else if(result > (ERROR_string_end - ERROR_string)) {
|
||||
ERROR_string = ERROR_string_end;
|
||||
} else {
|
||||
ERROR_string = ERROR_string + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static int ERROR_printf( const char *format, ... ) {
|
||||
int result;
|
||||
va_list ap;
|
||||
va_start( ap, format );
|
||||
result = ERROR_vprintf( format, ap );
|
||||
va_end( ap );
|
||||
return result;
|
||||
}
|
||||
|
||||
static void ERROR_nexterror() {
|
||||
if( ERROR_string == ERROR_string_end ) {
|
||||
return;
|
||||
}
|
||||
ERROR_string++;
|
||||
}
|
||||
|
||||
/** Initialize the Error module */
|
||||
void ERRORinitialize( void ) {
|
||||
ERROR_subordinate_failed =
|
||||
|
|
@ -127,6 +159,7 @@ void ERRORinitialize( void ) {
|
|||
ERRORcreate( "%s, expecting %s in %s %s", SEVERITY_EXIT );
|
||||
|
||||
ERROR_string_base = ( char * )sc_malloc( ERROR_MAX_SPACE );
|
||||
ERROR_string_end = ERROR_string_base + ERROR_MAX_SPACE;
|
||||
ERROR_start_message_buffer();
|
||||
|
||||
|
||||
|
|
@ -377,20 +410,14 @@ va_dcl {
|
|||
heap[child].msg = ERROR_string;
|
||||
|
||||
if( what->severity >= SEVERITY_ERROR ) {
|
||||
sprintf( ERROR_string, "%s:%d: --ERROR PE%03d: ", sym->filename, sym->line, what->serial );
|
||||
ERROR_string += strlen( ERROR_string );
|
||||
vsprintf( ERROR_string, what->message, args );
|
||||
ERROR_string += strlen( ERROR_string );
|
||||
*ERROR_string++ = '\n';
|
||||
*ERROR_string++ = '\0';
|
||||
ERROR_printf( "%s:%d: --ERROR PE%03d: ", sym->filename, sym->line, what->serial );
|
||||
ERROR_vprintf( what->message, args );
|
||||
ERROR_nexterror();
|
||||
ERRORoccurred = true;
|
||||
} else {
|
||||
sprintf( ERROR_string, "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
||||
ERROR_string += strlen( ERROR_string );
|
||||
vsprintf( ERROR_string, what->message, args );
|
||||
ERROR_string += strlen( ERROR_string );
|
||||
*ERROR_string++ = '\n';
|
||||
*ERROR_string++ = '\0';
|
||||
ERROR_printf( "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
||||
ERROR_vprintf( what->message, args );
|
||||
ERROR_nexterror();
|
||||
}
|
||||
if( what->severity >= SEVERITY_EXIT ||
|
||||
ERROR_string + ERROR_MAX_STRLEN > ERROR_string_base + ERROR_MAX_SPACE ||
|
||||
|
|
@ -410,7 +437,6 @@ va_dcl {
|
|||
ERRORoccurred = true;
|
||||
} else {
|
||||
fprintf( error_file, "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
||||
ERROR_string += strlen( ERROR_string ) + 1;
|
||||
vfprintf( error_file, what->message, args );
|
||||
fprintf( error_file, "\n" );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue