Mercurial > hg > orthanc
comparison Resources/CMake/Compiler.cmake @ 1951:01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Apr 2016 14:45:55 +0200 |
parents | 50234539a0dd |
children | 83a2431a455f |
comparison
equal
deleted
inserted
replaced
1950:533ff46e944b | 1951:01de36d949c3 |
---|---|
8 | 8 |
9 if (CMAKE_COMPILER_IS_GNUCXX) | 9 if (CMAKE_COMPILER_IS_GNUCXX) |
10 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-long-long -Wno-implicit-function-declaration") | 10 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-long-long -Wno-implicit-function-declaration") |
11 # --std=c99 makes libcurl not to compile | 11 # --std=c99 makes libcurl not to compile |
12 # -pedantic gives a lot of warnings on OpenSSL | 12 # -pedantic gives a lot of warnings on OpenSSL |
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wno-variadic-macros") | 13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wno-variadic-macros") |
14 | 14 |
15 if (CMAKE_CROSSCOMPILING) | 15 if (CMAKE_CROSSCOMPILING) |
16 # http://stackoverflow.com/a/3543845/881731 | 16 # http://stackoverflow.com/a/3543845/881731 |
17 set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -I<CMAKE_CURRENT_SOURCE_DIR> <SOURCE> <OBJECT>") | 17 set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -I<CMAKE_CURRENT_SOURCE_DIR> <SOURCE> <OBJECT>") |
18 endif() | 18 endif() |
95 -D_CRT_SECURE_NO_WARNINGS=1 | 95 -D_CRT_SECURE_NO_WARNINGS=1 |
96 ) | 96 ) |
97 link_libraries(rpcrt4 ws2_32) | 97 link_libraries(rpcrt4 ws2_32) |
98 | 98 |
99 if (CMAKE_COMPILER_IS_GNUCXX) | 99 if (CMAKE_COMPILER_IS_GNUCXX) |
100 # Some additional C/C++ compiler flags for MinGW | |
101 SET(MINGW_NO_WARNINGS "-Wno-unused-but-set-variable -Wno-int-to-pointer-cast -Wno-unused-function -Wno-unused-variable") | |
102 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MINGW_NO_WARNINGS} -Wno-pointer-to-int-cast") | |
103 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MINGW_NO_WARNINGS}") | |
104 | |
100 # This is a patch for MinGW64 | 105 # This is a patch for MinGW64 |
101 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") | 106 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") |
102 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") | 107 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") |
103 | 108 |
104 CHECK_LIBRARY_EXISTS(winpthread pthread_create "" HAVE_WIN_PTHREAD) | 109 CHECK_LIBRARY_EXISTS(winpthread pthread_create "" HAVE_WIN_PTHREAD) |