File tree Expand file tree Collapse file tree 4 files changed +5
-18
lines changed Expand file tree Collapse file tree 4 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ set($ENV{HTM_CPP} ${REPOSITORY_DIR})
3030option (FORCE_CPP11 "Force compiler to use C++11 standard." OFF )
3131option (FORCE_BOOST "Force compiler to install and use Boost." OFF )
3232set (BINDING_BUILD "none" CACHE STRING "Specify the Binding to build 'Python2','Python3' or 'none', default 'none'." )
33- set (NTA_LIBC_MUSL OFF CACHE BOOL "Are we using MUSL stdlibc++, or GLIBC?" )
33+ option (NTA_LIBC_MUSL "Are we using MUSL stdlibc++? otherwise GLIBC" OFF )
3434
3535# Note: by setting the CXX environment variable, a non-default c++ compiler can be specified.
3636
Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ else()
228228 -DHAVE_CONFIG_H
229229 -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
230230 -DBOOST_NO_WREGEX
231- -DNTA_LIBC_MUSL=${NTA_LIBC_MUSL}
232231 )
233232
234233 if (NOT "${CMAKE_BUILD_TYPE} " STREQUAL "Release" )
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ add_library(${src_lib_static} STATIC $<TARGET_OBJECTS:${src_objlib}>)
251251if (MSVC )
252252 set_property (TARGET ${src_lib_static} PROPERTY LINK_LIBRARIES ${INTERNAL_LINKER_FLAGS} )
253253elseif (${NTA_LIBC_MUSL} )
254- message ("Doing static build with MUSL libc" )
254+ message ("Doing static build with MUSL libc ${COMMON_COMPILER_DEFINITIONS} " )
255255 target_link_libraries (${src_lib_static} -static )
256256endif ()
257257#
@@ -335,11 +335,7 @@ target_link_libraries(${src_executable_hotgym}
335335# link with ${src_lib_shared} rather than ${core_library}
336336
337337target_compile_options ( ${src_executable_hotgym} PUBLIC ${INTERNAL_CXX_FLAGS} )
338- if (${NTA_LIBC_MUSL} )
339- target_compile_definitions (${src_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} -DNTA_LIBC_MUSL=${NTA_LIBC_MUSL} )
340- else ()
341- target_compile_definitions (${src_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
342- endif ()
338+ target_compile_definitions (${src_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
343339target_include_directories (${src_executable_hotgym} PRIVATE
344340 ${CORE_LIB_INCLUDES}
345341 ${EXTERNAL_INCLUDES}
@@ -363,11 +359,7 @@ else()
363359 ${COMMON_OS_LIBS}
364360 )
365361 target_compile_options ( ${src_dyn_executable_hotgym} PUBLIC ${INTERNAL_CXX_FLAGS} )
366- if (${NTA_LIBC_MUSL} )
367- target_compile_definitions (${src_dyn_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} -DNTA_LIBC_MUSL=${NTA_LIBC_MUSL} )
368- else ()
369- target_compile_definitions (${src_dyn_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
370- endif ()
362+ target_compile_definitions (${src_dyn_executable_hotgym} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
371363 target_include_directories (${src_dyn_executable_hotgym} PRIVATE
372364 ${CORE_LIB_INCLUDES}
373365 ${EXTERNAL_INCLUDES}
Original file line number Diff line number Diff line change @@ -150,11 +150,7 @@ target_include_directories(${unit_tests_executable} PRIVATE
150150 ${gtest_INCLUDE_DIRS}
151151 ${CORE_LIB_INCLUDES}
152152 ${EXTERNAL_INCLUDES} )
153- if (${NTA_LIBC_MUSL} )
154- target_compile_definitions (${unit_tests_executable} PRIVATE ${COMMON_COMPILER_DEFINITIONS} -DNTA_LIBC_MUSL=${NTA_LIBC_MUSL} )
155- else ()
156- target_compile_definitions (${unit_tests_executable} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
157- endif ()
153+ target_compile_definitions (${unit_tests_executable} PRIVATE ${COMMON_COMPILER_DEFINITIONS} )
158154target_compile_options (${unit_tests_executable} PUBLIC ${INTERNAL_CXX_FLAGS} )
159155add_dependencies (${unit_tests_executable} ${core_library} )
160156#add_dependencies(${unit_tests_executable} ${src_lib_shared})
You can’t perform that action at this time.
0 commit comments