You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -90,7 +92,7 @@ function cmake_settings_setup(){
90
92
CMAKE_MAKE_ADDL=""
91
93
CMAKE_MAKE_BINARY="make"
92
94
CMAKE_INSTALL_ADDL="install"
93
-
CMAKE_ADDL_FLAGS="-DCMAKE_MAKE_PROGRAM=/usr/bin/make-DCMAKE_IGNORE_PATH=/usr/bin-DCMAKE_LINKER=${LD}-DCMAKE_C_LINK_EXECUTABLE=\"${LD}\"-DCMAKE_CXX_LINK_EXECUTABLE=\"${LD}\""#ignore is to fix link.exe chosen wrong issue
95
+
CMAKE_ADDL_FLAGS=( "-DCMAKE_MAKE_PROGRAM=/usr/bin/make""-DCMAKE_IGNORE_PATH=/usr/bin""-DCMAKE_LINKER=${LD}""-DCMAKE_C_LINK_EXECUTABLE=${LD}""-DCMAKE_CXX_LINK_EXECUTABLE=${LD}" )#ignore is to fix link.exe chosen wrong issue
94
96
;;
95
97
msys)
96
98
CMAKE_TARGET="MSYS Makefiles"
@@ -112,9 +114,11 @@ function cmake_settings_setup(){
112
114
# AR=`cygpath -u "$AR"`
113
115
114
116
#this is to fix the fact some cmake configs will not like AR being set with a space after the command
115
-
echo"#!/bin/sh"> /tmp/ar.sh
116
-
echo"$AR\"\$@\"">> /tmp/ar.sh
117
-
AR=/tmp/ar.sh
117
+
118
+
# we need to condition on which cmakes need this and /tmp/ar needs to be checked to make sure we don't loop ourselves
119
+
#echo "#!/bin/sh" > /tmp/ar.sh
120
+
#echo "$AR \"\$@\"" >> /tmp/ar.sh
121
+
#AR=/tmp/ar.sh
118
122
119
123
120
124
#unset CC AR
@@ -124,7 +128,7 @@ function cmake_settings_setup(){
# CMAKE_FULL_CONFIG_CMD_ARR+=("-DCMAKE_C_LINK_EXECUTABLE=${LD}" "-DCMAKE_CXX_LINK_EXECUTABLE=${LD}" ) #this breaks all linking commands for some reason
195
+
CMAKE_FULL_CONFIG_CMD_ARR+=( "-DCMAKE_AR=${AR}" )
196
+
197
+
CMAKE_FULL_CONFIG_CMD_ARR+=("-DCMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT=123") #this is to prevent it from adding the wrong flags to the compiler string by default in terms of libs
EXPORT_CMDS=" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=1"#only works for makefiles and ninja generators for nmake it does get you real names but no linker command, may not work with unix ones
202
217
#export -p > "/tmp/test.sh"
203
218
# -DCMAKE_AR="${AR}"
@@ -209,7 +224,7 @@ function cmake_config_run(){
209
224
210
225
# IF you find you are getting -MD or -MDd added to the flags it is because CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT is not set which cauess it to happen something like set(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT "MultiThreaded$<$<CONFIG:Debug>:Debug>")
0 commit comments