[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi CMakeLists.txt scripts/Toolchain-cross-mi...
From: |
CERTI CVS commits |
Subject: |
[certi-cvs] certi CMakeLists.txt scripts/Toolchain-cross-mi... |
Date: |
Tue, 17 Sep 2013 15:05:55 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 13/09/17 15:05:55
Modified files:
. : CMakeLists.txt
Added files:
scripts : Toolchain-cross-mingw-Win64.cmake
Toolchain-cross-mingw-Win32.cmake
Removed files:
scripts : Toolchain-cross-mingw32-linux.cmake
Log message:
Add test for properly cross-compiling CERTI on a Linux host to a
Win32/64 target
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/Toolchain-cross-mingw-Win64.cmake?cvsroot=certi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/Toolchain-cross-mingw-Win32.cmake?cvsroot=certi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/Toolchain-cross-mingw32-linux.cmake?cvsroot=certi&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/certi/CMakeLists.txt?cvsroot=certi&r1=1.120&r2=1.121
Patches:
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/CMakeLists.txt,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- CMakeLists.txt 16 Sep 2013 14:10:34 -0000 1.120
+++ CMakeLists.txt 17 Sep 2013 15:05:55 -0000 1.121
@@ -18,12 +18,25 @@
INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists)
+# Display some information on host and target (when cross-compiling)
+if (CMAKE_CROSSCOMPILING)
+ message(STATUS "Cross-compiling build.")
+else (CMAKE_CROSSCOMPILING)
+ message(STATUS "Native build.")
+endif (CMAKE_CROSSCOMPILING)
+
# Test 32/64 bits
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
message(STATUS "Host is 64 bits")
add_definitions(-DHOST_IS_64BITS)
+ if (WIN32)
+ set(WINXXBITS Win64)
+ endif(WIN32)
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
message(STATUS "Host is 32 bits")
+ if (WIN32)
+ set(WINXXBITS Win32)
+ endif(WIN32)
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
# Test Endianess
INCLUDE(TestBigEndian)
@@ -535,18 +548,20 @@
INCLUDE(CPack)
INCLUDE(UsePackageBackup)
-# The UseRPMTools and UseDebian thing
-# are obsolete since CPack 2.6.0 which has
-# builtin support for RPM and DEB.
-# We may get rid of those sooner or later
-INCLUDE(UseRPMTools)
-IF(RPMTools_FOUND)
+if (CMAKE_VERSION VERSION_LESS 2.6.0)
+ # The UseRPMTools and UseDebian thing
+ # are obsolete since CPack 2.6.0 which has
+ # builtin support for RPM and DEB.
+ # We may get rid of those sooner or later
+ INCLUDE(UseRPMTools)
+ IF(RPMTools_FOUND)
RPMTools_ADD_RPM_TARGETS(certi)
-ENDIF(RPMTools_FOUND)
-INCLUDE(UseDebian)
-IF (DEBIAN_FOUND)
+ ENDIF(RPMTools_FOUND)
+ INCLUDE(UseDebian)
+ IF (DEBIAN_FOUND)
ADD_DEBIAN_TARGETS(certi)
-ENDIF(DEBIAN_FOUND)
+ ENDIF(DEBIAN_FOUND)
+endif (CMAKE_VERSION VERSION_LESS 2.6.0)
## Patch generating target
# The custom target is using a cmake script which in turn use execute_process,
@@ -580,7 +595,7 @@
IF (WIN32)
- MESSAGE(STATUS "*** CERTI for WIN32 has been successfully configured
********")
+ MESSAGE(STATUS "*** CERTI for ${WINXXBITS} has been successfully configured
********")
ELSE (WIN32)
MESSAGE(STATUS "*** CERTI has been successfully configured ********")
ENDIF (WIN32)
Index: scripts/Toolchain-cross-mingw-Win64.cmake
===================================================================
RCS file: scripts/Toolchain-cross-mingw-Win64.cmake
diff -N scripts/Toolchain-cross-mingw-Win64.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ scripts/Toolchain-cross-mingw-Win64.cmake 17 Sep 2013 15:05:54 -0000
1.1
@@ -0,0 +1,33 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# Choose an appropriate compiler prefix
+
+# for classical mingw32
+# see http://www.mingw.org/
+#set(COMPILER_PREFIX "i586-mingw32msvc")
+
+# for 32 or 64 bits mingw-w64
+# see http://mingw-w64.sourceforge.net/
+#set(COMPILER_PREFIX "i686-w64-mingw32")
+set(COMPILER_PREFIX "x86_64-w64-mingw32")
+
+# which compilers to use for C and C++
+find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
+#SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
+find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
+#SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
+find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
+#SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
+
+
+# here is the target environment located
+SET(USER_ROOT_PATH /home/erk/erk-win32-dev)
+SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} ${USER_ROOT_PATH})
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Index: scripts/Toolchain-cross-mingw-Win32.cmake
===================================================================
RCS file: scripts/Toolchain-cross-mingw-Win32.cmake
diff -N scripts/Toolchain-cross-mingw-Win32.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ scripts/Toolchain-cross-mingw-Win32.cmake 17 Sep 2013 15:05:55 -0000
1.1
@@ -0,0 +1,33 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# Choose an appropriate compiler prefix
+
+# for classical mingw32
+# see http://www.mingw.org/
+#set(COMPILER_PREFIX "i586-mingw32msvc")
+
+# for 32 or 64 bits mingw-w64
+# see http://mingw-w64.sourceforge.net/
+set(COMPILER_PREFIX "i686-w64-mingw32")
+#set(COMPILER_PREFIX "x86_64-w64-mingw32"
+
+# which compilers to use for C and C++
+find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
+#SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
+find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
+#SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
+find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
+#SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
+
+
+# here is the target environment located
+SET(USER_ROOT_PATH /home/erk/erk-win32-dev)
+SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} ${USER_ROOT_PATH})
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Index: scripts/Toolchain-cross-mingw32-linux.cmake
===================================================================
RCS file: scripts/Toolchain-cross-mingw32-linux.cmake
diff -N scripts/Toolchain-cross-mingw32-linux.cmake
--- scripts/Toolchain-cross-mingw32-linux.cmake 31 Dec 2011 13:25:04 -0000
1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-# the name of the target operating system
-SET(CMAKE_SYSTEM_NAME Windows)
-
-# Choose an appropriate compiler prefix
-
-# for classical mingw32
-# see http://www.mingw.org/
-#set(COMPILER_PREFIX "i586-mingw32msvc")
-
-# for 32 or 64 bits mingw-w64
-# see http://mingw-w64.sourceforge.net/
-set(COMPILER_PREFIX "i686-w64-mingw32")
-#set(COMPILER_PREFIX "x86_64-w64-mingw32"
-
-# which compilers to use for C and C++
-find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
-#SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
-find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
-#SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
-find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
-#SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
-
-
-# here is the target environment located
-SET(USER_ROOT_PATH /home/erk/erk-win32-dev)
-SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} ${USER_ROOT_PATH})
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi CMakeLists.txt scripts/Toolchain-cross-mi...,
CERTI CVS commits <=