Mercurial > hg > orthanc
comparison Resources/CMake/Compiler.cmake @ 2448:862d943115f9
working on linux standard base
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jan 2018 18:04:11 +0100 |
parents | f0cfacd0c9b8 |
children | ade8b4ddd8a6 |
comparison
equal
deleted
inserted
replaced
2447:878b59270859 | 2448:862d943115f9 |
---|---|
1 # This file sets all the compiler-related flags | 1 # This file sets all the compiler-related flags |
2 | 2 |
3 if (CMAKE_CROSSCOMPILING) | 3 if (CMAKE_CROSSCOMPILING OR |
4 "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
4 # Cross-compilation necessarily implies standalone and static build | 5 # Cross-compilation necessarily implies standalone and static build |
5 SET(STATIC_BUILD ON) | 6 SET(STATIC_BUILD ON) |
6 SET(STANDALONE_BUILD ON) | 7 SET(STANDALONE_BUILD ON) |
7 endif() | 8 endif() |
8 | 9 |
185 else() | 186 else() |
186 message(FATAL_ERROR "Support your platform here") | 187 message(FATAL_ERROR "Support your platform here") |
187 endif() | 188 endif() |
188 | 189 |
189 | 190 |
190 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
191 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -I${LSB_PATH}/include") | |
192 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -nostdinc++ -I${LSB_PATH}/include -I${LSB_PATH}/include/c++ -I${LSB_PATH}/include/c++/backward -fpermissive") | |
193 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -L${LSB_LIBPATH}") | |
194 endif() | |
195 | |
196 | |
197 if (DEFINED ENABLE_PROFILING AND ENABLE_PROFILING) | 191 if (DEFINED ENABLE_PROFILING AND ENABLE_PROFILING) |
198 if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") | 192 if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") |
199 message(WARNING "Enabling profiling on a non-debug build will not produce full information") | 193 message(WARNING "Enabling profiling on a non-debug build will not produce full information") |
200 endif() | 194 endif() |
201 | 195 |