minor tweaks to debug statements and cmake

This commit is contained in:
Dick Hollenbeck 2013-07-28 11:30:39 -05:00
parent 1760a28ea7
commit b1ed22f7ed
2 changed files with 8 additions and 11 deletions

View File

@ -267,23 +267,19 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS ) get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
foreach( d ${DirDefs} ) foreach( d ${DirDefs} )
set(SWIG_FLAGS ${SWIG_FLAGS} -D${d} ) set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
endforeach() endforeach()
# check if we have IO_MGR and KICAD_PLUGIN available if( USE_PCBNEW_NANOMETRES )
if ( USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE ) set( SWIG_FLAGS ${SWIG_FLAGS} -DUSE_PCBNEW_NANOMETRES )
set(SWIG_FLAGS ${SWIG_FLAGS} -DBUILD_WITH_PLUGIN)
endif(USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE)
if ( USE_PCBNEW_NANOMETRES )
set(SWIG_FLAGS ${SWIG_FLAGS} -DUSE_PCBNEW_NANOMETRES)
endif( USE_PCBNEW_NANOMETRES ) endif( USE_PCBNEW_NANOMETRES )
endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
if (KICAD_SCRIPTING) if (KICAD_SCRIPTING)
set(SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} ) set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
DEPENDS pcbcommon DEPENDS pcbcommon
@ -316,6 +312,8 @@ endif()
if (KICAD_SCRIPTING_MODULES) if (KICAD_SCRIPTING_MODULES)
#message( "building pcbnew scripting" )
set(CMAKE_SWIG_FLAGS ${SWIG_FLAGS}) set(CMAKE_SWIG_FLAGS ${SWIG_FLAGS})
set_source_files_properties(scripting/pcbnew.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(scripting/pcbnew.i PROPERTIES CPLUSPLUS ON)
swig_add_module(pcbnew python scripting/pcbnew.i ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS}) swig_add_module(pcbnew python scripting/pcbnew.i ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS})

View File

@ -4155,8 +4155,7 @@ void FPL_CACHE::Save()
abs_lib_name.MakeAbsolute(); abs_lib_name.MakeAbsolute();
tempFileName = wxFileName::CreateTempFileName( abs_lib_name.GetFullPath() ); tempFileName = wxFileName::CreateTempFileName( abs_lib_name.GetFullPath() );
wxLogDebug( wxT( "tempFileName:'%s' m_lib_path:'%s'\n" ), //wxLogDebug( wxT( "tempFileName:'%s' m_lib_path:'%s'\n" ), TO_UTF8( tempFileName ), TO_UTF8( m_lib_path ) );
TO_UTF8( tempFileName ), TO_UTF8( m_lib_path ) );
FILE* fp = wxFopen( tempFileName, wxT( "w" ) ); FILE* fp = wxFopen( tempFileName, wxT( "w" ) );
if( !fp ) if( !fp )