Improve build times by not leaking <filesystem> everywhere.

This commit is contained in:
Alex Shvartzkop 2024-05-06 02:26:13 +03:00
parent 03fa632526
commit 4ecca01392
2 changed files with 9 additions and 4 deletions

View File

@ -625,7 +625,9 @@ std::unique_ptr<PAD> PCB_IO_EASYEDAPRO_PARSER::createPAD( FOOTPRINT*
if( line.at( 14 ).is_number() )
drill_dir = line.at( 14 );
if( padHole.at( 0 ) == wxS( "ROUND" ) || padHole.at( 0 ) == wxS( "SLOT" ) )
wxString holeShape = padHole.at( 0 );
if( holeShape == wxS( "ROUND" ) || holeShape == wxS( "SLOT" ) )
{
VECTOR2D drill;
drill.x = padHole.at( 1 );
@ -636,7 +638,7 @@ std::unique_ptr<PAD> PCB_IO_EASYEDAPRO_PARSER::createPAD( FOOTPRINT*
if( std::abs( deg ) >= 45 )
std::swap( drill.x, drill.y ); // KiCad doesn't support arbitrary hole direction
if( padHole.at( 0 ) == wxS( "SLOT" ) )
if( holeShape == wxS( "SLOT" ) )
{
pad->SetDrillShape( PAD_DRILL_SHAPE_OBLONG );
}

View File

@ -2,6 +2,9 @@ add_library( nlohmann_json INTERFACE )
target_include_directories( nlohmann_json INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} )
target_sources( nlohmann_json INTERFACE
target_sources( nlohmann_json INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/nlohmann/json.hpp
)
)
# Reduces build times
target_compile_definitions( nlohmann_json INTERFACE JSON_HAS_FILESYSTEM=0 )