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:
jean-pierre charras 2014-04-03 13:55:02 +02:00
parent a01a7b911c
commit 229613ef26
7 changed files with 64 additions and 15 deletions

View File

@ -101,6 +101,16 @@ else()
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( MSYS )
# 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:
COMMAND bzr clean-tree -q --force
COMMAND bzr patch -p0 "${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_minkowski.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:
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 patch -p0 "${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_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
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:
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/make_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/architecture.jam
COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S

View File

@ -42,6 +42,14 @@ if( CMAKE_TOOLCHAIN_FILE )
set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
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(
openssl
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@ -58,13 +66,13 @@ ExternalProject_Add(
# PATCH_COMMAND patch -p0 < ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
# This one requires the bzr commit below, since bzr patch only knows a working tree.
# Revert the branch to pristine before applying patch sets as bzr patch
# fails when applying a patch to the branch twice and doesn't have a switch
# to ignore previously applied patches
PATCH_COMMAND bzr revert
# 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
${CMAKE_COMMAND}

View File

@ -1,5 +1,10 @@
set( MAKE_LINK_MAPS true )
# 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 )
endif()
add_definitions( -DCVPCB )

View File

@ -1,4 +1,10 @@
set( MAKE_LINK_MAPS true )
# 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 )
endif()
add_definitions( -DEESCHEMA )

View File

@ -1,4 +1,10 @@
set( MAKE_LINK_MAPS true )
# 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 )
endif()
add_definitions(-DGERBVIEW)

View File

@ -1,4 +1,10 @@
set( MAKE_LINK_MAPS true )
# 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 )
endif()
add_definitions(-DPL_EDITOR)

View File

@ -1,4 +1,10 @@
set( MAKE_LINK_MAPS true )
# 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 )
endif()
add_definitions( -DPCBNEW )
add_subdirectory(router)
@ -530,6 +536,7 @@ if( USE_KIWAY_DLLS )
${PCBNEW_SCRIPTING_SRCS}
# ${PCBNEW_RESOURCES}
)
set_target_properties( pcbnew_kiface PROPERTIES
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
# _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
@ -542,6 +549,7 @@ if( USE_KIWAY_DLLS )
COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
)
endif()
target_link_libraries( pcbnew_kiface
3d-viewer
pcbcommon