Skip to content

Commit

Permalink
Fix defs
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat committed Mar 28, 2024
1 parent 297e750 commit 0e258f4
Showing 2 changed files with 26 additions and 12 deletions.
32 changes: 26 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -69,12 +69,6 @@ check_function_exists(longjmp HAVE_LONGJMP)
check_function_exists(siglongjmp HAVE_SIGLONGJMP)
check_function_exists(clock_nanosleep HAVE_CLOCK_NANOSLEEP)

add_compile_definitions(
HAVE_LONGJMP
HAVE_SIGLONGJMP
HAVE_CLOCK_NANOSLEEP
)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/include/config.h
)
@@ -102,6 +96,7 @@ if(READLINE_FOUND)
)
endif(READLINE_FOUND)


# Static link options

option(ENABLE_ALL_STATIC "Static link libgcc and libstdc++." OFF)
@@ -113,6 +108,31 @@ if(ENABLE_ALL_STATIC)
endif(ENABLE_ALL_STATIC)


# Compile flags

if(CMAKE_VERSION VERSION_LESS "3.12")
add_compile_definitions(
HAVE_LONGJMP
HAVE_SIGLONGJMP
HAVE_CLOCK_NANOSLEEP
HAVE_SSM
)
else()
if(HAVE_LONGJMP)
add_definitions(-DHAVE_LONGJMP)
endif()
if(HAVE_SIGLONGJMP)
add_definitions(-DHAVE_SIGLONGJMP)
endif()
if(HAVE_CLOCK_NANOSLEEP)
add_definitions(-DHAVE_CLOCK_NANOSLEEP)
endif()
if(HAVE_SSM)
add_definitions(-DHAVE_SSM)
endif()
endif()


# Add subdirectories

add_subdirectory(auxlib)
6 changes: 0 additions & 6 deletions cmake/config.h.cmake
Original file line number Diff line number Diff line change
@@ -11,10 +11,4 @@

#cmakedefine YP_PARAMS_DIR "@YP_PARAMS_DIR@"

#cmakedefine HAVE_SSM @HAVE_SSM@

#cmakedefine HAVE_LONGJMP @HAVE_LONGJMP@

#cmakedefine HAVE_SIGLONGJMP @HAVE_SIGLONGJMP@

#endif

0 comments on commit 0e258f4

Please sign in to comment.