Lines 1-6
Link Here
|
1 |
--- CMakeLists.txt.orig 2024-03-27 13:30:15 UTC |
1 |
--- CMakeLists.txt.orig 2024-03-27 13:30:15 UTC |
2 |
+++ CMakeLists.txt |
2 |
+++ CMakeLists.txt |
3 |
@@ -29,11 +29,6 @@ include(sources.cmake) |
3 |
@@ -29,25 +29,6 @@ include(sources.cmake) |
4 |
include(sources.cmake) |
4 |
include(sources.cmake) |
5 |
|
5 |
|
6 |
#----------------------------------------------------------------------------- |
6 |
#----------------------------------------------------------------------------- |
Lines 9-18
Link Here
|
9 |
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF) |
9 |
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF) |
10 |
- |
10 |
- |
11 |
-#----------------------------------------------------------------------------- |
11 |
-#----------------------------------------------------------------------------- |
12 |
# Add support for ccache if desired |
12 |
-# Add support for ccache if desired |
|
|
13 |
-#----------------------------------------------------------------------------- |
14 |
-find_program(CCACHE ccache) |
15 |
- |
16 |
-if(CCACHE) |
17 |
- option(ENABLE_CCACHE "Enable ccache." ON) |
18 |
-endif() |
19 |
- |
20 |
-# use ccache if installed |
21 |
-if(CCACHE AND ENABLE_CCACHE) |
22 |
- set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) |
23 |
-endif() |
24 |
- |
25 |
-#----------------------------------------------------------------------------- |
26 |
# Compose CFLAGS |
13 |
#----------------------------------------------------------------------------- |
27 |
#----------------------------------------------------------------------------- |
14 |
find_program(CCACHE ccache) |
28 |
|
15 |
@@ -103,6 +98,7 @@ add_library(${PROJECT_NAME} |
29 |
@@ -68,8 +49,8 @@ else() |
|
|
30 |
set(LTM_C_FLAGS -Wall -Wsign-compare -Wextra -Wshadow |
31 |
-Wdeclaration-after-statement -Wbad-function-cast -Wcast-align |
32 |
-Wstrict-prototypes -Wpointer-arith -Wsystem-headers) |
33 |
- set(CMAKE_C_FLAGS_DEBUG "-g3") |
34 |
- set(CMAKE_C_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer") |
35 |
+# set(CMAKE_C_FLAGS_DEBUG "-g3") |
36 |
+# set(CMAKE_C_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer") |
37 |
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g3 -O2") |
38 |
set(CMAKE_C_FLAGS_MINSIZEREL "-Os") |
39 |
endif() |
40 |
@@ -78,7 +59,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang") |
41 |
if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang") |
42 |
list(APPEND LTM_C_FLAGS -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header) |
43 |
# Clang requires at least '-O1' for dead code elimination |
44 |
- set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}") |
45 |
+# set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}") |
46 |
endif() |
47 |
if(CMAKE_C_COMPILER MATCHES "mingw") |
48 |
list(APPEND LTM_C_FLAGS -Wno-shadow -Wno-expansion-to-defined -Wno-declaration-after-statement -Wno-bad-function-cast) |
49 |
@@ -103,6 +84,7 @@ add_library(${PROJECT_NAME} |
16 |
# library target |
50 |
# library target |
17 |
#----------------------------------------------------------------------------- |
51 |
#----------------------------------------------------------------------------- |
18 |
add_library(${PROJECT_NAME} |
52 |
add_library(${PROJECT_NAME} |
Lines 20-26
Link Here
|
20 |
${SOURCES} |
54 |
${SOURCES} |
21 |
${HEADERS} |
55 |
${HEADERS} |
22 |
) |
56 |
) |
23 |
@@ -125,12 +121,23 @@ endif() |
57 |
@@ -125,12 +107,23 @@ endif() |
24 |
list(APPEND PUBLIC_HEADERS tommath_c89.h) |
58 |
list(APPEND PUBLIC_HEADERS tommath_c89.h) |
25 |
endif() |
59 |
endif() |
26 |
|
60 |
|
Lines 44-50
Link Here
|
44 |
|
78 |
|
45 |
option(COMPILE_LTO "Build with LTO enabled") |
79 |
option(COMPILE_LTO "Build with LTO enabled") |
46 |
if(COMPILE_LTO) |
80 |
if(COMPILE_LTO) |
47 |
@@ -159,7 +166,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") |
81 |
@@ -159,7 +152,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") |
48 |
set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake") |
82 |
set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake") |
49 |
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") |
83 |
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") |
50 |
|
84 |
|
Lines 53-59
Link Here
|
53 |
EXPORT ${TARGETS_EXPORT_NAME} |
87 |
EXPORT ${TARGETS_EXPORT_NAME} |
54 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
88 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
55 |
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries |
89 |
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries |
56 |
@@ -168,20 +175,18 @@ install(TARGETS ${PROJECT_NAME} |
90 |
@@ -168,20 +161,18 @@ install(TARGETS ${PROJECT_NAME} |
57 |
) |
91 |
) |
58 |
|
92 |
|
59 |
# Install libtommath.pc for pkg-config if we build a shared library |
93 |
# Install libtommath.pc for pkg-config if we build a shared library |
Lines 84-90
Link Here
|
84 |
|
118 |
|
85 |
# generate package version file |
119 |
# generate package version file |
86 |
write_basic_package_version_file( |
120 |
write_basic_package_version_file( |
87 |
@@ -262,18 +267,11 @@ endif() |
121 |
@@ -262,18 +253,11 @@ endif() |
88 |
list(APPEND CPACK_GENERATOR FREEBSD) |
122 |
list(APPEND CPACK_GENERATOR FREEBSD) |
89 |
endif() |
123 |
endif() |
90 |
|
124 |
|
Lines 105-111
Link Here
|
105 |
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
139 |
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
106 |
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath") |
140 |
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath") |
107 |
set(CPACK_PACKAGE_VENDOR "libtom projects") |
141 |
set(CPACK_PACKAGE_VENDOR "libtom projects") |
108 |
@@ -287,15 +285,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) |
142 |
@@ -287,15 +271,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) |
109 |
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) |
143 |
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) |
110 |
set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION}) |
144 |
set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION}) |
111 |
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) |
145 |
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) |