Skip to content

Commit a344272

Browse files
committed
[ci skip]
1 parent 733917f commit a344272

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

CMakeLists.txt

+4-19
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jl_set_make_flag(UTF8PROC_INC "${UTF8PROC_INC}")
157157

158158
if(USE_SYSTEM_LLVM)
159159
set(LLVM_CONFIG "llvm-config${CMAKE_EXECUTABLE_SUFFIX}")
160-
push_c_flags(JL_CPP_FLAGS -DSYSTEM_LLVM)
160+
add_definitions(-DSYSTEM_LLVM)
161161
else()
162162
set(LLVM_CONFIG "${build_bindir}/llvm-config${CMAKE_EXECUTABLE_SUFFIX}")
163163
endif()
@@ -203,7 +203,7 @@ elseif(USE_SYSTEM_LIBUNWIND)
203203
endif()
204204
elseif(APPLE)
205205
push_c_flags(LIBUNWIND ${build_libdir}/libosxunwind.a)
206-
push_c_flags(JL_CPP_FLAGS -DLIBOSXUNWIND)
206+
add_definitions(-DLIBOSXUNWIND)
207207
else()
208208
push_c_flags(LIBUNWIND ${build_libdir}/libunwind-generic.a
209209
${build_libdir}/libunwind.a)
@@ -252,38 +252,23 @@ if(WIN32)
252252
iphlpapi.lib shell32.lib winmm.lib)
253253
push_c_flags(JL_LD_FLAGS -stack:8388608)
254254
endif()
255-
push_c_flags(JL_CPP_FLAGS -D_WIN32_WINNT=0x0502)
255+
add_definitions(-D_WIN32_WINNT=0x0502)
256256
set(UNTRUSTED_SYSTEM_LIBM On CACHE INTERNAL "" FORCE)
257257
jl_set_option(UNTRUSTED_SYSTEM_LIBM On)
258258
endif()
259259

260260
if(HAVE_SSP)
261-
push_c_flags(JL_CPP_FLAGS -DHAVE_SSP=1)
261+
add_definitions(-DHAVE_SSP=1)
262262
if(USEGCC)
263263
push_c_flags(OSLIBS -lssp)
264264
endif()
265265
endif()
266266

267-
jl_set_make_flag(OSLIBS "${OSLIBS}")
268-
jl_set_make_flag(JLDFLAGS "${JL_LD_FLAGS}")
269-
jl_set_make_flag(JLIBLDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
270-
271267
jl_set_make_flag(CC "${CMAKE_C_COMPILER}")
272268
jl_set_make_flag(CXX "${CMAKE_CXX_COMPILER}")
273269
string(SUBSTRING "${CMAKE_SHARED_LIBRARY_SUFFIX}" 1 -1 SHLIB)
274270
jl_set_make_flag(SHLIB_EXT "${SHLIB}")
275271

276-
jl_set_make_flag(JCFLAGS "${CMAKE_C_FLAGS}")
277-
jl_set_make_flag(JCXXFLAGS "${CMAKE_CXX_FLAGS}")
278-
279-
jl_set_make_flag(JCPPFLAGS "${JL_CPP_FLAGS}")
280-
281-
jl_set_make_flag(DEBUGFLAGS "${CMAKE_C_FLAGS_DEBUG}")
282-
jl_set_make_flag(SHIPFLAGS "${CMAKE_C_FLAGS_RELEASE}")
283-
284-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JL_CPP_FLAGS}")
285-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${JL_CPP_FLAGS}")
286-
287272
jl_get_make_flags(jl_make_flags)
288273

289274
# message("${jl_make_flags}")

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ endif
4040
BASE_SRCS := $(wildcard base/*.jl base/*/*.jl base/*/*/*.jl)
4141

4242
COMMA:=,
43-
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/inference.$(SHLIB_EXT)
43+
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl
4444
@$(call PRINT_JULIA, cd $(CMAKE_BINARY_DIR)/base && \
4545
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys) -f \
4646
-J $(call cygpath_w,$(build_private_libdir)/inference.ji) sysimg.jl \

cmake/JuliaCCompiler.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jl_set_option(USECLANG Off)
1212
jl_set_option(USEMSVC Off)
1313

1414
push_c_flags(CMAKE_CXX_FLAGS -std=c++11)
15-
set(JL_CPP_FLAGS)
1615

1716
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR
1817
CMAKE_C_COMPILER_ID STREQUAL "Clang")
@@ -34,7 +33,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR
3433
push_c_flags(CMAKE_C_FLAGS -mmacosx-version-min=10.6)
3534
push_c_flags(CMAKE_CXX_FLAGS -mmacosx-version-min=10.6)
3635
endif()
37-
push_c_flags(JL_CPP_FLAGS -D_LARGEFILE_SOURCE -D_DARWIN_USE_64_BIT_INODE=1)
36+
add_definitions(-D_LARGEFILE_SOURCE -D_DARWIN_USE_64_BIT_INODE=1)
3837
endif()
3938
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
4039
jl_set_option(USEGCC On)

0 commit comments

Comments
 (0)