Skip to content

Commit 3bd0e1e

Browse files
committed
Merge pull request #202 from dwmw2/master
Build fixes
2 parents e9fd1e0 + 8ecfb6d commit 3bd0e1e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
8282
#ADD_DEFINITIONS( -Wall -O0 -ggdb )
8383
#ADD_DEFINITIONS( -Wfatal-errors -Wformat=2 -Werror=format-security )
8484

85-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
86-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static-libstdc++")
8785
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc -static-libstdc++")
8886
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++")
87+
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++")
8988

9089
GET_FILENAME_COMPONENT(_name ${_input} NAME)
9190
SET(_source "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
@@ -94,7 +93,7 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
9493
SET(_output "${_outdir}/.c++")
9594

9695
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
97-
SET(_compiler_FLAGS ${${_flags_var_name}})
96+
SET(_compiler_FLAGS "${CMAKE_CXX_FLAGS} ${${_flags_var_name}}")
9897

9998
GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES)
10099
FOREACH(item ${_directory_flags})
@@ -105,10 +104,10 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
105104
LIST(APPEND _compiler_FLAGS ${_directory_flags})
106105

107106
SEPARATE_ARGUMENTS(_compiler_FLAGS)
108-
MESSAGE("${CMAKE_CXX_COMPILER} -DPCHCOMPILE ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}")
107+
MESSAGE("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}")
109108
ADD_CUSTOM_COMMAND(
110109
OUTPUT ${_output}
111-
COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}
110+
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}
112111
DEPENDS ${_source} )
113112
ADD_CUSTOM_TARGET(${_targetName}_gch DEPENDS ${_output})
114113
ADD_DEPENDENCIES(${_targetName} ${_targetName}_gch)

main/domoticz.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <string.h>
4545
#endif
4646

47-
#ifdef __linux__
47+
#ifdef __gnu_linux__
4848
#include <execinfo.h>
4949
static void dumpstack(void) {
5050
// Notes :

0 commit comments

Comments
 (0)