Cmakefiles: do not create map file on Windows, because creating map file generates hundred of useless wranings.
In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to use msys2 because bzr patch does not work when using msys2)
This commit is contained in:
parent
a01a7b911c
commit
229613ef26
|
@ -101,6 +101,16 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
find_program(patch_bin NAMES patch patch.exe)
|
||||||
|
|
||||||
|
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
|
||||||
|
set( PATCH_STR_CMD ${PATCH_STR_CMD} )
|
||||||
|
else()
|
||||||
|
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
|
if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
|
||||||
if( MSYS )
|
if( MSYS )
|
||||||
# The Boost system does not build properly on MSYS using bootstrap.sh. Running
|
# The Boost system does not build properly on MSYS using bootstrap.sh. Running
|
||||||
|
@ -197,25 +207,25 @@ ExternalProject_Add( boost
|
||||||
# bzr revert is insufficient to remove "added" files:
|
# bzr revert is insufficient to remove "added" files:
|
||||||
COMMAND bzr clean-tree -q --force
|
COMMAND bzr clean-tree -q --force
|
||||||
|
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
|
||||||
|
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
||||||
# tell bzr about "added" files by last patch:
|
# tell bzr about "added" files by last patch:
|
||||||
COMMAND bzr add libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S
|
COMMAND bzr add libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S
|
||||||
COMMAND bzr add libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S
|
COMMAND bzr add libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S
|
||||||
|
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
|
||||||
|
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
|
||||||
# tell bzr about "added" files by last patch:
|
# tell bzr about "added" files by last patch:
|
||||||
COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S
|
COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S
|
||||||
COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S
|
COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S
|
||||||
COMMAND bzr add libs/context/src/asm/make_x86_64_ms_pe_gas.S
|
COMMAND bzr add libs/context/src/asm/make_x86_64_ms_pe_gas.S
|
||||||
COMMAND bzr add libs/context/src/asm/jump_x86_64_ms_pe_gas.S
|
COMMAND bzr add libs/context/src/asm/jump_x86_64_ms_pe_gas.S
|
||||||
|
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
||||||
COMMAND bzr add libs/context/build/Jamfile.v2
|
COMMAND bzr add libs/context/build/Jamfile.v2
|
||||||
COMMAND bzr add libs/context/build/architecture.jam
|
COMMAND bzr add libs/context/build/architecture.jam
|
||||||
COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S
|
COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S
|
||||||
|
|
|
@ -42,6 +42,14 @@ if( CMAKE_TOOLCHAIN_FILE )
|
||||||
set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
|
set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
FIND_PROGRAM (patch_bin NAMES patch.exe patch)
|
||||||
|
|
||||||
|
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
|
||||||
|
set( PATCH_STR_CMD bzr patch -p0 )
|
||||||
|
else()
|
||||||
|
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
|
||||||
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
openssl
|
openssl
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
|
@ -64,7 +72,7 @@ ExternalProject_Add(
|
||||||
# to ignore previously applied patches
|
# to ignore previously applied patches
|
||||||
PATCH_COMMAND bzr revert
|
PATCH_COMMAND bzr revert
|
||||||
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
|
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
|
||||||
COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
|
COMMAND ${PATCH_STR_CMD} ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
|
||||||
|
|
||||||
CONFIGURE_COMMAND
|
CONFIGURE_COMMAND
|
||||||
${CMAKE_COMMAND}
|
${CMAKE_COMMAND}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
# the map generation creates on Windows/gcc a lot of useless warnings
|
||||||
|
# so disable it on windows
|
||||||
|
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
|
||||||
|
set( MAKE_LINK_MAPS false )
|
||||||
|
else()
|
||||||
set( MAKE_LINK_MAPS true )
|
set( MAKE_LINK_MAPS true )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions( -DCVPCB )
|
add_definitions( -DCVPCB )
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
|
# the map generation creates on Windows/gcc a lot of useless warnings
|
||||||
|
# so disable it on windows
|
||||||
|
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
|
||||||
|
set( MAKE_LINK_MAPS false )
|
||||||
|
else()
|
||||||
set( MAKE_LINK_MAPS true )
|
set( MAKE_LINK_MAPS true )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions( -DEESCHEMA )
|
add_definitions( -DEESCHEMA )
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
|
# the map generation creates on Windows/gcc a lot of useless warnings
|
||||||
|
# so disable it on windows
|
||||||
|
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
|
||||||
|
set( MAKE_LINK_MAPS false )
|
||||||
|
else()
|
||||||
set( MAKE_LINK_MAPS true )
|
set( MAKE_LINK_MAPS true )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(-DGERBVIEW)
|
add_definitions(-DGERBVIEW)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
|
# the map generation creates on Windows/gcc a lot of useless warnings
|
||||||
|
# so disable it on windows
|
||||||
|
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
|
||||||
|
set( MAKE_LINK_MAPS false )
|
||||||
|
else()
|
||||||
set( MAKE_LINK_MAPS true )
|
set( MAKE_LINK_MAPS true )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(-DPL_EDITOR)
|
add_definitions(-DPL_EDITOR)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
|
# the map generation creates on Windows/gcc a lot of useless warnings
|
||||||
|
# so disable it on windows
|
||||||
|
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
|
||||||
|
set( MAKE_LINK_MAPS false )
|
||||||
|
else()
|
||||||
set( MAKE_LINK_MAPS true )
|
set( MAKE_LINK_MAPS true )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions( -DPCBNEW )
|
add_definitions( -DPCBNEW )
|
||||||
add_subdirectory(router)
|
add_subdirectory(router)
|
||||||
|
@ -530,6 +536,7 @@ if( USE_KIWAY_DLLS )
|
||||||
${PCBNEW_SCRIPTING_SRCS}
|
${PCBNEW_SCRIPTING_SRCS}
|
||||||
# ${PCBNEW_RESOURCES}
|
# ${PCBNEW_RESOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties( pcbnew_kiface PROPERTIES
|
set_target_properties( pcbnew_kiface PROPERTIES
|
||||||
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
|
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
|
||||||
# _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
|
# _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
|
||||||
|
@ -542,6 +549,7 @@ if( USE_KIWAY_DLLS )
|
||||||
COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
|
COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries( pcbnew_kiface
|
target_link_libraries( pcbnew_kiface
|
||||||
3d-viewer
|
3d-viewer
|
||||||
pcbcommon
|
pcbcommon
|
||||||
|
|
Loading…
Reference in New Issue